小编arg*_*gaz的帖子

C#不承认SafeTokenHandle

我有一个C#的编译错误

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Security.Principal;
using System.Security.Permissions;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;

[DllImport("advapi32.dll", SetLastError = true,CharSet = CharSet.Unicode)]
public static extern bool ***LogonUser***(string lpszUsername, string lpszDomain, string lpszPassword,
int dwLogonType, int dwLogonProvider, out ***SafeTokenHandle*** phToken);
Run Code Online (Sandbox Code Playgroud)

在*符号(LogonUser的和SafeTokenHandle)字.由于类型未知,我的C#编译器无法编译.我开发了visual studio 2012,windows 64,framework 4.0.

请帮忙.

c# windows permissions

4
推荐指数
1
解决办法
6617
查看次数

标签 统计

c# ×1

permissions ×1

windows ×1