Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Tue Jul 20, 2010 4:51 am Post subject: INFO: You cannot compile or run projects using the CryptoLicensing Generator API |
|
|
Sometimes, during compiling a project using the CryptoLicensing Generator API via the #import directive, Visual Studio may give an error similar to the following:
Code: | error C3505: cannot load type library {FCD3B300-ECB4-4632-9CC3-05A72FCAC357}
fatal error C1104: fatal error importing libid: FCD3B300-ECB4-4632-9CC3-05A72FCAC357′. |
This is caused when you use #import using a GUID as follows::
Code: | #import "libid:FCD3B300-ECB4-4632-9CC3-05A72FCAC357" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search |
If you change the #import to import it by specifying a path to a tlb as follows:
Code: | #import "LogicNP.CryptoLicensing.Generator.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search |
the compilation succeeds, but at runtime, an exception similar to the following is thrown:
Code: | First-chance exception at 0x7647e124: Microsoft C++ exception: _com_error at the position memory 0x0017f33c.
|
Both are above are indications that the LogicNP.CryptoLicensing.Generator.dll file is not correctly registered in the registry. It is normally registered during install, but it may have failed to do so for some reason. The solution is to register the LogicNP.CryptoLicensing.Generator.dll file yourself by opening an Admin mode command prompt at the install folder (typically "C:\Program Files\LogicNP Software\CryptoLicensing For MFC 2015") and executing following command:
Code: | RegAPI.exe -i LogicNP.CryptoLicensing.Generator.dll |
The output should be something like "Registration successful".
After this, using #import with both GUID and path to tlb should be successful as compile time as well as runtime. |
|