I am developing a virtual printer driver which run from spooler
service of window, now in vista all services are run under session 0
thats why they are not support User interface or even message box
from
service.
i need to prompt message box from my virtual printer driver for that
i
also try to implement WTSsendMessage function but this function is
not
available in DDK thats why i cant compile my code,
After that i try to use CreateProcessAsUser while using this
function
i use OpenProcessToken function this process token function is failed
in my application so how can i use openprocesstoken in DDK
application.
Here code for openprocesstoken function::
HANDLE hToken;
ret = OpenProcessToken((HANDLE)GetCurrentProcess(),TOKEN _DUPLICATE |
TOKEN_ASSIGN_PRIMARY | TOKEN_QUERY , &hToken);
function fail with getlasterror 0.
i dont know why this function fail in my application..
or else there is any other way from which i prompt messagebox from
service.
Does anyone have idea or sugestions on the above described issue ?
Any comments are welcome.
|