|
TSP issue on system startup
|
|
|
|
 |
|
|
|
06.11.2008 03:17 |
Goms.cool@gmail.com |
Hello,
My TSP accesses registry to get the details of the configuration. To access the proper registry, I am trying to retrieve the session ID of the user and then retrieve the other details. To get the session ID, for XP OS, I am enumerating all the processes and trying to find the "explorer.exe". But when I reboot the PC, the PC hangs for some time and then starts properly. The issue is with my TSP, without the TSP everything works fine. When the PC starts up, telephony services will start initializing before explorer.exe starts up. Hence my TSP couldnt find the explorer.exe and behaves wrongly. Is there anyway to solve this problem?
Please help me to solve this issue.
Regards, Gomathy |
 |
|
|
|
|
06.11.2008 12:59 |
Andreas Marschall [MVP TAPI] |
schrieb im Newsbeitrag news:e7fd8492-9fb4-495a-a6d8-e2abba6859b1@t39g2000prh.googlegroups.com... > My TSP accesses registry to get the details of the > configuration. To access the proper registry, I am trying to retrieve > the session ID of the user and then retrieve the other details. To get > the session ID, for XP OS, I am enumerating all the processes and > trying to find the "explorer.exe". But when I reboot the PC, the PC > hangs for some time and then starts properly. The issue is with my > TSP, without the TSP everything works fine. > When the PC starts up, telephony services will start > initializing before explorer.exe starts up. Hence my TSP couldnt find > the explorer.exe and behaves wrongly. Is there anyway to solve this > problem?
Gomathy, a TSP is required to operate correctly even if no user is currently logged on, e.g. when TAPISRV is starting up at boot time due automatic startup mode for telephony service. So making a TSP dependant on a currently logged on user isn't a good idea at all.
If you absolutely reqire this, then you need to special handle this scenario within your TSP, e.g. by deferring the access to HKEY_CURRENT_USER since a user has actually logged on. Of course your TSP may not block TAPISRV in any way!
BTW here is a discussion on how to get access to the currently logged on user's resources: http://groups.google.com/group/microsoft.public.win32.programmer.tapi/browse_thread/thread/53f7ed3d06b27ecd/d2fa1dc83540dfb0?hl=en&lnk=gst&q=RegOpenCurrentUser#d2fa1dc83540dfb0
-- Best Regards Andreas Marschall Microsoft MVP for TAPI / Windows SDK / Visual C++ 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.
|
 |
|
|
|
|
06.11.2008 16:27 |
Matthias Moetje [MVP] |
Andreas and Gomathy,
just at this moment while I'm reading, a much better method comes to my mind. This is based on the TAPI method for displaying a dialog within the TAPI application. You can send LINE_CREATEDIALOGINSTANCE from within your TSP. As a result TAPI will call TUISPI_providerGenericDialog in your TSP UI dll, but from within the process of the TAPI application(!!!). You do not need to actually create a dialog, you can just use this mechanism to communicate with something running in the process space of the user.
You can transmit data blocks from your TSP to the UI dll and vice versa (through TUISPIDLLCALLBACK).
With this mechanism you should be able to discover all information about the user's session in a supported and safe way.
"Andreas Marschall [MVP TAPI]" wrote in message news:ez35FdAQJHA.584@TK2MSFTNGP06.phx.gbl... > schrieb im Newsbeitrag > news:e7fd8492-9fb4-495a-a6d8-e2abba6859b1@t39g2000prh.googlegroups.com... >> My TSP accesses registry to get the details of the >> configuration. To access the proper registry, I am trying to retrieve >> the session ID of the user and then retrieve the other details. To get >> the session ID, for XP OS, I am enumerating all the processes and >> trying to find the "explorer.exe". But when I reboot the PC, the PC >> hangs for some time and then starts properly. The issue is with my >> TSP, without the TSP everything works fine. >> When the PC starts up, telephony services will start >> initializing before explorer.exe starts up. Hence my TSP couldnt find >> the explorer.exe and behaves wrongly. Is there anyway to solve this >> problem? > > Gomathy, > a TSP is required to operate correctly even if no user is currently logged > on, > e.g. when TAPISRV is starting up at boot time due automatic startup mode > for > telephony service. > So making a TSP dependant on a currently logged on user isn't a good idea > at > all. > > If you absolutely reqire this, then you need to special handle this > scenario > within your TSP, > e.g. by deferring the access to HKEY_CURRENT_USER since a user has > actually > logged on. > Of course your TSP may not block TAPISRV in any way! > > BTW here is a discussion on how to get access to the currently logged on > user's resources: > http://groups.google.com/group/microsoft.public.win32.programmer.tapi/browse_thread/thread/53f7ed3d06b27ecd/d2fa1dc83540dfb0?hl=en&lnk=gst&q=RegOpenCurrentUser#d2fa1dc83540dfb0 > > -- > Best Regards > Andreas Marschall > Microsoft MVP for TAPI / Windows SDK / Visual C++ > 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. > > >
|
 |
|
|
|
|
07.11.2008 03:08 |
Goms.cool@gmail.com |
On Nov 6, 8:27=A0pm, "Matthias Moetje [MVP]" wrote: > Andreas and Gomathy, > > just at this moment while I'm reading, a much better method comes to > my mind. This is based on the TAPI method for displaying a dialog > within the TAPI application. You can send LINE_CREATEDIALOGINSTANCE > from within your TSP. As a result TAPI will call > TUISPI_providerGenericDialog > in your TSP UI dll, but from within the process of the TAPI > application(!!!). > You do not need to actually create a dialog, you can just use this mechan= ism > to communicate with something running in the process space of the user. > > You can transmit data blocks from your TSP to the UI dll and vice versa > (through TUISPIDLLCALLBACK). > > With this mechanism you should be able to discover all information about > the user's session in a supported and safe way. > > "Andreas Marschall [MVP TAPI]" wrote in > messagenews:ez35FdAQJHA.584@TK2MSFTNGP06.phx.gbl... > > > > > schrieb im Newsbeitrag > >news:e7fd8492-9fb4-495a-a6d8-e2abba6859b1@t39g2000prh.googlegroups.com..= .. > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 My TSP accesses registry to get the detail= s of the > >> configuration. To access the proper registry, I am trying to retrieve > >> the session ID of the user and then retrieve the other details. To get > >> the session ID, for XP OS, I am enumerating all the processes and > >> trying to find the "explorer.exe". But when I reboot the PC, the PC > >> hangs for some time and then starts properly. The issue is with my > >> TSP, without the TSP everything works fine. > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0When the PC starts up, telephony servic= es will start > >> initializing before explorer.exe starts up. Hence my TSP couldnt find > >> the explorer.exe and behaves wrongly. Is there anyway to solve this > >> problem? > > > Gomathy, > > a TSP is required to operate correctly even if no user is currently log= ged > > on, > > e.g. when TAPISRV is starting up at boot time due automatic startup mod= e > > for > > telephony service. > > So making a TSP dependant on a currently logged on user isn't a good id= ea > > at > > all. > > > If you absolutely reqire this, then you need to special handle this > > scenario > > within your TSP, > > e.g. by deferring the access to HKEY_CURRENT_USER since a user has > > actually > > logged on. > > Of course your TSP may not block TAPISRV in any way! > > > BTW here is a discussion on how to get access to the currently logged o= n > > user's resources: > >http://groups.google.com/group/microsoft.public.win32.programmer.tapi... > > > -- > > Best Regards > > Andreas Marschall > > Microsoft MVP for TAPI / Windows SDK / Visual C++ > > 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=AE 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. =A0Private mail is usually not replied t= o. > > * This posting is provided "AS IS" with no warranties, and confers no > > rights.- Hide quoted text - > > - Show quoted text -
Hi Andreas and Matthias, Thank u so much for your response. The API RPCImpersonate Client returns error 1725. I donno how to implement ImpersonateLoggedOnUser() function also. I need to access the current user account in the registry. I am not able to understand Matthias idea too... :( Any code snippet available? Please help me to solve this issue.
Thanks & Regards, Gomathy |
 |
|
|
|
|
07.11.2008 18:07 |
Matthias Moetje [MVP] |
Gomathy,
> I am not able to understand Matthias idea too... :(
You should read the TAPI docs on the functions and messages I posted, first. Then, tell me what exactly you don't understand.
Best regards,
Matthias Moetje ------------------------------------- TAPI WIKI: http://www.tapi.info ------------------------------------- TERASENS GmbH Augustenstraße 24 80333 Munich, GERMANY ------------------------------------- e-mail: moetje at terasens dot com www: www.terasens.com -------------------------------------
|
 |
|
|
|
|
09.11.2008 04:00 |
Andreas Marschall [MVP TAPI] |
schrieb im Newsbeitrag news:3e073ec4-31f2-4107-baf6-f598a6102904@d36g2000prf.googlegroups.com... > Hi Andreas and Matthias, > Thank u so much for your response. The API RPCImpersonate > Client returns error 1725. I donno how to implement > ImpersonateLoggedOnUser() function also. > I need to access the current user account in the registry.
Gomathy, you are welcome.
Here is (simplified) code snippet (without error handling) that works in one of my TSP:
RpcImpersonateClient(0); HKEY hHKCUkeyBase = NULL; RegOpenCurrentUser(KEY_QUERY_VALUE, &hHKCUkeyBase); HKEY hHKCUkey = NULL; RegOpenKeyEx(hHKCUkeyBase, "Software\\Gomathy\\TSP", 0, KEY_QUERY_VALUE, &hHKCUkey); // now you can RegQueryValueEx() as required RegCloseKey(hHKCUkey); RegCloseKey(hHKCUkeyBase); RpcRevertToSelfEx(0);
-- Best Regards Andreas Marschall Microsoft MVP for TAPI / Windows SDK / Visual C++ 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.
|
 |
|
|
|
|
09.11.2008 20:05 |
Goms.cool@gmail.com |
On Nov 9, 8:00=A0am, "Andreas Marschall [MVP TAPI]" B-A-M.de> wrote: > schrieb im Newsbeitragnews:3e073ec4-31f2-4107-baf6-= f598a6102904@d36g2000prf.googlegroups.com... > > > Hi Andreas and Matthias, > > =A0 =A0 =A0 =A0 =A0Thank u so much for your response. The API RPCImpers= onate > > Client returns error 1725. I donno how to implement > > ImpersonateLoggedOnUser() function also. > > I need to access the current user account in the registry. > > Gomathy, you are welcome. > > Here is (simplified) code snippet (without error handling) that works in = one > of my TSP: > > RpcImpersonateClient(0); > HKEY hHKCUkeyBase =3D NULL; > RegOpenCurrentUser(KEY_QUERY_VALUE, &hHKCUkeyBase); > HKEY hHKCUkey =3D NULL; > RegOpenKeyEx(hHKCUkeyBase, "Software\\Gomathy\\TSP", 0, KEY_QUERY_VALUE, > &hHKCUkey); > // now you can RegQueryValueEx() as required > RegCloseKey(hHKCUkey); > RegCloseKey(hHKCUkeyBase); > RpcRevertToSelfEx(0); > > -- > Best Regards > Andreas Marschall > Microsoft MVP for TAPI / Windows SDK / Visual C++ > TAPI / TSP Developer and Tester > My TAPI and TSPI FAQ:http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_T= SPI_FAQ.htm > My Toto=AE 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/TAP= IaroundTheWorld > * Please post all messages and replies to the newsgroup so all may > * benefit from the discussion. =A0Private mail is usually not replied to. > * This posting is provided "AS IS" with no warranties, and confers no rig= hts.
Hi Andreas,
I tried calling RpcImpersonateClient(0), but it returns error 1725. How can I solve this error? :(
Regards, Gomathy |
 |
|
|
|
|
12.11.2008 04:10 |
Goms.cool@gmail.com |
On Nov 10, 9:05=A0am, Goms.c...@gmail.com wrote: > On Nov 9, 8:00=A0am, "Andreas Marschall [MVP TAPI]" > > > > > > B-A-M.de> wrote: > > schrieb im Newsbeitragnews:3e073ec4-31f2-4107-baf= 6-f598a6102904@d36g2000prf.googlegroups.com... > > > > Hi Andreas and Matthias, > > > =A0 =A0 =A0 =A0 =A0Thank u so much for your response. The API RPCImpe= rsonate > > > Client returns error 1725. I donno how to implement > > > ImpersonateLoggedOnUser() function also. > > > I need to access the current user account in the registry. > > > Gomathy, you are welcome. > > > Here is (simplified) code snippet (without error handling) that works i= n one > > of my TSP: > > > RpcImpersonateClient(0); > > HKEY hHKCUkeyBase =3D NULL; > > RegOpenCurrentUser(KEY_QUERY_VALUE, &hHKCUkeyBase); > > HKEY hHKCUkey =3D NULL; > > RegOpenKeyEx(hHKCUkeyBase, "Software\\Gomathy\\TSP", 0, KEY_QUERY_VALUE= , > > &hHKCUkey); > > // now you can RegQueryValueEx() as required > > RegCloseKey(hHKCUkey); > > RegCloseKey(hHKCUkeyBase); > > RpcRevertToSelfEx(0); > > > -- > > Best Regards > > Andreas Marschall > > Microsoft MVP for TAPI / Windows SDK / Visual C++ > > 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=AE 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/T= APIaroundTheWorld > > * Please post all messages and replies to the newsgroup so all may > > * benefit from the discussion. =A0Private mail is usually not replied t= o. > > * This posting is provided "AS IS" with no warranties, and confers no r= ights. > > Hi Andreas, > > I tried calling RpcImpersonateClient(0), but it returns error 1725. > How can I solve this error? :( > > Regards, > Gomathy- Hide quoted text - > > - Show quoted text -
Hi Andreas,
Is that possible to call RpcImpersonateClient(0) in Win XP PC? I dont have any server client mechanism here. If I call the function to which user will it get impersonated? I m trying to call this when I start my communication thread. Is that the right place to call. I m still getting the error 1725.
Thanks & Regards, Gomathy |
 |
|
|
|
|
12.11.2008 13:15 |
Andreas Marschall [MVP TAPI] |
schrieb im Newsbeitrag news:5045bd9f-1a43-47db-844d-60c1a4485cad@d10g2000pra.googlegroups.com... > Is that possible to call RpcImpersonateClient(0) in Win XP PC? > I dont have any server client mechanism here. If I call the function > to which user will it get impersonated? I m trying to call this when I > start my communication thread. Is that the right place to call. I m > still getting the error 1725.
Gomathy, yes it is. I've done this successfully in a TSP created with JulMar TSP++ V3 on XP/SP2.
-- Best Regards Andreas Marschall Microsoft MVP for TAPI / Windows SDK / Visual C++ 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.
|
 |
|
|
|
|
13.11.2008 03:25 |
Goms.cool@gmail.com |
On Nov 12, 5:15=A0pm, "Andreas Marschall [MVP TAPI]" wrote: > schrieb im Newsbeitragnews:5045bd9f-1a43-47db-844d-= 60c1a4485cad@d10g2000pra.googlegroups.com... > > > =A0 =A0 =A0 Is that possible to call RpcImpersonateClient(0) in Win XP = PC? > > I dont have any server client mechanism here. If I call the function > > to which user will it get impersonated? I m trying to call this when I > > start my communication thread. Is that the right place to call. I m > > still getting the error 1725. > > Gomathy, > yes it is. > I've done this successfully in a TSP created with JulMar TSP++ V3 on XP/S= P2. > > -- > Best Regards > Andreas Marschall > Microsoft MVP for TAPI / Windows SDK / Visual C++ > TAPI / TSP Developer and Tester > My TAPI and TSPI FAQ:http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_T= SPI_FAQ.htm > My Toto=AE 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/TAP= IaroundTheWorld > * Please post all messages and replies to the newsgroup so all may > * benefit from the discussion. =A0Private mail is usually not replied to. > * This posting is provided "AS IS" with no warranties, and confers no rig= hts.
Hi Matthias, I am trying to send the LINE_CREATEDIALOGINSTANCE message to the TAPI to handle the event. I have some doubts in implementing this. My TSP has a UI dll, and I m trying to use the same for this. The implementation of TUISPI_providerConfig() contains the Dll call back to the TSPI_providerGenericDialogData(). As per your explanation, the message will call the TSPI_providerGenericDialogData() function. While clicking on the configure button in control panel, the flow is like, first TUISPI_providerConfig() and then TSPI_providerGenericDialogData (). Is this the same order when I send this message?
Thanks & Regards, Gomathy |
 |
|
|
|
|
14.11.2008 00:35 |
Matthias Moetje [MVP] |
Gomathy,
I am trying to send the LINE_CREATEDIALOGINSTANCE message to the TAPI to handle the event. I have some doubts in implementing this. My TSP has a UI dll, and I m trying to use the same for this. The implementation of TUISPI_providerConfig() contains the Dll call back to the TSPI_providerGenericDialogData(). As per your explanation, the message will call the TSPI_providerGenericDialogData() function. While clicking on the configure button in control panel, the flow is like, first TUISPI_providerConfig() and then TSPI_providerGenericDialogData (). Is this the same order when I send this message?
No. When you send LINE_CREATEDIALOGINSTANCE in your TSP, then the
TUISPI_providerGenericDialog
function is called.
TUISPI_providerGenericDialogData
is a completely different thing. It's for exchanging data with the TSP.
Best regards,
Matthias Moetje ------------------------------------- TAPI WIKI: http://www.tapi.info ------------------------------------- TERASENS GmbH Augustenstraße 24 80333 Munich, GERMANY ------------------------------------- e-mail: moetje at terasens dot com www: www.terasens.com -------------------------------------
|
 |
|
|
| | |