• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TOKEN_INFORMATION_CLASS类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TOKEN_INFORMATION_CLASS的典型用法代码示例。如果您正苦于以下问题:C# TOKEN_INFORMATION_CLASS类的具体用法?C# TOKEN_INFORMATION_CLASS怎么用?C# TOKEN_INFORMATION_CLASS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TOKEN_INFORMATION_CLASS类属于命名空间,在下文中一共展示了TOKEN_INFORMATION_CLASS类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetTokenInformation

 public static SafeHandle GetTokenInformation(SafeCloseHandle token, TOKEN_INFORMATION_CLASS infoClass)
 {
     uint length;
     if (!SafeNativeMethods.GetTokenInformation(token, infoClass, SafeHGlobalHandle.InvalidHandle, 0, out length))
     {
         int error = Marshal.GetLastWin32Error();
         if (error != (int)Win32Error.ERROR_INSUFFICIENT_BUFFER)
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error, SR.GetString(SR.GetTokenInfoFailed, error)));
         }
     }
     SafeHandle buffer = SafeHGlobalHandle.AllocHGlobal(length);
     try
     {
         if (!SafeNativeMethods.GetTokenInformation(token, infoClass, buffer, length, out length))
         {
             int error = Marshal.GetLastWin32Error();
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error, SR.GetString(SR.GetTokenInfoFailed, error)));
         }
     }
     catch
     {
         buffer.Dispose();
         throw;
     }
     return buffer;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:27,代码来源:ComPlusAuthorization.cs


示例2: GetTokenInformation

 static extern bool GetTokenInformation(
     IntPtr TokenHandle,
     TOKEN_INFORMATION_CLASS TokenInformationClass,
     IntPtr TokenInformation,
     uint TokenInformationLength,
     out uint ReturnLength
     );
开发者ID:windrobin,项目名称:kumpro,代码行数:7,代码来源:UtVistaToken.cs


示例3: GetTokenInformation

		static extern bool GetTokenInformation(
			HANDLE hToken,
			TOKEN_INFORMATION_CLASS tokenInfoClass,
			IntPtr TokenInformation,
			int tokeInfoLength,
			ref int reqLength
		);
开发者ID:xbadcode,项目名称:Rubezh,代码行数:7,代码来源:ProcessHelper.cs


示例4: GetTokenInformation

 public static extern bool GetTokenInformation(
     IntPtr TokenHandle,
     TOKEN_INFORMATION_CLASS TokenInformationClass,
     IntPtr TokenInformation,
     UInt32 TokenInformationLength,
     out UInt32 ReturnLength
     );
开发者ID:cagrawal21,项目名称:x360ce,代码行数:7,代码来源:NativeMethods.cs


示例5: GetTokenInformation

 internal static extern bool GetTokenInformation(SafeCloseHandle tokenHandle, TOKEN_INFORMATION_CLASS tokenInformationClass, [Out] byte[] pTokenInformation, int tokenInformationLength, out int returnLength);
开发者ID:uQr,项目名称:referencesource,代码行数:1,代码来源:ListenerUnsafeNativeMethods.cs


示例6: GetTokenInformation

 public static extern bool GetTokenInformation(int TokenHandle,
     TOKEN_INFORMATION_CLASS TokenInformationClass, ref TOKEN_SOURCE TokenInformation,
     int TokenInformationLength, out int ReturnLength);
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:3,代码来源:Functions.cs


示例7: GetTokenInformation

            public static bool GetTokenInformation([NotNull] SafeTokenHandle hToken, TOKEN_INFORMATION_CLASS tokenInfoClass, [NotNull] SafeNativeMemory pTokenInfo)
            {
                Contract.Requires(hToken != null);
                Contract.Requires(pTokenInfo != null);

                int cbReturned;
                return GetTokenInformation(hToken, tokenInfoClass, pTokenInfo.DangerousGetHandle(), pTokenInfo.Size, out cbReturned);
            }
开发者ID:tom-englert,项目名称:TomsToolbox,代码行数:8,代码来源:UserAccountControl.cs


示例8: SetTokenInformation

 public static extern bool SetTokenInformation(IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass,
                                                ref int TokenInformation, int TokenInformationLength);
开发者ID:rcanright,项目名称:pgina,代码行数:2,代码来源:pInvokes.cs


示例9: GetTokenInformation

 public unsafe static extern bool GetTokenInformation(
          SafeTokenHandle TokenHandle,
          TOKEN_INFORMATION_CLASS TokenInfoClass,
    [Out] void* TokenInformation,
          int TokenInfoLength,
    [Out] out int ccbReturn);
开发者ID:nickchal,项目名称:pash,代码行数:6,代码来源:UnsafeNativeMethods.cs


示例10: GetTokenInformation

	private static extern int GetTokenInformation(
		IntPtr TokenHandle,
		TOKEN_INFORMATION_CLASS TokenInformationClass,
		out int TokenInformation,
		int TokenInformationLength,
		out int ReturnLength);
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:6,代码来源:java.util.prefs.cs


示例11: GetTokenInformation

 public static SafeHandle GetTokenInformation(SafeCloseHandle token, TOKEN_INFORMATION_CLASS infoClass)
 {
     uint num;
     if (!SafeNativeMethods.GetTokenInformation(token, infoClass, SafeHGlobalHandle.InvalidHandle, 0, out num))
     {
         int error = Marshal.GetLastWin32Error();
         if (error != 0x7a)
         {
             throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error, System.ServiceModel.SR.GetString("GetTokenInfoFailed", new object[] { error })));
         }
     }
     SafeHandle tokenInformation = SafeHGlobalHandle.AllocHGlobal(num);
     try
     {
         if (!SafeNativeMethods.GetTokenInformation(token, infoClass, tokenInformation, num, out num))
         {
             int num3 = Marshal.GetLastWin32Error();
             throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(num3, System.ServiceModel.SR.GetString("GetTokenInfoFailed", new object[] { num3 })));
         }
     }
     catch
     {
         tokenInformation.Dispose();
         throw;
     }
     return tokenInformation;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:SecurityUtils.cs


示例12: SetTokenInformation

 static extern Boolean SetTokenInformation(IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, ref UInt32 TokenInformation, UInt32 TokenInformationLength);
开发者ID:hoeness2,项目名称:mcebuddy2,代码行数:1,代码来源:AppProcess.cs


示例13: SetTokenInformation

 public static extern bool SetTokenInformation(
     SafeTokenHandle hToken,
     TOKEN_INFORMATION_CLASS tokenInfoClass,
     IntPtr pTokenInfo,
     Int32 tokenInfoLength);
开发者ID:bazile,项目名称:Training,代码行数:5,代码来源:NativeMethods.cs


示例14: GetTokenInformation

 public static extern bool GetTokenInformation(SafeTokenHandle TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, ref TOKEN_ELEVATION_TYPE TokenInformation, int TokenInformationLength, out uint ReturnLength);
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:1,代码来源:Security.cs


示例15: SetTokenInformation

 internal static extern bool SetTokenInformation(SafeTokenHandle hToken, TOKEN_INFORMATION_CLASS informationClass,
                                                 TOKEN_MANDATORY_LABEL tokenInformation,
                                                 int tokenInformationLength);
开发者ID:CuneytKukrer,项目名称:TestProject,代码行数:3,代码来源:Win32Native.cs


示例16: SetTokenInformation

 public static extern bool SetTokenInformation(IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, ref TOKEN_MANDATORY_LABEL TokenInformation, uint TokenInformationLength);
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:1,代码来源:AdvApi32_Methods.cs


示例17: GetTokenInformation

 public static extern unsafe bool GetTokenInformation(
     SafeObjectHandle TokenHandle,
     TOKEN_INFORMATION_CLASS TokenInformationClass,
     void* TokenInformation,
     int TokenInformationLength,
     out int ReturnLength);
开发者ID:fearthecowboy,项目名称:pinvoke,代码行数:6,代码来源:AdvApi32.cs


示例18: GetTokenInformation

 public static extern bool GetTokenInformation(
     [In] IntPtr tokenHandle,
     TOKEN_INFORMATION_CLASS tokenInformationClass,
     IntPtr tokenInformation,
     int tokenInformationLength,
     out int returnLength
 );
开发者ID:bazile,项目名称:Training,代码行数:7,代码来源:NativeMethods.cs


示例19: GetTokenInformation

 internal static extern bool GetTokenInformation(
     SafeTokenHandle hToken,
     TOKEN_INFORMATION_CLASS tokenInfoClass,
     IntPtr pTokenInfo,
     Int32 tokenInfoLength,
     out Int32 returnLength);
开发者ID:vcompestine,项目名称:x360ce,代码行数:6,代码来源:NativeMethods.cs


示例20: GetTokenInformation

        private static extern bool GetTokenInformation(
			IntPtr hToken,
			TOKEN_INFORMATION_CLASS tokenInfoClass,
			IntPtr tokenInformation,
			int tokeInfoLength,
			out int returnLength);
开发者ID:sillsdev,项目名称:CarlaLegacy,代码行数:6,代码来源:BasicUtils.cs



注:本文中的TOKEN_INFORMATION_CLASS类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TOKEN_PRIVILEGES类代码示例发布时间:2022-05-24
下一篇:
C# TOKEN类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap