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

C#

 
GeneralRe: Static Analysis tools? Pin
James T. Johnson19-Sep-02 0:42
James T. Johnson19-Sep-02 0:42 
GeneralRe: Static Analysis tools? Pin
James T. Johnson19-Sep-02 4:17
James T. Johnson19-Sep-02 4:17 
GeneralRe: Static Analysis tools? Pin
leppie19-Sep-02 5:24
leppie19-Sep-02 5:24 
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 
GeneralRe: getting a HANDLE Pin
leppie17-Sep-02 10:08
leppie17-Sep-02 10:08 
Nnamdi Onyeyiri wrote:
OpenProcessToken(pr.Handle,0, out tknPtr);

Now I have told you THAT cannot be ZERO. Smile | :)

You can see from the follow that 0 is not valid:

#define TOKEN_ASSIGN_PRIMARY (0x0001)
#define TOKEN_DUPLICATE (0x0002)
#define TOKEN_IMPERSONATE (0x0004)
#define TOKEN_QUERY (0x0008)
#define TOKEN_QUERY_SOURCE (0x0010)
#define TOKEN_ADJUST_PRIVILEGES (0x0020)
#define TOKEN_ADJUST_GROUPS (0x0040)
#define TOKEN_ADJUST_DEFAULT (0x0080)
#define TOKEN_ADJUST_SESSIONID (0x0100)

#define TOKEN_ALL_ACCESS_P (STANDARD_RIGHTS_REQUIRED |\
TOKEN_ASSIGN_PRIMARY |\
TOKEN_DUPLICATE |\
TOKEN_IMPERSONATE |\
TOKEN_QUERY |\
TOKEN_QUERY_SOURCE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT )

#if ((defined(_WIN32_WINNT) && (_WIN32_WINNT > 0x0400)) || (!defined(_WIN32_WINNT)))
#define TOKEN_ALL_ACCESS (TOKEN_ALL_ACCESS_P |\
TOKEN_ADJUST_SESSIONID )
#else
#define TOKEN_ALL_ACCESS (TOKEN_ALL_ACCESS_P)
#endif

#define TOKEN_READ (STANDARD_RIGHTS_READ |\
TOKEN_QUERY)


#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT)

#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)


BTW, does Marshal.GetLastWin32Error() do the same as the GetLastError() in the Win API?
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 

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.