I have a working application using C++ and the COM Interop for Aspose.Words. I recently received our license.
I am having trouble with CoCreateInstance. I am trying to get the license Interface so I can call SetLicense. CoCreateInstance keeps failing with REGDB_E_CLASSNOTREG.
Thanks for your request. Does the problem occur only with License object? Can you create instances of other classes, Aspose.Words.Document for example?
Also, could you please describe your environment and specify what IDE you use?
Thank you for additional information. Could you please check if you have the registry key HKEY_CLASSES_ROOT\Aspose.Words.License\CLSID. Take the value of this key (GUID, in my case it {EFA643A2-F23B-30D0-AE15-B84FC7120F03}, in your case it will be different). And seek another branch in the registry HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{EFA643A2-F23B-30D0-AE15-B84FC7120F03}\InprocServer32. there should be information about the latest version of the library 9.7.0.0.
If these keys do not exist try to re-register the library. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /unregister aspose.words.dll C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe aspose.words.dll /codebase
Also, since you have problems with other Aspose products too, I will move this thread to Aspose.Total forum for further discussion. So my colleagues from other team also will participate.
after registering the newer version of aspose.Word and changing the cocreateInstance to agree with your suggestion.
now cocreateInstance succeeds but SetLicense dose not seam to work? Regardless of the path to the license files ( in this case it is invalid) SetLicense returns sucess and the converted doc->pdf has the "Evaluation Only" stamped on the top of the output file?
Thank you for the additional information. I think, as a simplest solution, you can create a simple wrapper, which will allow setting the license and do other things you need to do with documents. In this case, you will write all the code in a .NET class library and call only one method of this library from your COM application.