Note that on Vista files in the same directory WON'T be found.  Just spent a 
few weeks hunting this one down.  If you want to make this work you can switch 
to delay loading your dll, hooking notifications, and adding the proper 
directory to the path when you're notified of the pending load.

For full details on the delay load mechanism see Jeffrey Richter's article in 
MSJ, December 1998.  "Win32 Q&A"  
http://www.microsoft.com/msj/1298/win32/win321298.aspx

What I did was (under the dliNotePreLoadLibrary notification):

1. Call ::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, 
L"*CURRENTDLLNAMEHERE*", &moduleHandle)
2. Call ::GetModuleFileName() on the handle to get the full filename of the 
currently running dll
3. Call ::PathRemoveFileSpec() to take the filename off of the path.
4. Call ::SetDllDirectory() to add the path to dll directory search

Step 4 ONLY works on XP Sp1 or higher, so you'll need to load the dll yourself 
if you need to go lower than that.

-Jeremy


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Arnson
Sent: Monday, October 30, 2006 7:50 AM
To: Rafael Rivera Jr.
Cc: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Custom Action Type 17 (DLL, C++) Path?

Rafael Rivera Jr. wrote:
> Is there a way to explicitly specify the path in which my Custom Action
> Type 17 action runs in? It has a dependency on a library at init.
> (imported) and cannot find it (Filemon shows it searching my PATH).
>

No, just files in the path that are present at the time the CA runs. A
type 17 CA should also have access to files in the same directory.

--
sig://boB
http://bobs.org



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to