Right, but your code example doesn't say what you set the value of cchValueBuf to. Is it in fact zero?
Phil Wilson ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 1:06 PM To: Wilson, Phil; wix-users@lists.sourceforge.net Subject: RE: [WiX-users] Crash in MsiGetProperty call (did not closeMSIHANDLEs) I'm using the technique shown here http://msdn2.microsoft.com/En-US/library/aa370134.aspx to dynamically determine the size of the buffer required. I just removed the rest of the code because it doesn't make it that far. I've used this technique in the past with no problem. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wilson, Phil Sent: Thursday, August 02, 2007 3:58 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Crash in MsiGetProperty call (did not closeMSIHANDLEs) There's supposed to be an output buffer as the 3rd parameter whose length is cchValueBuf..... Phil Wilson ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, August 02, 2007 12:38 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Crash in MsiGetProperty call (did not close MSIHANDLEs) I'm having a problem where it appears that my custom action is terminating during a MsiGetProperty call. Hopefully someone could provide some insight into the issue. I've simplified reproducing the problem to this /* Get the Installation directory from the installer ************************/ WcaLog(LOGMSG_STANDARD, "Get TARGETDIR"); TCHAR* installDirBuf = NULL; uiStat = MsiGetProperty(hInstall, TEXT("TARGETDIR"), TEXT(""), &cchValueBuf); return WcaFinalize(ERROR_SUCCESS); With the return before the call to MsiGetProperty, the install completes without issue. With the return following the MsiGetProperty call, I get the following error in the log. DEBUG: Error 2769: Custom Action AddToPaths did not close 1 MSIHANDLEs. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: AddToPaths, 1, Action ended 15:14:15: AddToPaths. Return value 3. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users