Windows SDK Support Team Blog

#define _WIN32_WINNT

Browse by Tags

Tagged Content List
  • Blog Post: The mysteries of WindowsPrincipal.IsInRole

    WindowsPrincipal.IsInRole method is defined as the following in MSDN ( http://msdn.microsoft.com/en-us/library/system.security.principal.windowsprincipal.isinrole(v=vs.110).aspx ) "Determines whether the current principal belongs to a specified Windows user group" A WindowsPrincipal is basically...
  • Blog Post: How to launch a process as a different user without storing their credentials?

    You may run into a situation where you need to create a token to be used at a later time since you can’t keep the credentials around in your application. The token representing the user is going to be used to launch a process. In the past, this would be done by generating the token with LogonUser...
  • Blog Post: How to programmatically create a LogonService or Network Service token with LogonUser?

    A lot of Developers have asked if it is possible to generate a token that represents the Local Service or Network Service account without stealing a token. You can programmatically generate a token using LogonUser() . Here is the code for doing this: LogonUser(L"LocalService", L"NT AUTHORITY",...
  • Blog Post: How to launch a process interactively from a Windows Service?

    Launching an interactive process from a service used to be straight forward. You could either configure your service to be interactive or you could specify “Winsta0\\Default” as the desktop (in CreateProcess API) and as long as the launched process had the appropriate permissions to the desktop...
  • Blog Post: Dealing with Administrator and standard user’s context

    With introduction of UAC, I often get two questions for Windows Vista and later. 1) How to launch an application in the Administrative context from an application which is running in standard user’s context? 2) How to launch application in standard user’s context from an application...
  • Blog Post: Web application gets Access Denied accessing a Named Pipe.

    Recently, I was troubleshooting a problem for one of my customers. A named pipe created by a native C application was not accessible by web client. The actual product is a convention Windows application which does IPC through named pipes. Both server and client for this were Windows applications. They...
  • Blog Post: Check membership of a group from user’s process access token

    Question may be, I need to check If the user belong to a particular group or not? There are NetUser* APIs available in NetApi32.lib to list the groups a user belong to a group. You can actually check but then you will need to compare the string of the group you are interested to check and the list returned...
Page 1 of 1 (7 items)