Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

More from kernel32 & advapi32 #65

Merged
merged 5 commits into from
Nov 17, 2015

Conversation

vbfox
Copy link
Collaborator

@vbfox vbfox commented Nov 16, 2015

Added :

  • AdvApi32.OpenProcessToken
  • AdvApi32.GetTokenInformation
  • AdvApi32.QueryServiceObjectSecurity
  • AdvApi32.SetServiceObjectSecurity
  • Kernel32.GetConsoleWindow
  • Kernel32.LoadLibrary
  • Kernel32.FreeLibrary

@vbfox vbfox changed the title More from kernel32 advapi32 More from kernel32 & advapi32 Nov 16, 2015
using System;

/// <content>
/// Contains the <see cref="ServiceDescription"/> nested type.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here should be TokenAccessRights

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

Signaled by jmelosegui in dotnet#65
@jmelosegui
Copy link
Collaborator

@vbfox it is not clear to me whether should we decorate a boolean return value with
[return: MarshalAs(UnmanagedType.Bool)] or not. Could you please expand on this?

@vbfox
Copy link
Collaborator Author

vbfox commented Nov 16, 2015

@jmelosegui It isn't mandatory as it is the default value for PInvoke but it's what one of the FxCop rules (CA1414) mandate, we started to discuss it on #50.

It's still unknown if we will apply it but i'm for enabling all the rules that make sense. The reason for this rule is that the default value is the Win32 vision of what a boolean is (32-bits value with 0 meaning false and anything else meaning true) but not all platforms (or even libraries under windows) conform to that so it's clearer to specify what is meant by "bool" (Even if the enum member name isn't clear it's documentation summary is really clear on what it is)

@jmelosegui
Copy link
Collaborator

Clear now, thanks!!!

public enum TOKEN_INFORMATION_CLASS
{
TokenUser = 1,
TokenGroups,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double-checking that naturally occurring +1's for each of these values coincide with their native equivalents?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For once it's actually defined as a real enum in native code : https://msdn.microsoft.com/en-us/library/windows/desktop/aa379626(v=vs.85).aspx with the same value generation

@AArnott
Copy link
Collaborator

AArnott commented Nov 16, 2015

LGTM, after comments

vbfox added a commit that referenced this pull request Nov 17, 2015
@vbfox vbfox merged commit cf39a85 into dotnet:master Nov 17, 2015
AArnott added a commit that referenced this pull request Oct 30, 2022
…mpilers.Toolset-3.7.0

Bump Microsoft.Net.Compilers.Toolset from 3.6.0 to 3.7.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants