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

C#

 
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 
GeneralClickity Pin
Colin Angus Mackay21-Jan-04 13:38
Colin Angus Mackay21-Jan-04 13:38 
GeneralRe: Yet another C# Quiz Pin
Colin Angus Mackay21-Jan-04 13:49
Colin Angus Mackay21-Jan-04 13:49 
GeneralRe: Yet another C# Quiz Pin
5.5 cents21-Jan-04 14:05
suss5.5 cents21-Jan-04 14:05 
GeneralRe: Yet another C# Quiz Pin
Heath Stewart21-Jan-04 17:36
protectorHeath Stewart21-Jan-04 17:36 
GeneralRe: Yet another C# Quiz Pin
5.5 cents25-Jan-04 17:52
suss5.5 cents25-Jan-04 17:52 
Generalobj/<name>.pdb problems Pin
Arch Stanton21-Jan-04 13:01
Arch Stanton21-Jan-04 13:01 
GeneralRe: obj/<name>.pdb problems Pin
LongRange.Shooter22-Jan-04 9:19
LongRange.Shooter22-Jan-04 9:19 
GeneralRe: obj/<name>.pdb problems Pin
Arch Stanton22-Jan-04 14:13
Arch Stanton22-Jan-04 14:13 
Generalbackground program to capture a key press Pin
mikemilano21-Jan-04 11:51
mikemilano21-Jan-04 11:51 
GeneralRe: background program to capture a key press Pin
Heath Stewart21-Jan-04 17:32
protectorHeath Stewart21-Jan-04 17:32 
GeneralLooking for IT Professionals on H1B Visa Transfer/Faster GreenCard Processing Pin
Keith_00221-Jan-04 10:39
Keith_00221-Jan-04 10:39 
GeneralInternationalization in C# Pin
Member 16792721-Jan-04 10:29
Member 16792721-Jan-04 10:29 
GeneralRe: Internationalization in C# Pin
Heath Stewart21-Jan-04 11:16
protectorHeath Stewart21-Jan-04 11:16 
GeneralReferencing a control Pin
Daniel Negron21-Jan-04 10:25
Daniel Negron21-Jan-04 10:25 
GeneralRe: Referencing a control Pin
Heath Stewart21-Jan-04 11:08
protectorHeath Stewart21-Jan-04 11:08 

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.