Desktop Functions: Smart Device Functions:
|
Search Results for "IntPtr" in [All]credui
IntPtr pPackedCredentials,
Public Shared Function CredPackAuthenticationBuffer(ByVal dwFlags As UInt32, ByVal pszUserName As String, ByVal pszPassword As String, ByVal pPackedCredentials As IntPtr, ByRef pcbPackedCredentials As UInt32) As <MarshalAs(UnmanagedType.Bool)> Boolean To determine required buffer size, call first with pPackedCredentials = IntPtr.Zero. Should return error code 160, but pcbPackedCredentials will be populated with the expected buffer size. Use Marshal.AllocCoTaskMem() to allocate the appropriate buffer, then call again, this time passing the allocated buffer.
IntPtr inCredBuffer = Marshal.AllocCoTaskMem(inCredSize);
IntPtr reserved1,
byval reserved1 as IntPtr, _
IntPtr.Zero,
IntPtr reserved1,
byval reserved1 as IntPtr, _
IntPtr.Zero,
IntPtr InAuthBuffer,
out IntPtr refOutAuthBuffer,
ByVal pvInAuthBuffer As IntPtr, _
ByRef ppvOutAuthBuffer As IntPtr, _
public IntPtr hwndParent;
public IntPtr hbmBanner;
IntPtr outCredBuffer;
(IntPtr)0, //You can force that a specific username is shown in the dialog. Create it with 'CredPackAuthenticationBuffer()'. Then, the buffer goes here...
private static extern bool CredUnPackAuthenticationBuffer(int dwFlags, IntPtr pAuthBuffer, uint cbAuthBuffer, StringBuilder pszUserName, ref int pcchMaxUserName, StringBuilder pszDomainName, ref int pcchMaxDomainame, StringBuilder pszPassword, ref int pcchMaxPassword);
ByVal pAuthBuffer As IntPtr, ByVal cbAuthBuffer As UInt32, _
public static extern void CoTaskMemFree(IntPtr ptr);
public IntPtr hwndParent;
public IntPtr hbmBanner;
private static extern bool CredUnPackAuthenticationBuffer(int dwFlags, IntPtr pAuthBuffer, uint cbAuthBuffer, StringBuilder pszUserName, ref int pcchMaxUserName, StringBuilder pszDomainName, ref int pcchMaxDomainame, StringBuilder pszPassword, ref int pcchMaxPassword);
private static extern int CredUIPromptForWindowsCredentials(ref CREDUI_INFO notUsedHere, int authError, ref uint authPackage, IntPtr InAuthBuffer, uint InAuthBufferSize, out IntPtr refOutAuthBuffer, out uint refOutAuthBufferSize, ref bool fSave, int flags);
IntPtr outCredBuffer = new IntPtr();
int result = CredUIPromptForWindowsCredentials(ref credui, 0,ref authPackage,IntPtr.Zero, 0, out outCredBuffer, out outCredSize, ref save, 1 /* Generic */); cfgmgr32
IntPtr machine); httpapi
IntPtr ServiceIntPtr,
IntPtr pConfigInformation,
IntPtr pOverlapped); If your use of this API is focused around a single value of ConfigId, you may want to change the IntPtr (pConfigInformation) to point directly to a managed version of the correct underlying structure and let the default marshaller take care of the interop layer marshaling for you (and your memory management).
retVal = HttpApi.HttpInitialize(HttpApi.HTTPAPI_VERSION, HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr configInformation = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));
retVal = HttpApi.HttpDeleteServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr pReserved);
Private Shared Function HttpInitialize(ByVal Version As HTTPAPI_VERSION, ByVal Flags As UInteger, ByVal pReserved As IntPtr) As UInteger
retVal = HttpApi.HttpInitialize(HttpApi.HTTPAPI_VERSION, HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr ServiceIntPtr,
IntPtr pInputConfigInfo,
IntPtr pOutputConfigInfo,
IntPtr pOverlapped); If your use of this API is focused around a single value of ConfigId, you may want to change the IntPtr (pConfigInformation) to point directly to a managed version of the correct underlying structure and let the default marshaller take care of the interop layer marshaling for you (and your memory management).
retVal = HttpApi.HttpInitialize(httpApiVersion, HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_QUERY)));
IntPtr pOutputConfigInfo = Marshal.AllocCoTaskMem(0);
retVal = HttpApi.HttpQueryServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
retVal = HttpApi.HttpQueryServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr ServiceIntPtr,
IntPtr pConfigInformation,
IntPtr pOverlapped);
Declare Function HttpSetServiceConfiguration Lib "httpapi.dll" (ByVal mustbezero As IntPtr, ByVal configID As Integer, ByVal configInfo As HTTP_SERVICE_CONFIG_URLACL_SET, ByVal configInfoLength As Integer, ByVal mustBeZero2 As IntPtr) As Integer If your use of this API is focused around a single value of ConfigId, you may want to change the IntPtr (pConfigInformation) to point directly to a managed version of the correct underlying structure and let the default marshaller take care of the interop layer marshaling for you (and your memory management).
retVal = HttpApi.HttpInitialize(HttpApi.HTTPAPI_VERSION, HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));
retVal = HttpApi.HttpSetServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
retVal = HttpApi.HttpDeleteServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
retVal = HttpApi.HttpSetServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr pReserved);
IntPtr ServiceIntPtr,
IntPtr pConfigInformation,
IntPtr pOverlapped);
IntPtr ServiceIntPtr,
IntPtr pConfigInformation,
IntPtr pOverlapped);
IntPtr pReserved);
public IntPtr pAddress;
public IntPtr pIpPort;
public IntPtr pSslHash;
retVal = HttpInitialize(httpApiVersion, HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_SSL_SET)));
retVal = HttpSetServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
retVal = HttpDeleteServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
retVal = HttpSetServiceConfiguration(IntPtr.Zero,
IntPtr.Zero);
HttpTerminate(HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 11: HttpTerminate
IntPtr pReserved);
HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); userenv
static extern bool CreateEnvironmentBlock( out IntPtr lpEnvironment, IntPtr hToken, bool bInherit );
Public Shared Function CreateEnvironmentBlock(ByRef lpEnvironment As IntPtr, ByVal hToken As IntPtr, ByVal bInherit As Boolean) As Boolean
internal static extern bool CreateEnvironmentBlock(ref IntPtr lpEnvironment, IntPtr hToken, bool bInherit);
IntPtr env = IntPtr.Zero;
static extern bool DestroyEnvironmentBlock(IntPtr lpEnvironment);
Public Shared Function DestroyEnvironmentBlock(ByVal lpEnvironment As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean 14: FreeGPOList
ref IntPtr pGPOList);
IntPtr pSidUser,
IntPtr pGuidExtension,
ref IntPtr ppGPOList); 16: GetGPOList
IntPtr hToken,
out IntPtr pGPOList); 17: LoadUserProfile
static extern bool LoadUserProfile(IntPtr hToken, ref PROFILEINFO lpProfileInfo);
Public Shared Function LoadUserProfile(ByVal hToken As IntPtr, ByRef lpProfileInfo As PROFILEINFO) As Boolean
static extern bool UnloadUserProfile(IntPtr hToken, IntPtr hProfile); Shared Function UnloadUserProfile(ByVal hToken As IntPtr, ByVal hProfile As IntPtr) As Boolean advapi32
static extern bool AddAccessAllowedAce(IntPtr pAcl, uint dwAceRevision, ACCESS_MASK AccessMask, IntPtr pSid);
Public Function AddAccessAllowedAce(pAcl As IntPtr, _
pSid As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean 20: AddAce
static extern bool AddAce(IntPtr pAcl, uint dwAceRevision, uint dwStartingAceIndex, IntPtr pAceList, uint nAceListLength);
Public Function AddAce(pAcl As IntPtr, _
pAceList As IntPtr, _
static extern bool AdjustTokenPrivileges(IntPtr TokenHandle,
static extern bool AdjustTokenPrivileges(IntPtr TokenHandle,
IntPtr Null1,
IntPtr Null2);
ByVal TokenHandle As IntPtr, _
ByVal TokenHandle As IntPtr, _
ByVal Null1 As IntPtr, _
ByVal Null2 As IntPtr _
ByVal TokenHandle As IntPtr, _
ByRef ReturnLength As IntPtr _
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);
internal static extern IntPtr GetCurrentProcess();
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr
IntPtr hproc = GetCurrentProcess();
IntPtr htok = IntPtr.Zero;
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
var tokenHandle = IntPtr.Zero;
if (tokenHandle != IntPtr.Zero)
internal static extern bool AdjustTokenPrivileges(IntPtr tokenhandle,
uint bufferlength, IntPtr previousState, IntPtr returnlength);
internal static extern IntPtr GetCurrentProcess();
internal static extern bool OpenProcessToken(IntPtr processHandle,
out IntPtr tokenHandle);
internal static extern Boolean CloseHandle(IntPtr hObject);
ByVal ProcessHandle As IntPtr, _
ByRef TokenHandle As IntPtr _
Private Function CloseHandle(ByVal hHandle As IntPtr) As Boolean
ByVal TokenHandle As IntPtr, _
ByRef ReturnLength As IntPtr _
Dim hProc As IntPtr = Process.GetCurrentProcess().Handle
Dim hToken As IntPtr
Dim returnLength As IntPtr
out IntPtr pSid);
ByVal pIdentifierAuthority As IntPtr, _
ByRef pSid As IntPtr) As Boolean
IntPtr AuthenticatedUsersSid = IntPtr.Zero;
Dim AdminGroup as IntPtr
out IntPtr ppAuditCategoriesArray,
IntPtr buffer;
guids[i] = (Guid)Marshal.PtrToStructure((IntPtr)elemOffs, typeof(Guid)); 24: BackupEventLog
public static extern bool BackupEventLog(IntPtr hEventLog, string backupFile);
static extern IntPtr OpenEventLog(string UNCServerName, string sourceName);
static extern bool BackupEventLog(IntPtr hEventLog, string backupFile);
static extern bool CloseEventLog(IntPtr hEventLog);
IntPtr logHandle = OpenEventLog(Environment.MachineName, eventLogName);
if (IntPtr.Zero != logHandle)
Dim pSecDesc, pOldDACL As IntPtr
private static extern void BuildTrusteeWithSid(ref TRUSTEE pTrustee, IntPtr sid);
ByVal pTrustee As IntPtr, _
ByVal pSid As IntPtr _
Dim pSID as IntPtr
IntPtr hService,
IntPtr lpInfo);
IntPtr scHandle = IntPtr.Zero;
IntPtr svcHandle = IntPtr.Zero;
if (scHandle == IntPtr.Zero)
if (svcHandle == IntPtr.Zero)
IntPtr lpsaActions = Marshal.AllocHGlobal(Marshal.SizeOf(action) * 2);
if (lpsaActions == IntPtr.Zero)
IntPtr nextAction = (IntPtr)(lpsaActions.ToInt64() + Marshal.SizeOf(action));
IntPtr lpInfo = Marshal.AllocHGlobal(Marshal.SizeOf(failureActions));
if (lpInfo == IntPtr.Zero)
if (svcHandle != IntPtr.Zero)
if (scHandle != IntPtr.Zero)
IntPtr hService,
IntPtr lpInfo);
IntPtr scHandle = IntPtr.Zero;
IntPtr svcHandle = IntPtr.Zero;
if (scHandle == IntPtr.Zero)
if (svcHandle == IntPtr.Zero)
IntPtr lpsaActions = Marshal.AllocHGlobal(Marshal.SizeOf(action) * 2);
if (lpsaActions == IntPtr.Zero)
IntPtr nextAction = (IntPtr)(lpsaActions.ToInt64() + Marshal.SizeOf(action));
IntPtr lpInfo = Marshal.AllocHGlobal(Marshal.SizeOf(failureActions));
if (lpInfo == IntPtr.Zero)
if (svcHandle != IntPtr.Zero)
if (scHandle != IntPtr.Zero)
static extern bool CheckTokenMembership(IntPtr TokenHandle, IntPtr SidToCheck, out bool IsMember);
ByVal TokenHandle As IntPtr, _
ByVal SidToCheck As IntPtr, _
Dim Token, ImpersonatedToken, AdminGroup As IntPtr 30: ClearEventLog
IntPtr hEventLog,
IntPtr hEventLog = IntPtr.Zero;
hEventLog = NativeMethods.OpenEventLog(IntPtr.Zero, logName);
if (hEventLog == IntPtr.Zero) 31: CloseEventLog
static extern bool CloseEventLog(IntPtr hEventLog);
public static extern bool CloseServiceHandle( IntPtr hSCObject );
Private Shared Function CloseServiceHandle(ByVal serviceHandle As IntPtr) As Boolean
Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As IntPtr) As Boolean 33: ControlService
public static extern bool ControlService(IntPtr hService, SERVICE_CONTROL dwControl, ref SERVICE_STATUS lpServiceStatus);
Public Function ControlService(ByVal hService As IntPtr, ByVal dwControl As SERVICE_CONTROL, ByRef lpServiceStatus As SERVICE_STATUS) As Boolean
IntPtr con = Tools.OpenSCManager("\\\\compname", null, (uint)SCM_ACCESS.SC_MANAGER_ALL_ACCESS);
IntPtr serv = Tools.OpenService(con, "ServiceTest", (uint)SERVICE_ACCESS.SERVICE_ALL_ACCESS);
private IntPtr serviceControlManagerHandle;
private IntPtr serviceHandle;
private IntPtr statusHandle;
if (serviceControlManagerHandle == IntPtr.Zero)
if (serviceHandle == IntPtr.Zero)
statusHandle = (IntPtr) (fieldInfo.GetValue (aServiceBase));
if (statusHandle == IntPtr.Zero)
IntPtr hService,
internal static extern IntPtr OpenSCManager (
internal static extern IntPtr OpenService (IntPtr hSCManager, string lpServiceName, uint dwDesiredAccess);
internal static extern bool CloseServiceHandle (IntPtr hSCObject);
internal static extern bool QueryServiceStatus (IntPtr hService, ref SERVICE_STATUS dwServiceStatus);
internal static extern bool SetServiceStatus (IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus);
Declare Unicode Function ConvertSecurityDescriptorToStringSecurityDescriptor Lib "advapi32.dll" Alias "ConvertSecurityDescriptorToStringSecurityDescriptorW" (SD As IntPtr, SDRevision As Integer, SecurityInfo As SECURITY_INFORMATION, ByRef StringSD As IntPtr, StringSDLength As IntPtr) As Boolean
out IntPtr ptrSid);
static extern bool ConvertSidToStringSid(IntPtr pSid, out string strSid);
ByRef ptrSid As IntPtr) As Boolean As explained [here], memory for the returned unmanaged string must be freed by calling LocalFree. Therefore, you must define the string as an IntPtr in managed code and call LocalFree yourself. Otherwise, the marshaler would call CoTaskMemFree which is not correct in this case.
IntPtr ptrSid;
IntPtr sidPtr = Marshal.AllocHGlobal( SID.Length);
ConvertSidToStringSid((IntPtr)sidPtr, ref sSID);
Dim ptrSID As IntPtr = Nothing
Dim ptrSID As IntPtr = Nothing
out IntPtr SecurityDescriptor,
out UIntPtr SecurityDescriptorSize
out IntPtr ptrSid
ByVal Sid As IntPtr, _
ByRef StringSid As IntPtr _
out IntPtr ptrSid);
static extern int GetLengthSid(IntPtr pSID);
IntPtr SID_ptr=new IntPtr(0); 38: CopySid
static extern bool CopySid(uint nDestinationSidLength, IntPtr pDestinationSid,
IntPtr pSourceSid);
IntPtr pSourceSid);
ByVal pDestinationSid As IntPtr, ByVal pSourceSid As IntPtr) As Boolean
private static byte[] DuplicateSid(IntPtr pSid)
IntPtr hToken,
IntPtr lpEnvironment,
ByVal hToken As IntPtr, _
ByVal lpEnvironment As IntPtr, _
ByVal hToken As IntPtr, _
ByVal lpProcessAttributes As IntPtr, _
ByVal lpThreadAttributes As IntPtr, _
ByVal lpEnvironment As IntPtr, _
System.IntPtr hToken;
null, saThreadAttributes, false, 0, IntPtr.Zero, 0, si, pi))
Dim hToken as System.IntPtr
saThreadAttributes, False, 0, IntPtr.Zero, 0, si, pi) Then
Public stdInput As IntPtr
Public stdOutput As IntPtr
Public stdError As IntPtr
Public process As IntPtr
Public thread As IntPtr
Public Function GetExitCodeProcess(ByVal process As IntPtr, ByRef exitCode As UInt32) As Boolean
Public Function WaitForSingleObject(ByVal handle As IntPtr, ByVal milliseconds As UInt32) As UInt32
Public Function GetStdHandle(ByVal handle As IntPtr) As IntPtr
Public Function CloseHandle(ByVal handle As IntPtr) As Boolean
Dim MyPointer As IntPtr = Marshal.AllocHGlobal(4)
Dim MyErrorPointer As IntPtr = Marshal.AllocHGlobal(4)
public IntPtr stdInput;
public IntPtr stdOutput;
public IntPtr stdError;
public IntPtr process;
public IntPtr thread;
public static extern bool GetExitCodeProcess(IntPtr process, ref UInt32 exitCode);
public static extern UInt32 WaitForSingleObject(IntPtr handle, UInt32 milliseconds);
public static extern IntPtr GetStdHandle(IntPtr handle);
public static extern bool CloseHandle(IntPtr handle);
startupInfo.stdOutput = (IntPtr)StdOutputHandle;
startupInfo.stdError = (IntPtr)StdErrorHandle; 41: CreateService
static extern IntPtr CreateService(
IntPtr hSCManager,
Private Shared Function CreateService(ByVal hSCManager As IntPtr, ByVal serviceName As String, _
ByVal serviceStartName As String, ByVal password As String) As IntPtr
Dim scHandle As IntPtr = OpenSCManager(Nothing, Nothing, SC_MANAGER_ALL_ACCESS)
Dim serviceHandle As IntPtr = CreateService(scHandle, serviceName, displayName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, _
If serviceHandle.Equals(IntPtr.Zero) Then
IntPtr DomainSid,
IntPtr pSid,
ByVal DomainSid As IntPtr, _
ByVal pSID As IntPtr, _
IntPtr domainSid = IntPtr.Zero;
IntPtr pSid = IntPtr.Zero;
If CreateWellKnownSid(WinWorldSid, IntPtr.Zero, EveryoneSID, sidsize) = False Then 43: CredDelete
public IntPtr target; 44: CredFree
static extern bool CredFree([In] IntPtr buffer);
Declare Function CredFree Lib "advapi32.dll" (Buffer As IntPtr) As Boolean
IntPtr credential,
out IntPtr marshaledCredential); One needs to free the string returned in the "out IntPtr marshaledCredential" parameter!
IntPtr pCertInfo = Marshal.AllocHGlobal(size);
IntPtr marshaledCredential = IntPtr.Zero;
if (marshaledCredential != IntPtr.Zero) 46: CredRead
public static extern bool CredRead(string target, CRED_TYPE type, int reservedFlag, out IntPtr credentialPtr);
public IntPtr credentialBlob;
public IntPtr credAttribute;
IntPtr credPtr;
if(!credPtr.Equals(IntPtr.Zero))
credPtr = IntPtr.Zero; 47: CredRead
IntPtr Value;
public IntPtr CredentialBlob;
public IntPtr Attributes;
public void CleanUpNativeData(IntPtr pNativeData)
if (pNativeData == IntPtr.Zero)
public IntPtr MarshalManagedToNative(object obj)
public object MarshalNativeToManaged(IntPtr pNativeData)
if (pNativeData == IntPtr.Zero) 48: CredWrite
public IntPtr credentialBlob;
public IntPtr credAttribute;
public IntPtr targetName;
public IntPtr comment;
public IntPtr credentialBlob;
public IntPtr Attributes;
public IntPtr targetAlias;
public IntPtr userName;
static extern bool CryptAcquireContext(ref IntPtr hProv, string pszContainer,
Declare Function CryptAcquireContext Lib "advapi32.dll" (ByRef hProv As IntPtr, _
out IntPtr phProv, IntPtr hProv = new IntPtr(); 50: CryptCreateHash
public static extern bool CryptCreateHash(IntPtr hProv, uint algId, IntPtr hKey, uint dwFlags, ref IntPtr phHash);
Declare Auto Function CryptCreateHash Lib "advapi32.dll" (ByVal hProv As IntPtr, _
ByVal algId As Integer, ByVal hKey As IntPtr, ByVal dwFlags As Integer, _
ByRef phHast As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean 51: CryptDecrypt
public static extern bool CryptDecrypt(IntPtr hKey, IntPtr hHash, int Final, uint dwFlags, byte[] pbData, ref uint pdwDataLen);
Declare Function CryptDecrypt Lib "advapi32.dll" (ByVal hkey As IntPtr, _
ByVal hHash As IntPtr, <MarshalAs(UnmanagedType.Bool)> ByVal final As Boolean, _ 52: CryptDeriveKey
public static extern bool CryptDeriveKey(IntPtr hProv,int Algid, IntPtr hBaseData, int flags, ref IntPtr phKey);
Declare Function CryptDeriveKey Lib "advapi32.dll" (ByVal hProv As IntPtr, _
ByVal Algid As Integer, ByVal hBaseData As IntPtr, ByVal flags As Integer, _
ByRef phKey As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean 53: CryptDestroyHash
public static extern bool CryptDestroyHash(IntPtr hHash);
Declare Function CryptDestroyHash Lib "advapi32.dll" (ByVal hHash As IntPtr) _ 54: CryptDestroyKey
public static extern bool CryptDestroyKey(IntPtr phKey);
Declare Function CryptDestroyKey Lib "advapi32.dll" (ByVal hKey As IntPtr) _
public static extern bool CryptDuplicateKey(IntPtr hKey, IntPtr pdwReserved,
uint dwFlags, ref IntPtr phKey); 56: CryptEncrypt
public static extern bool CryptEncrypt(IntPtr hKey, IntPtr hHash, int Final, uint dwFlags, byte[] pbData, ref uint pdwDataLen, uint dwBufLen);
Declare Function CryptEncrypt Lib "advapi32.dll" (ByVal hkey As IntPtr, _
ByVal hHash As IntPtr, <MarshalAs(UnmanagedType.Bool)> ByVal final As Boolean, ByVal flags As Integer, _
IntPtr pdwReserved,
IntPtr pdwReserved,
while (CryptEnumProviders(dwIndex, IntPtr.Zero, 0, ref dwType, null, ref cbName))
if (CryptEnumProviders(dwIndex++, IntPtr.Zero, 0, ref dwType, pszName, ref cbName)) 58: CryptExportKey
public static extern bool CryptExportKey(IntPtr hKey, IntPtr hExpKey, uint dwBlobType, uint dwFlags, [In, Out] byte[] pbData, ref uint dwDataLen); 59: CryptGenKey
[In] IntPtr hProv,
[Out] out IntPtr phKey
Public Shared Function CryptGenKey(ByVal hProv As IntPtr, ByVal Algid As UInteger, ByVal dwFlags As UInteger, ByRef phKey As IntPtr) As Boolean
IntPtr hKey = IntPtr.Zero; 60: CryptGenRandom
static extern bool CryptGenRandom(IntPtr hProv, uint dwLen, byte[] pbBuffer);
Declare Function CryptGenRandom Lib "advapi32.dll" (ByVal hProv As IntPtr, ByVal dwLen As Integer, ByVal pbBuffer As Byte()) As Boolean Cut off search results after 60. Please refine your search. |