Am Mittwoch, 9. Juli 2014 13:02:17 UTC+2 schrieb Rohan Shetty:
> RpcImpersonateClient() seems to be working fine if it is placed in the functions which are directly invoked by the TAPI application.
>
> For instance it works in TSPI_lineMakeCall
>
> I have implemented a thread, in which I would come to know the user switch(i.e WTSWaitSystemEvent), and during the user switch I would need to get some information about the "current user"
>
> In this thread if I call RpcImpersonateClient(), it always returns an error(1725 which means RPC_S_NO_CALL_ACTIVE).
>
> Question:
>
> So,I was thinking of the following solution
>
> - In the thread, I would invoke lpfnEventProc(which was passed to us as part of TSPI_lineOpen) along with some parameters, so that TAPI would invoke one of the functions say TSPI_lineGetLineDevStatus(and in I could write RpcImpersonateClient)
>
> I am not sure whether TSPI_lineGetLineDevStatus is the right function, may be you could suggest a proper one.
Rohan,
do I understand it correctly. you are already detecting logged on user changes from within your TSP and want to determine the new user?
For this you may wamt to try firing a LINE_LINEDEVSTATE(LINEDEVSTATE_REINIT) via TSPI.
And then do your RpcImpersonateClient() as usual.
--
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.