Posted Friday, October 05, 2007 1:38 PM
|
|
|
|
| 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
|
|
|
|
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 |
|
|
|
|
|