Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
GeneralDeferred Calculations Pin
BernardYardley22-Jan-04 3:36
BernardYardley22-Jan-04 3:36 
GeneralRe: Deferred Calculations Pin
Heath Stewart22-Jan-04 5:01
protectorHeath Stewart22-Jan-04 5:01 
GeneralRe: Deferred Calculations Pin
BernardYardley22-Jan-04 5:08
BernardYardley22-Jan-04 5:08 
GeneralRe: Deferred Calculations Pin
leppie22-Jan-04 6:21
leppie22-Jan-04 6:21 
General2 questions Pin
bouli22-Jan-04 2:41
bouli22-Jan-04 2:41 
GeneralRe: 2 questions Pin
Sune Trudslev22-Jan-04 4:25
professionalSune Trudslev22-Jan-04 4:25 
GeneralRe: 2 questions Pin
Heath Stewart22-Jan-04 4:54
protectorHeath Stewart22-Jan-04 4:54 
GeneralRe: 2 questions Pin
bouli22-Jan-04 5:32
bouli22-Jan-04 5:32 
GeneralProperly accessing ShDocVw interfaces... Pin
profoundwhispers22-Jan-04 0:57
profoundwhispers22-Jan-04 0:57 
GeneralRe: Properly accessing ShDocVw interfaces... Pin
Heath Stewart22-Jan-04 4:49
protectorHeath Stewart22-Jan-04 4:49 
QuestionHow to display copyright sign (c in small circle,©) in Label control? Pin
god4k21-Jan-04 22:35
god4k21-Jan-04 22:35 
AnswerRe: How to display copyright sign (c in small circle,©) in Label control? Pin
Sune Trudslev22-Jan-04 0:35
professionalSune Trudslev22-Jan-04 0:35 
GeneralRe: How to display copyright sign (c in small circle,©) in Label control? Pin
leppie22-Jan-04 6:23
leppie22-Jan-04 6:23 
AnswerRe: How to display copyright sign (c in small circle,©) in Label control? Pin
Heath Stewart22-Jan-04 4:40
protectorHeath Stewart22-Jan-04 4:40 
GeneralRe: How to display copyright sign (c in small circle,©) in Label control? Pin
Bo Hunter22-Jan-04 12:31
Bo Hunter22-Jan-04 12:31 
GeneralRe: How to display copyright sign (c in small circle,©) in Label control? Pin
Heath Stewart22-Jan-04 12:44
protectorHeath Stewart22-Jan-04 12:44 
GeneralRe: How to display copyright sign (c in small circle,©) in Label control? Pin
Bo Hunter22-Jan-04 15:57
Bo Hunter22-Jan-04 15:57 
GeneralWinForms DataGrid data display limit Pin
Rakesh Rajan21-Jan-04 18:11
Rakesh Rajan21-Jan-04 18:11 
GeneralRe: WinForms DataGrid data display limit Pin
Heath Stewart21-Jan-04 18:51
protectorHeath Stewart21-Jan-04 18:51 
GeneralRender HTML Pin
Shaun Becker21-Jan-04 15:10
Shaun Becker21-Jan-04 15:10 
GeneralRe: Render HTML Pin
Nick Parker21-Jan-04 17:20
protectorNick Parker21-Jan-04 17:20 
GeneralProcess Owner and Parent Pin
jparsons21-Jan-04 13:34
jparsons21-Jan-04 13:34 
GeneralRe: Process Owner and Parent Pin
Heath Stewart21-Jan-04 18:34
protectorHeath Stewart21-Jan-04 18:34 
One way ( without digging into the debugging APIs Eek! | :eek: ) is to P/Invoke the native functions in the following order: OpenProcessToken, GetTokenInformation, then LookupAccountName. You pass Process.Handle to OpenProcessToken to get an access token. You then get a TOKEN_USER struct by calling GetTokenInformation. Finally, use the SID parameter from TOKEN_USER and call LookupAccountName. This also seems to be partly what taskmgr.exe and tasklist.exe (in Windows XP) are doing. There is actually only tree functions you have to P/Invoke and only a couple structs you have to redefine.

I'm sorry that I couldn't find a way to get the parent process ID. In fact, I couldn't find anything common that does on Windows, not to say it isn't possible.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Process Owner and Parent Pin
Jose Fco Bonnin21-Jan-04 23:34
Jose Fco Bonnin21-Jan-04 23:34 
GeneralYet another C# Quiz Pin
5.5 cents21-Jan-04 13:04
suss5.5 cents21-Jan-04 13:04 

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.