Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Interop.Advapi32 Class Reference

Classes

struct  EVENT_FILTER_DESCRIPTOR
 
struct  LSA_STRING
 
struct  LUID
 
struct  LUID_AND_ATTRIBUTES
 
struct  MARSHALLED_UNICODE_STRING
 
struct  PERF_COUNTER_BLOCK
 
struct  PERF_COUNTER_DEFINITION
 
struct  PERF_DATA_BLOCK
 
struct  PERF_INSTANCE_DEFINITION
 
struct  PERF_OBJECT_TYPE
 
struct  SYSTEMTIME
 
struct  TOKEN_PRIVILEGE
 
struct  TRACE_ENABLE_INFO
 
struct  TRACE_GUID_INFO
 
struct  TRACE_PROVIDER_INSTANCE_INFO
 

Public Member Functions

static bool CryptAcquireContext (out SafeProvHandle phProv, string szContainer, string szProvider, int dwProvType, uint dwFlags)
 
static bool CryptDecrypt (SafeKeyHandle hKey, SafeHashHandle hHash, bool Final, int dwFlags, byte[] pbData, ref int pdwDataLen)
 
static bool CryptDestroyHash (IntPtr hHash)
 
static bool CryptDestroyKey (IntPtr hKey)
 
static bool CryptEncrypt (SafeKeyHandle hKey, SafeHashHandle hHash, bool Final, int dwFlags, byte[] pbData, ref int pdwDataLen, int dwBufLen)
 
static bool CryptExportKey (SafeKeyHandle hKey, SafeKeyHandle hExpKey, int dwBlobType, int dwFlags, [In][Out] byte[] pbData, ref int dwDataLen)
 
static bool CryptGetDefaultProvider (int dwProvType, IntPtr pdwReserved, GetDefaultProviderFlags dwFlags, [Out] StringBuilder pszProvName, ref int pcbProvName)
 
static bool CryptGetHashParam (SafeHashHandle hHash, CryptHashProperty dwParam, out int pbData, [In][Out] ref int pdwDataLen, int dwFlags)
 
static bool CryptSetHashParam (SafeHashHandle hHash, CryptHashProperty dwParam, byte[] buffer, int dwFlags)
 
static bool CryptGetKeyParam (SafeKeyHandle hKey, CryptGetKeyParamFlags dwParam, byte[] pbData, ref int pdwDataLen, int dwFlags)
 
static bool CryptSetProvParam (SafeHandle safeProvHandle, CryptProvParam dwParam, IntPtr pbData, int dwFlags)
 
static bool CryptSetProvParam (SafeProvHandle hProv, CryptProvParam dwParam, ref IntPtr pbData, int dwFlags)
 
static bool CryptGetProvParam (SafeHandle safeProvHandle, CryptProvParam dwParam, IntPtr pbData, ref int dwDataLen, int dwFlags)
 
static bool CryptHashData (SafeHashHandle hHash, byte[] pbData, int dwDataLen, int dwFlags)
 
static bool CryptReleaseContext (IntPtr hProv, int dwFlags)
 
static bool CryptSetKeyParam (SafeKeyHandle hKey, int dwParam, byte[] pbData, int dwFlags)
 
static bool CryptSetKeyParam (SafeKeyHandle safeKeyHandle, int dwParam, ref int pdw, int dwFlags)
 
static bool CryptSignHash (SafeHashHandle hHash, KeySpec dwKeySpec, string szDescription, CryptSignAndVerifyHashFlags dwFlags, [Out] byte[] pbSignature, [In][Out] ref int pdwSigLen)
 
static bool CryptVerifySignature (SafeHashHandle hHash, byte[] pbSignature, int dwSigLen, SafeKeyHandle hPubKey, string szDescription, CryptSignAndVerifyHashFlags dwFlags)
 

Static Public Member Functions

static unsafe bool CryptGetProvParam (SafeHandle safeProvHandle, CryptProvParam dwParam, Span< byte > pbData, ref int dwDataLen)
 

Package Types

enum  LogonFlags { LOGON_WITH_PROFILE = 1 , LOGON_NETCREDENTIALS_ONLY = 2 }
 
enum  ActivityControl : uint {
  EVENT_ACTIVITY_CTRL_GET_ID = 1u , EVENT_ACTIVITY_CTRL_SET_ID , EVENT_ACTIVITY_CTRL_CREATE_ID , EVENT_ACTIVITY_CTRL_GET_SET_ID ,
  EVENT_ACTIVITY_CTRL_CREATE_SET_ID
}
 
enum  EVENT_INFO_CLASS { BinaryTrackInfo , SetEnableAllKeywords , SetTraits }
 
enum  TRACE_QUERY_INFO_CLASS {
  TraceGuidQueryList , TraceGuidQueryInfo , TraceGuidQueryProcess , TraceStackTracingInfo ,
  MaxTraceSetInfoClass
}
 
enum  SECURITY_IMPERSONATION_LEVEL : uint { SecurityAnonymous , SecurityIdentification , SecurityImpersonation , SecurityDelegation }
 
enum  CryptCreateHashFlags { None = 0 }
 
enum  GetDefaultProviderFlags { CRYPT_MACHINE_DEFAULT = 1 , CRYPT_USER_DEFAULT }
 
enum  CryptHashProperty {
  HP_ALGID = 1 , HP_HASHVAL = 2 , HP_HASHSIZE = 4 , HP_HMAC_INFO = 5 ,
  HP_TLS1PRF_LABEL = 6 , HP_TLS1PRF_SEED = 7
}
 
enum  CryptGetKeyParamFlags {
  CRYPT_EXPORT = 4 , KP_IV = 1 , KP_PERMISSIONS = 6 , KP_ALGID = 7 ,
  KP_KEYLEN = 9
}
 
enum  CryptProvParam {
  PP_CLIENT_HWND = 1 , PP_IMPTYPE = 3 , PP_NAME = 4 , PP_CONTAINER = 6 ,
  PP_PROVTYPE = 16 , PP_KEYSET_TYPE = 27 , PP_KEYEXCHANGE_PIN = 32 , PP_SIGNATURE_PIN = 33 ,
  PP_UNIQUE_CONTAINER = 36
}
 
enum  KeySpec { AT_KEYEXCHANGE = 1 , AT_SIGNATURE }
 
enum  CryptSignAndVerifyHashFlags { None = 0 , CRYPT_NOHASHOID = 1 , CRYPT_TYPE2_FORMAT = 2 , CRYPT_X931_FORMAT = 4 }
 

Package Functions

static bool OpenProcessToken (IntPtr ProcessHandle, int DesiredAccess, out SafeTokenHandle TokenHandle)
 
static bool LookupPrivilegeValue ([MarshalAs(UnmanagedType.LPTStr)] string lpSystemName, [MarshalAs(UnmanagedType.LPTStr)] string lpName, out LUID lpLuid)
 
static unsafe bool AdjustTokenPrivileges (SafeTokenHandle TokenHandle, bool DisableAllPrivileges, TOKEN_PRIVILEGE *NewState, uint BufferLength, TOKEN_PRIVILEGE *PreviousState, uint *ReturnLength)
 
static unsafe bool CreateProcessWithLogonW (string userName, string domain, IntPtr password, LogonFlags logonFlags, string appName, char *cmdLine, int creationFlags, IntPtr environmentBlock, string lpCurrentDirectory, ref Kernel32.STARTUPINFO lpStartupInfo, ref Kernel32.PROCESS_INFORMATION lpProcessInformation)
 
static bool RevertToSelf ()
 
static bool ImpersonateNamedPipeClient (SafePipeHandle hNamedPipe)
 
unsafe delegate void EtwEnableCallback (in Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, EVENT_FILTER_DESCRIPTOR *filterData, void *callbackContext)
 
static int EventActivityIdControl (ActivityControl ControlCode, ref Guid ActivityId)
 
static unsafe uint EventRegister (in Guid providerId, EtwEnableCallback enableCallback, void *callbackContext, ref long registrationHandle)
 
static unsafe int EventSetInformation (long registrationHandle, EVENT_INFO_CLASS informationClass, void *eventInformation, uint informationLength)
 
static unsafe int EnumerateTraceGuidsEx (TRACE_QUERY_INFO_CLASS TraceQueryInfoClass, void *InBuffer, int InBufferSize, void *OutBuffer, int OutBufferSize, out int ReturnLength)
 
static uint EventUnregister (long registrationHandle)
 
static bool LookupAccountNameW (string lpSystemName, ref char lpAccountName, ref byte Sid, ref uint cbSid, ref char ReferencedDomainName, ref uint cchReferencedDomainName, out uint peUse)
 
static int RegCloseKey (IntPtr hKey)
 
static int RegDeleteValue (SafeRegistryHandle hKey, string lpValueName)
 
static int RegEnumKeyEx (SafeRegistryHandle hKey, int dwIndex, char[] lpName, ref int lpcbName, int[] lpReserved, [Out] char[] lpClass, int[] lpcbClass, long[] lpftLastWriteTime)
 
static int RegEnumValue (SafeRegistryHandle hKey, int dwIndex, char[] lpValueName, ref int lpcbValueName, IntPtr lpReserved_MustBeZero, int[] lpType, byte[] lpData, int[] lpcbData)
 
static int RegOpenKeyEx (SafeRegistryHandle hKey, string lpSubKey, int ulOptions, int samDesired, out SafeRegistryHandle hkResult)
 
static int RegQueryValueEx (SafeRegistryHandle hKey, string lpValueName, int[] lpReserved, ref int lpType, [Out] byte[] lpData, ref int lpcbData)
 
static int RegQueryValueEx (SafeRegistryHandle hKey, string lpValueName, int[] lpReserved, ref int lpType, ref int lpData, ref int lpcbData)
 
static int RegQueryValueEx (SafeRegistryHandle hKey, string lpValueName, int[] lpReserved, ref int lpType, ref long lpData, ref int lpcbData)
 
static int RegQueryValueEx (SafeRegistryHandle hKey, string lpValueName, int[] lpReserved, ref int lpType, [Out] char[] lpData, ref int lpcbData)
 
static int RegSetValueEx (SafeRegistryHandle hKey, string lpValueName, int Reserved, int dwType, string lpData, int cbData)
 
static bool LookupPrivilegeValue ([MarshalAs(UnmanagedType.LPTStr)] string lpSystemName, [MarshalAs(UnmanagedType.LPTStr)] string lpName, out LUID lpLuid)
 
static bool RevertToSelf ()
 
static bool ConvertSdToStringSd (byte[] securityDescriptor, uint requestedRevision, uint securityInformation, out IntPtr resultString, ref uint resultStringLength)
 
static bool ConvertStringSdToSd (string stringSd, uint stringSdRevision, out IntPtr resultSd, ref uint resultSdLength)
 
static uint GetSecurityInfoByHandle (SafeHandle handle, uint objectType, uint securityInformation, out IntPtr sidOwner, out IntPtr sidGroup, out IntPtr dacl, out IntPtr sacl, out IntPtr securityDescriptor)
 
static uint SetSecurityInfoByHandle (SafeHandle handle, uint objectType, uint securityInformation, byte[] owner, byte[] group, byte[] dacl, byte[] sacl)
 
static uint GetSecurityInfoByName (string name, uint objectType, uint securityInformation, out IntPtr sidOwner, out IntPtr sidGroup, out IntPtr dacl, out IntPtr sacl, out IntPtr securityDescriptor)
 
static uint SetSecurityInfoByName (string name, uint objectType, uint securityInformation, byte[] owner, byte[] group, byte[] dacl, byte[] sacl)
 
static uint GetSecurityDescriptorLength (IntPtr byteArray)
 
static bool OpenThreadToken (IntPtr ThreadHandle, TokenAccessLevels dwDesiredAccess, bool bOpenAsSelf, out SafeTokenHandle phThreadToken)
 
static bool OpenProcessToken (IntPtr ProcessToken, TokenAccessLevels DesiredAccess, out SafeTokenHandle TokenHandle)
 
static bool SetThreadToken (IntPtr ThreadHandle, SafeTokenHandle hToken)
 
static unsafe bool AdjustTokenPrivileges (SafeTokenHandle TokenHandle, bool DisableAllPrivileges, TOKEN_PRIVILEGE *NewState, uint BufferLength, TOKEN_PRIVILEGE *PreviousState, uint *ReturnLength)
 
static bool DuplicateTokenEx (SafeTokenHandle ExistingTokenHandle, TokenAccessLevels DesiredAccess, IntPtr TokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, System.Security.Principal.TokenType TokenType, ref SafeTokenHandle DuplicateTokenHandle)
 
static bool CryptCreateHash (SafeProvHandle hProv, int Algid, SafeKeyHandle hKey, CryptCreateHashFlags dwFlags, out SafeHashHandle phHash)
 
static bool CryptDeriveKey (SafeProvHandle hProv, int Algid, SafeHashHandle hBaseData, int dwFlags, out SafeKeyHandle phKey)
 
static bool CryptGenKey (SafeProvHandle hProv, int Algid, int dwFlags, out SafeKeyHandle phKey)
 
static bool CryptGetUserKey (SafeProvHandle hProv, int dwKeySpec, out SafeKeyHandle phUserKey)
 
static unsafe bool CryptImportKey (SafeProvHandle hProv, byte *pbData, int dwDataLen, SafeKeyHandle hPubKey, int dwFlags, out SafeKeyHandle phKey)
 
static bool OpenProcessToken (IntPtr ProcessToken, TokenAccessLevels DesiredAccess, out SafeAccessTokenHandle TokenHandle)
 
static bool GetTokenInformation (SafeAccessTokenHandle TokenHandle, uint TokenInformationClass, SafeLocalAllocHandle TokenInformation, uint TokenInformationLength, out uint ReturnLength)
 
static bool GetTokenInformation (IntPtr TokenHandle, uint TokenInformationClass, IntPtr TokenInformation, uint TokenInformationLength, out uint ReturnLength)
 
static bool DuplicateTokenEx (SafeAccessTokenHandle hExistingToken, uint dwDesiredAccess, IntPtr lpTokenAttributes, uint ImpersonationLevel, uint TokenType, ref SafeAccessTokenHandle phNewToken)
 
static uint LsaLookupNames2 (SafeLsaPolicyHandle handle, int flags, int count, MARSHALLED_UNICODE_STRING[] names, out SafeLsaMemoryHandle referencedDomains, out SafeLsaMemoryHandle sids)
 
static uint LsaLookupSids (SafeLsaPolicyHandle handle, int count, IntPtr[] sids, out SafeLsaMemoryHandle referencedDomains, out SafeLsaMemoryHandle names)
 
static int LsaClose (IntPtr handle)
 
static int LsaFreeMemory (IntPtr handle)
 
static int ConvertStringSidToSid (string stringSid, out IntPtr ByteArray)
 
static int CreateWellKnownSid (int sidType, byte[] domainSid, byte[] resultSid, ref uint resultSidLength)
 
static int GetWindowsAccountDomainSid (byte[] sid, byte[] resultSid, ref uint resultSidLength)
 
static int IsWellKnownSid (byte[] sid, int type)
 
static int IsEqualDomainSid (byte[] sid1, byte[] sid2, out bool result)
 
static bool RevertToSelf ()
 
static bool ImpersonateLoggedOnUser (SafeAccessTokenHandle userToken)
 
static uint LsaNtStatusToWinError (uint status)
 
static bool AllocateLocallyUniqueId (out LUID Luid)
 
static bool CheckTokenMembership (SafeAccessTokenHandle TokenHandle, byte[] SidToCheck, ref bool IsMember)
 

Static Package Functions

static bool EncryptFile (string path)
 
static bool DecryptFile (string path)
 
static unsafe int EventWriteTransfer (long registrationHandle, in EventDescriptor eventDescriptor, Guid *activityId, Guid *relatedActivityId, int userDataCount, EventProvider.EventData *userData)
 
static unsafe uint LsaOpenPolicy (string SystemName, ref OBJECT_ATTRIBUTES Attributes, int AccessMask, out SafeLsaPolicyHandle PolicyHandle)
 
static bool OpenThreadToken (TokenAccessLevels desiredAccess, WinSecurityContext openAs, out SafeAccessTokenHandle tokenHandle)
 

Private Member Functions

static bool EncryptFilePrivate (string lpFileName)
 
static bool DecryptFileFilePrivate (string lpFileName, int dwReserved)
 
static unsafe int EventWriteTransfer_PInvoke (long registrationHandle, in EventDescriptor eventDescriptor, Guid *activityId, Guid *relatedActivityId, int userDataCount, EventProvider.EventData *userData)
 
static uint LsaOpenPolicy (ref UNICODE_STRING SystemName, ref OBJECT_ATTRIBUTES ObjectAttributes, int AccessMask, out SafeLsaPolicyHandle PolicyHandle)
 
static bool OpenThreadToken (IntPtr ThreadHandle, TokenAccessLevels dwDesiredAccess, bool bOpenAsSelf, out SafeAccessTokenHandle phThreadToken)
 

Detailed Description

Definition at line 455 of file Interop.cs.


The documentation for this class was generated from the following files: