The value of MyProperty is stored in szValueBuf.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anidil
Sent: Wednesday, January 30, 2008 6:03 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Help on MsiGetProperty()
I've created a wrapper custom action dll with MsiGetProperty().From what
i
see from MSDN,MsiGetProperty uses "MyProperty" as shown below;which is
used
by the custom action. Can anyone help me understand this part? Where
should
i get value for "MyProperty"?
from MSDN site on MsiGetProperty:
UINT __stdcall MyCustomAction(MSIHANDLE hInstall)
{
TCHAR* szValueBuf = NULL;
DWORD cchValueBuf = 0;
UINT uiStat = MsiGetProperty(hInstall, TEXT("MyProperty"),
TEXT(""),
&cchValueBuf);
if (ERROR_MORE_DATA == uiStat)
{
++cchValueBuf; // on output does not include terminating null,
so
add 1
szValueBuf = new TCHAR[cchValueBuf];
if (szValueBuf)
{
uiStat = MsiGetProperty(hInstall, TEXT("MyProperty"),
szValueBuf, &cchValueBuf);
}
}
if (ERROR_SUCCESS != uiStat)
{
if (szValueBuf != NULL)
delete [] szValueBuf;
return ERROR_INSTALL_FAILURE;
}
// custom action uses MyProperty
// ...
delete [] szValueBuf;
return ERROR_SUCCESS;
}
Thanks
Anidil
--
View this message in context:
http://www.nabble.com/Help-on-MsiGetProperty%28%29-tp15179290p15179290.h
tml
Sent from the wix-users mailing list archive at Nabble.com.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users