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

C#

 
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 
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 
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 4:35
leppie17-Sep-02 4:35 

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.