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

C#

 
GeneralRe: Static Analysis tools? Pin
James T. Johnson18-Sep-02 23:53
James T. Johnson18-Sep-02 23:53 
GeneralRe: Static Analysis tools? Pin
leppie19-Sep-02 0:17
leppie19-Sep-02 0:17 
GeneralRe: Static Analysis tools? Pin
James T. Johnson19-Sep-02 0:38
James T. Johnson19-Sep-02 0:38 
GeneralRe: Static Analysis tools? Pin
leppie19-Sep-02 1:09
leppie19-Sep-02 1:09 
GeneralPopup menu Pin
Mazdak17-Sep-02 21:17
Mazdak17-Sep-02 21:17 
GeneralRe: Popup menu Pin
Stephane Rodriguez.17-Sep-02 21:45
Stephane Rodriguez.17-Sep-02 21:45 
GeneralRe: Popup menu Pin
Mazdak17-Sep-02 21:51
Mazdak17-Sep-02 21:51 
QuestionAuto-updater? Pin
floydboy5817-Sep-02 18:27
floydboy5817-Sep-02 18:27 
AnswerRe: Auto-updater? Pin
Philip Fitzsimons18-Sep-02 1:16
Philip Fitzsimons18-Sep-02 1:16 
GeneralRe: Auto-updater? Pin
floydboy5818-Sep-02 1:52
floydboy5818-Sep-02 1:52 
GeneralRe: Auto-updater? Pin
Philip Fitzsimons18-Sep-02 1:55
Philip Fitzsimons18-Sep-02 1:55 
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 

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.