Using the TSAPI SDK
190 Installation Guide
Figure 8-8: Sample Code
prototype INSTTSDR.installTelephonyServicesDriver
(BYREF STRING, NUMBER);
InstallAsTserverDriver:
// Add the driver.dll to the tservers registry entry
// as a driver and have it auto loaded when
// Tserver restarts.
nRc = UseDLL(WINSYSDIR^"INSTTSDR.DLL");
if (nRc < 0) then
// Couldn't load the insttsdr dll...
// Tserver probably wasn't installed...
SprintfBox(WARNING, "Install Problem",
"Installation was unable to enter the driver.dll "+
"in the Telephony Services list of drivers "+
"(Possibly because the Telephony Services "+
"product is not installed yet). "+
"You will have to perform this function manually "+
"through the Telephony Services Administrator "+
"application.");
else
svDriverName = "driver.dll";
nRc = installTelephonyServicesDriver
(svDriverName,TSDR_AUTOLOAD);
// Only put up the warning if it wasn't success
// and it wasn't a duplicate entry.
if (nRc < TSDR_DUPLICATE) then
SprintfBox( WARNING, "Install Problem",
"Installation was unable to enter the driver.dll "+
"in the Telephony Services list of drivers "+
"(Possibly because the Telephony Services product"+
"is not installed yet). "+
"You will have to perform this function "+
"manually through the Telephony Services "+
"Administrator application.");
endif;
UnUseDLL(WINSYSDIR^"INSTTSDR.DLL");
endif;