Archive: Need help with System::Call Function


Need help with System::Call Function
Hello,

i need help with my installer. I have wrote an installer script for an TAPI Client Installation. My selfmade resolve of TAPI Registration is a little "BUGGY". I used Registry Commands for example. WriteRegDword, ReadRegDword etc. and copy the values in a ini File at the installation. If the user, uninstall the TAPI Client, the uninstaller read the values in the ini and del the Registry Entry on this Position. That´s works but only if the user doesn´t change manually the registry of TAPI Clients. And negative too, the user must restart his/her system for correctly working of the TAPI Client after Installation.
But i have founded two System Call Functions that i must include in my script for killing this BUG:mad:

System::Call 'tapi32::lineAddProvider'
http://msdn2.microsoft.com/en-us/library/ms893340.aspx

System::Call 'tapi32::lineRemoveProvider'

I have no idea in which way i must set the parameters that this Function work. i read all nsis.sourceforge topics but it was impossible for me to execute the call correctly. I´m stupid. Please help me.

Useful for helpers:
Windows-Registry-Path for Tapi-Providers

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Providers

Example installed ProviderFilename:
myTAPI.tsp - installed in $sysdir


It's a very simple call. Doesn't even use strucuts.

System::Call "tapi32::lineAddProvider(t '$SYSDIR\myTAPI.tsp', i $HWNDPARENT, *i r0)i.r1"
$0 will contain the provider identifier and $1 will contain the result. 0 in $1 means success. The removal call is pretty much the same, only the identifier parameter is not a pointer, so you don't need the asterisk.