Bluebit Software
Bluebit Software Support Forum
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Registering program in C++ Expand / Collapse
Message
Posted Friday, October 05, 2007 1:38 PM Post #443
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I have a valid registration name and key, but I am not getting a valid version back.

I have declared a IMatrix * in my program "View" class.  On creation of the class I create the IMatrix object, then register the program using the name and key sent with the program.

When I actually use the matrix dll, I write the version to a file and its just a bunch of unprintable characters.

A response would be appreciated.

Marmot

Posted Friday, October 05, 2007 2:30 PM Post #444
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
Please try the following code:


#include "stdafx.h"
#include "iostream.h"
#import "bluebitmatrix31.dll" no_namespace



IMatrix * regMatrix;



 

HRESULT TestRegistration()
{
 HRESULT hr;
 hr = ::CoCreateInstance(__uuidof(Matrix), NULL, CLSCTX_INPROC, __uuidof(IMatrix), (void**)& regMatrix);
 if(FAILED(hr))
  return hr;  

 regMatrix->Register( "Your registration Name", "Your Key");
 cout << regMatrix->Version ;

 return hr;
}

int main(int argc, char* argv[])
{
 ::CoInitialize(NULL);
 TestRegistration();
 //cout << "Please press return to exit";
 //cin.get();
 CoUninitialize();    // clearup
 return 0;
}



Trifon Triantafillidis

Lead Developer

Bluebit Software

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trifon

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:10pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.078. 8 queries. Compression Disabled.
.NET Matrix Library