Summary
Previous versions of InstallShield did not require pchValueBuf to be set in order for the szValueBuf to return a value correctly. The value of pchValueBuf would automatically be set to the correct length of the Property being returned. However in InstallShield 2012 pchValueBuf must be set to a value before calling MsiGetProperty or else an empty string will be returned for szValueBuf.Synopsis
Below is the help information for the MsiGetProperty() function:
C++UINT MsiGetProperty(
__in MSIHANDLE hInstall,
__in LPCTSTR szName,
__out LPTSTR szValueBuf,
__inout DWORD *pchValueBuf
);
Parameters
- hInstall [in]
-
Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
- szName [in]
-
A null-terminated string that specifies the name of the property.
- szValueBuf [out]
-
Pointer to the buffer that receives the null terminated string containing the value of the property. Do not attempt to determine the size of the buffer by passing in a null (value=0) for szValueBuf. You can get the size of the buffer by passing in an empty string (for example ""). The function will then return ERROR_MORE_DATA and pchValueBuf will contain the required buffer size in TCHARs, not including the terminating null character. On return of ERROR_SUCCESS, pcchValueBuf contains the number of TCHARs written to the buffer, not including the terminating null character.
- pchValueBuf [in, out]
-
Pointer to the variable that specifies the size, in TCHARs, of the buffer pointed to by the variable szValueBuf. When the function returns ERROR_SUCCESS, this variable contains the size of the data copied to szValueBuf, not including the terminating null character. If szValueBuf is not not large enough, the function returns ERROR_MORE_DATA and stores the required size, not including the terminating null character, in the variable pointed to by pchValueBuf.
Discussion
Related Articles
Usage Intelligence - Notice for Change in CSV Archive Format 6Number of Views How To Export Disk Usage by Top Tables 88Number of Views Usage Intelligence - Front End Change Log 26Number of Views Is it possible to change the attribute for terminal server usage with FlexNet Opeations 2016 On-Premises? 4Number of Views FlexNet Code Insight Problems copying SCM (SVN) workspace with Complete Project Copy function in GUI 5Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago