This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: COM registration error with IS2009
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2009
07:28 PM
COM registration error with IS2009
I have problem to call a 3rd party dll (PrimoAPI.dll) function from a CA in InstallShield 2009, with error 0f "80040154" - com server not registered.
Attached (zipped .doc to overcome the max size limit on .doc files) contains the screenshot that shows how I configured the 3rd party dll to make IS to register it (it has been set as key file of the compoment), in a simple testing project (InstallScript MSI).
The CA has been set as 'Deferred Execution in System Context' and is type of "Call a function in a Windows Installer dynamic-link library". It calls a funciton of my own dll (say 'MyDll.dll'). My dll function has following code to call the 3rd party dll function (CreatePrinter()):
CatchErr() indicates that the error number is '80040154', which means the com is not registered. If I manually register the 3rd party dll (regsvr32) before installation, the call to 'CreatePrinter()' works.
The similar way works on another product, which is Basic MSI, so the above code should be fine, thus the only problem is that IS failed to register the 3rd party dll. The 3rd party dll needs to be installed under the same drive of Windows, according to the experience of the other product.
Any help is greatly appreciated.
Thanks,
PB
Attached (zipped .doc to overcome the max size limit on .doc files) contains the screenshot that shows how I configured the 3rd party dll to make IS to register it (it has been set as key file of the compoment), in a simple testing project (InstallScript MSI).
The CA has been set as 'Deferred Execution in System Context' and is type of "Call a function in a Windows Installer dynamic-link library". It calls a funciton of my own dll (say 'MyDll.dll'). My dll function has following code to call the 3rd party dll function (CreatePrinter()):
...
_DPrimoAPIDLLPtr pPrimoAPI = 0;
....
HRESULT hErr = CoInitialize(0);
hErr = pPrimoAPI.CreateInstance(__uuidof(PrimoAPIDLL));
if (pPrimoAPI) {
pPrimoAPI->UserString = "some_string";
pPrimoAPI->LicenseKey = "some_key";
lErr = pPrimoAPI->CreatePrinter();
...
}
else
{
CatchErr(hErr);
}
...
CatchErr() indicates that the error number is '80040154', which means the com is not registered. If I manually register the 3rd party dll (regsvr32) before installation, the call to 'CreatePrinter()' works.
The similar way works on another product, which is Basic MSI, so the above code should be fine, thus the only problem is that IS failed to register the 3rd party dll. The 3rd party dll needs to be installed under the same drive of Windows, according to the experience of the other product.
Any help is greatly appreciated.
Thanks,
PB
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2009
12:23 PM
Where is this custom action sequenced? At the very earliest, it should be sequenced some point after PublishProduct.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 10, 2009
07:08 PM
Josh,
You are right, once puting the CAs after PublishProduct, everything works.
Thanks!
PB
You are right, once puting the CAs after PublishProduct, everything works.
Thanks!
PB
![](/skins/images/7674467D6278680F3FD526C8217C9173/responsive_peak/images/icon_anonymous_message.png)