Rohan Shetty
2014-04-25 08:30:50 UTC
Hi,
I have the following code which adds the TSP into the "Phone/modem Options"
HMODULE hDLL = LoadLibrary("TAPI32.DLL");
if (hDLL)
{
LPFNADDPROVIDER pFunction = (LPFNADDPROVIDER)GetProcAddress(hDLL, "lineAddProvider");
if (pFunction)
{
DWORD dwPermanentProviderID;
//char lpszUIDLLName[] = "c:\\windows\\system32\\teles.tsp";
char lpszUIDLLName[] = "teles.tsp";
long lResult = (pFunction)(lpszUIDLLName, NULL, &dwPermanentProviderID);
printf("result=%x \r\n", lResult);
}
FreeLibrary(hDLL);
}
This works fine in most of the operating systems(XP, Win7, Vista).
But on Windows 8.1, I always get the error 0x80000048(LINEERR_OPERATIONFAILED) for the lineAddProvider.
I have also tried giving the complete path "c:\\windows\\system32\\teles.tsp", even this gives the same error.
Notes:
- It works fine when I do this from the user interface(i.e Phone and Modem Options -> Advanced -> Add).
Any help is appreciated.
Regards,
Rohan
I have the following code which adds the TSP into the "Phone/modem Options"
HMODULE hDLL = LoadLibrary("TAPI32.DLL");
if (hDLL)
{
LPFNADDPROVIDER pFunction = (LPFNADDPROVIDER)GetProcAddress(hDLL, "lineAddProvider");
if (pFunction)
{
DWORD dwPermanentProviderID;
//char lpszUIDLLName[] = "c:\\windows\\system32\\teles.tsp";
char lpszUIDLLName[] = "teles.tsp";
long lResult = (pFunction)(lpszUIDLLName, NULL, &dwPermanentProviderID);
printf("result=%x \r\n", lResult);
}
FreeLibrary(hDLL);
}
This works fine in most of the operating systems(XP, Win7, Vista).
But on Windows 8.1, I always get the error 0x80000048(LINEERR_OPERATIONFAILED) for the lineAddProvider.
I have also tried giving the complete path "c:\\windows\\system32\\teles.tsp", even this gives the same error.
Notes:
- It works fine when I do this from the user interface(i.e Phone and Modem Options -> Advanced -> Add).
Any help is appreciated.
Regards,
Rohan