Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# default interface method? Pin
Mark McArthey3-Nov-09 6:43
Mark McArthey3-Nov-09 6:43 
GeneralRe: C# default interface method? Pin
Ghydo3-Nov-09 7:36
Ghydo3-Nov-09 7:36 
AnswerRe: C# default interface method? Pin
PIEBALDconsult3-Nov-09 7:40
mvePIEBALDconsult3-Nov-09 7:40 
AnswerRe: C# default interface method? Pin
Gerry Schmitz3-Nov-09 19:09
mveGerry Schmitz3-Nov-09 19:09 
QuestionIssue Launching UI Application from windows service in c# Windows Pin
platso_5883-Nov-09 3:46
platso_5883-Nov-09 3:46 
AnswerRe: Issue Launching UI Application from windows service in c# Windows Pin
Covean3-Nov-09 4:07
Covean3-Nov-09 4:07 
GeneralRe: Issue Launching UI Application from windows service in c# Windows Pin
platso_5883-Nov-09 20:16
platso_5883-Nov-09 20:16 
GeneralRe: Issue Launching UI Application from windows service in c# Windows Pin
Covean3-Nov-09 22:03
Covean3-Nov-09 22:03 
I would try the following way.

In your service handler function wait for the SERVICE_CONTROL_SESSIONCHANGE event.
(You have to say the system that your service wants this notification (SetServiceStatus with SERVICE_ACCEPT_SESSIONCHANGE)).
After you received the SERVICE_CONTROL_SESSIONCHANGE (WTS_SESSION_LOGON) event, get the users new session id from the WTSSESSION_NOTIFICATION structure and "save" it.

If you want to start the new process you have to do the following steps.
Use WTSQueryUserToken to get the primary access token. Now try to acquire TOKEN_QUERY, TOKEN_DUPLICATE, and TOKEN_ASSIGN_PRIMARY for this token by using SetTokenInformation.
Last Step: CreateProcessAsUser to start your process.

I'm short in time so I couldn't test it but I think this should do the work.

Greetings
Covean

GeneralRe: Issue Launching UI Application from windows service in c# Windows Pin
platso_5884-Nov-09 4:09
platso_5884-Nov-09 4:09 
GeneralRe: Issue Launching UI Application from windows service in c# Windows Pin
Covean4-Nov-09 5:19
Covean4-Nov-09 5:19 
QuestionPerformance Counter Instance Volatility Issues Pin
Last Attacker3-Nov-09 3:05
Last Attacker3-Nov-09 3:05 
Questionbasic understanding in c# threading. Pin
tomerb153-Nov-09 2:18
tomerb153-Nov-09 2:18 
AnswerRe: basic understanding in c# threading. PinPopular
Luc Pattyn3-Nov-09 2:24
sitebuilderLuc Pattyn3-Nov-09 2:24 
GeneralRe: basic understanding in c# threading. Pin
tomerb153-Nov-09 2:35
tomerb153-Nov-09 2:35 
GeneralRe: basic understanding in c# threading. Pin
Luc Pattyn3-Nov-09 4:36
sitebuilderLuc Pattyn3-Nov-09 4:36 
AnswerRe: basic understanding in c# threading. Pin
LimitedAtonement3-Nov-09 6:11
LimitedAtonement3-Nov-09 6:11 
QuestionExcel Chart(2007) data selection from c# Pin
leshu3-Nov-09 2:08
leshu3-Nov-09 2:08 
QuestionHow to Insert Data into database with SingleFunction in C# Pin
Phaneendra Varanasi3-Nov-09 1:36
Phaneendra Varanasi3-Nov-09 1:36 
AnswerRe: How to Insert Data into database with SingleFunction in C# Pin
dan!sh 3-Nov-09 1:42
professional dan!sh 3-Nov-09 1:42 
AnswerRe: How to Insert Data into database with SingleFunction in C# Pin
Md. Marufuzzaman3-Nov-09 3:24
professionalMd. Marufuzzaman3-Nov-09 3:24 
GeneralRe: How to Insert Data into database with SingleFunction in C# Pin
PIEBALDconsult3-Nov-09 3:57
mvePIEBALDconsult3-Nov-09 3:57 
GeneralRe: How to Insert Data into database with SingleFunction in C# Pin
Md. Marufuzzaman3-Nov-09 5:56
professionalMd. Marufuzzaman3-Nov-09 5:56 
AnswerRe: How to Insert Data into database with SingleFunction in C# Pin
PIEBALDconsult3-Nov-09 3:53
mvePIEBALDconsult3-Nov-09 3:53 
QuestionKnow when data has changed in SQL Server Pin
Rob Ormond3-Nov-09 1:24
Rob Ormond3-Nov-09 1:24 
AnswerRe: Know when data has changed in SQL Server Pin
dan!sh 3-Nov-09 1:35
professional dan!sh 3-Nov-09 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.