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

C#

 
GeneralRe: Auto-updater? Pin
floydboy5818-Sep-02 2:01
floydboy5818-Sep-02 2:01 
GeneralRe: Auto-updater? Pin
Philip Fitzsimons18-Sep-02 3:19
Philip Fitzsimons18-Sep-02 3:19 
GeneralRe: Auto-updater? Pin
leppie18-Sep-02 3:58
leppie18-Sep-02 3:58 
GeneralRe: Auto-updater? Pin
Ray Cassick18-Sep-02 5:16
Ray Cassick18-Sep-02 5:16 
GeneralRe: Auto-updater? Pin
User 988518-Sep-02 5:44
User 988518-Sep-02 5:44 
AnswerRe: Auto-updater? Pin
Andy Smith18-Sep-02 4:55
Andy Smith18-Sep-02 4:55 
Questionhelp? Pin
imran_rafique17-Sep-02 15:33
imran_rafique17-Sep-02 15:33 
Generalgetting a HANDLE Pin
Nnamdi Onyeyiri17-Sep-02 9:29
Nnamdi Onyeyiri17-Sep-02 9:29 
am i dreaming, or is this the right code to get an equivilant HANDLE object for a process.
IntPtr tknPtr = IntPtr.Zero;
Process pr = Process.GetCurrentProcess();
IntPtr ptr = pr.Handle;
OpenProcessToken(pr.Handle, 0, out tknPtr);
This is what i am using, but when i get the last error with Marshal.GetLastWin32Error() [after calling AdjustTokenPrivileges) it is returning an error code of 6 which i think is ERROR_INVALID_HANDLE.

In theory, the above code should get a handle to the processes tokens, but im not sure as i dont fully understand it all.

[and for those of you who are tired of these posts, i am very sorry, but this isnt just about me and my little method anymore, this is WAR against Advapi32.dll, and the depriving of privileges! Mad | :mad: ]


Suspicious | :suss: Email: theeclypse@hotmail.com   URL: http://www.onyeyiri.co.uk
Suspicious | :suss: "All programmers are playwrights and all computers are lousy actors."


GeneralRe: getting a HANDLE Pin
leppie17-Sep-02 10:08
leppie17-Sep-02 10:08 
GeneralRe: getting a HANDLE Pin
Nnamdi Onyeyiri17-Sep-02 10:15
Nnamdi Onyeyiri17-Sep-02 10:15 
GeneralRe: getting a HANDLE Pin
leppie17-Sep-02 10:33
leppie17-Sep-02 10:33 
GeneralRe: getting a HANDLE Pin
Nnamdi Onyeyiri17-Sep-02 10:36
Nnamdi Onyeyiri17-Sep-02 10:36 
GeneralRe: getting a HANDLE Pin
leppie17-Sep-02 10:44
leppie17-Sep-02 10:44 
GeneralServices Pin
Mazdak17-Sep-02 8:47
Mazdak17-Sep-02 8:47 
GeneralMQSeries from .NET Pin
SimonS17-Sep-02 3:58
SimonS17-Sep-02 3:58 
GeneralRe: MQSeries from .NET Pin
leppie17-Sep-02 4:38
leppie17-Sep-02 4:38 
GeneralRe: MQSeries from .NET Pin
Gaul17-Sep-02 4:53
Gaul17-Sep-02 4:53 
GeneralRe: MQSeries from .NET Pin
SimonS17-Sep-02 5:27
SimonS17-Sep-02 5:27 
GeneralRe: MQSeries from .NET Pin
leppie17-Sep-02 7:24
leppie17-Sep-02 7:24 
GeneralRe: MQSeries from .NET Pin
Gaul25-Sep-02 12:05
Gaul25-Sep-02 12:05 
QuestionHow to remove null from arraylist? Pin
leppie17-Sep-02 0:53
leppie17-Sep-02 0:53 
AnswerRe: How to remove null from arraylist? Pin
jan larsen17-Sep-02 1:18
jan larsen17-Sep-02 1:18 
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 1:31
leppie17-Sep-02 1:31 
GeneralRe: How to remove null from arraylist? Pin
jan larsen17-Sep-02 3:45
jan larsen17-Sep-02 3:45 
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 4:26
leppie17-Sep-02 4:26 

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.