You don't want to use _T() because that would switch your strings to UNICODE if 
you build Unicode and the WcaLog expects char for the first string.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Simoneau
Sent: Thursday, April 26, 2007 11:59 AM
To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net
Subject: Re: [WiX-users] Logging in a custom action

That code looks the same as what I am using except that I have _T() around my 
strings.  Are you running your custom action immediate or deferred?

-Brian Simoneau
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 2:31 PM
To: Brian Simoneau; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action
Thanks for the continuing advice.  I'm still not seeing any log out put though. 
 I've commented out the guts of my CA, so now I have just:

extern "C" UINT __stdcall VerifyLicenseDir(MSIHANDLE hInstall)
{
      WcaInitialize(hInstall, "VerifyLicenseDir");
      WcaLog(LOGMSG_STANDARD, "Enter VerifyLicenseDir");
      return WcaFinalize(ERROR_SUCCESS);
}

MSI (c) (04:F4) [14:19:38:375]: Doing action: VerifyLicenseDir
MSI (c) (04:F4) [14:19:38:375]: Note: 1: 2205 2:  3: ActionText
Action 14:19:38: VerifyLicenseDir.
Action start 14:19:38: VerifyLicenseDir.
MSI (c) (04:C8) [14:19:38:390]: Invoking remote custom action. DLL: C:\... 
Entrypoint: VerifyLicenseDir
MSI (c) (04:C0) [14:19:38:390]: Cloaking enabled.
MSI (c) (04:C0) [14:19:38:390]: Attempting to enable all disabled priveleges 
before calling Install on Server
MSI (c) (04:C0) [14:19:38:390]: Connected to service for CA interface.
Action ended 14:19:38: VerifyLicenseDir. Return value 1.

Did I feed WcaInitialize a bad 2nd argument? I was guessing it was just going 
to be used as an identifier in the log output.
Do I need to call WcaGlobalInitialize/WcaGlobalFinalize in some way as well?

Thanks again for your help.  Google doesn't reveal much on this subject :(

________________________________
From: Brian Simoneau [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 26, 2007 1:58 PM
To: Rowland, Chris; WiX-users@lists.sourceforge.net
Subject: RE: [WiX-users] Logging in a custom action

You have to call WcaInitialize in your method before you can call WcaLog.  You 
also need to call WcaFinalize before you exit the method.  So your last line 
could look something like:
return WcaFinalize(ERROR_SUCCESS);

-Brian Simonea
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to