You must always use the handle supplied to you from the entry point (custom
action function) into your DLL. Do not ever save it for a different entry
point, because it may not be valid in other calls or any time after code
returned back out the entry point it was supplied to you on. If you have
multi-threaded custom actions, they can't use that session handle after the
original thread returns out the original entry point.

The custom action library code in WiX saves the session handle, but that
only works with correct and rigorous use of the entry and exit
functions/macros in that library to respect the above rule.

-----Original Message-----
From: gapearce [mailto:mr_gapea...@yahoo.com] 
Sent: Wednesday, June 16, 2010 11:20 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Unable to log through DLL using MsiProcessMessage


I have a similar problem, and I see this message was ignored by the
community.  Maybe it is a stupid question?  I dunno - but I have the problem
too.

I noticed my MSIHANDLE is one ('1') before installation of the files.  AFter
the files are installed, the MSIHANDLE is eight ('8').

Before installing the files, I can log custom messages to the log file from
my DLL, no problem.  But after the files are installed, (just before exit
dialog), I can no longer log any messages.  The MSIHANDLE is eight, and the
result from MsiProcessMessage is zero - means no action taken.

Is the change of handle just a coincidence?  I tried using '1' for the
handle always (of course, just as a test), and it still doesn't work. 
Handle one must have been closed somewhere along the line.

Can someone please shed some light on this?
-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Unable-to-log-
through-DLL-using-MsiProcessMessage-tp709471p5187681.html
Sent from the wix-users mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to