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
- :
- Custom Action #1 returned 3
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
‎Jan 25, 2009
11:27 AM
Custom Action #1 returned 3
I've developed in C++ a DLL that has one exported function.
I've also tested it using a C++ client. It worked.
The prototype of the function is as follows:
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport) unsigned int __stdcall MyFunc(unsigned long hInstall);
#ifdef __cplusplus
}
#endif
I also added EXPORT tag to the linker ( /EXPORT:"MyFunc" ).
I tried to run it during installation (CustomAction #1), but it failed with error 3 (I think that Windows Installer called ::LoadLibrary(), and that call returned error 3 (The system cannot find the path specified.) ).
How can that be?
I've also tested it using a C++ client. It worked.
The prototype of the function is as follows:
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport) unsigned int __stdcall MyFunc(unsigned long hInstall);
#ifdef __cplusplus
}
#endif
I also added EXPORT tag to the linker ( /EXPORT:"MyFunc" ).
I tried to run it during installation (CustomAction #1), but it failed with error 3 (I think that Windows Installer called ::LoadLibrary(), and that call returned error 3 (The system cannot find the path specified.) ).
How can that be?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2009
11:36 AM
What are the action settings? Does performing MSI validation post-build tell you anything? (For example, a DLL action of type "installed with the product" won't work if called before InstallFiles in deferred mode.) If you run, say, Dependency Walker on the DLL, is your function exported?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2009
03:23 AM
This DLL is stored in Binary Table, not installed with the product.
Validation didn't complain about this file.
Validation didn't complain about this file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2009
04:08 AM
I got it!
The dll depends on another dll - when I MANUALLY put the second dll in C:\Windows\System32, the installation works.
Of cource I need a better solusion than putting the dll on the machine before the installation. I'll continue from here.
Thanks.
The dll depends on another dll - when I MANUALLY put the second dll in C:\Windows\System32, the installation works.
Of cource I need a better solusion than putting the dll on the machine before the installation. I'll continue from here.
Thanks.
