Rohan Shetty
2014-07-09 11:02:17 UTC
Hi,
Even I wanted to support user based tsp, and after going through couple of articles I have found that RpcImpersonateClient() is the only way to get the "current loggedin user"
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.
Or is there some function which would be called by the TAPI application in regular intervals?
Experts, can you please help with the above?
Regards,
Rohan
Even I wanted to support user based tsp, and after going through couple of articles I have found that RpcImpersonateClient() is the only way to get the "current loggedin user"
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.
Or is there some function which would be called by the TAPI application in regular intervals?
Experts, can you please help with the above?
Regards,
Rohan