Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Get Company Name in a Custom DLL


1 reply to this topic

JamesMoore

JamesMoore
  • Members
  • 1 posts

Posted 08 October 2003 - 20:07

I want to validate the serial number on my install. I have working code in a DLL that will do this. However, I want to tie the serial number entered to the company name. The serial number to be used will be based in part on the company name entered. I see that there is a way to get properties using MsiGetProperty, but you need something called an MSIHANDLE. Is there a way to get this from in a DLL that normall accepts
(HWND hwnd, LPSTR sSRCDIR, LPSTR sSUPPORTDIR, LPSTR sSerialNumber, LPSTR sReserved) as parameters?

I've tried using GetWindowsText to get the text in the control but have not yet been successful.
Any help would be appreciated.

James

Neo

Neo
  • Members
  • 48 posts

Posted 12 November 2003 - 09:55

You will have to recode the dll to export a function with this signature.

UINT MyFunction(MSIHANDLE hInstall);

Windows Installer expects all its DLL custom actions to export functions with this signature. However, You can store the required parameters in appropriate MSI properties and call your the function from MyFunction(). As stated in the previous message, you can use the MsiGetProperty() function to get the values for these properties.

-Neo