I have a TSP developed under VS2005 running fine on 2000 and XP but I cannot
get it to install correctly under Windows Vista. It appears to add correctly
under Phone and Modem Options but I am unable to run any Tapi-enabled
applications while this TSP is installed and it often causes 'Windows Host
process' errors.
I believe I have narrowed down the problem to the TSPI_providerInit call
from the TapiSrv. The last few lines from my tracing output are as follows:
[5444] 17:58:11:869: [TRACE] Entering GetUIDllName
[5444] 17:58:11:869: [INFO ] Looking for provider...
[5444] 17:58:11:875: [TRACE] lineGetProviderList: exit, result=x0
[4620] 18:01:39:743: [TRACE] FreeDialogInstance: enter, pDlgInst=x01ED1358
[4620] 18:01:39:746: [INFO ] ServerInit: NumProviders=5
[4620] 18:01:39:746: [INFO ] ServerInit: ProviderFilename=Demo2.tsp
[4620] 18:01:39:747: [INFO ] ServerInit: G: Calling TSPI_providerInit
[4620] 18:01:39:748: [TRACE] ClientDetach: enter
[4620] 18:01:39:748: [TRACE] PCONTEXT_HANDLE_TYPE_rundown: enter
(ptClient=x01ED2D68)
[4620] 18:01:39:748: [TRACE] FreeDialogInstance: enter, pDlgInst=x00000000
[4620] 18:01:39:748: [TRACE] PCONTEXT_HANDLE_TYPE_rundown: exit
[4620] 18:01:39:748: [TRACE] ClientDetach: exit
Using DebugView I can see that the Service Provider constructor in my code
is run but the TSPI_providerInit is never called (neither is enumDevices).
Can anyone offer any suggestions?
Thanks Chris
Chris,
in Vista the Telephony Service is running under NetworkService account by
default,
in previous OS it was running in LocalSystem account.
NetworkService has limited privileges compared to LocalSystem, e.g. regarding
registry access to HKLM.
Does you TSP store data in HKLM or use any other LocalSystem related
privilege?
You may want to try to change the account for Telephony Service to LocalSystem
(the default on pre-Vista OS).
For this you need to run TAPISRV in exclusive mode, i.e. it has its own
SvcHost process,
otherwise changing the service account (e.g. via ServiceControlManager) will
fail since the other services sharing the SvcHost process that TAPISRV is
running in by default are using NetworkService account too and the accounts
can't be mixed in one SvcHost process.
The attached TAPISRV_exclusive_Mode_with_LocalSystem.reg file will do both:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TapiSrv]
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00
,\
74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
6b,00,20,00,74,00,61,00,70,00,69,00,73,00,72,00,76,00,00,00
"ObjectName"="LocalSystem"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost]
"tapisrv"=hex(7):54,00,61,00,70,00,69,00,73,00,72,00,76,00,00,00,00,00
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Please note that the answer in my TAPI and TSPI FAQ and the referenced Toto®
Tool TAPIex (Version 1, 0, 0, 2) are currently not fully compatible with Vista
(the current version is only intended for W2k, XP, and WS2k3):
Q: How can I run TAPISRV exclusively in a svchost process ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_How_can_6
Toto® Tool TAPIex
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm#_Toto®_Tool_TAPIex_1
I will update the FAQ und the tool with the Vista specific shared mode.
Thank you very much for your help with this. Your suggestion resolved my
issue.
I had actually read this section on your own site previously but for
whatever reason I hadn't been able to modify the registry settings to get the
service to run correctly under its own process. The registry changes you
provided did work however.
Thanks again.
Chris
Chris,
you are welcome.
> I had actually read this section on your own site previously but for
> whatever reason I hadn't been able to modify the registry settings to get
the
> service to run correctly under its own process. The registry changes you
> provided did work however.
Thanks for the feedback.