diff --git a/generation/um/WinTrust/generate.rsp b/generation/um/WinTrust/generate.rsp index 8afd53cf92..e29759ce31 100644 --- a/generation/um/WinTrust/generate.rsp +++ b/generation/um/WinTrust/generate.rsp @@ -77,6 +77,7 @@ _WIN_TRUST_ACTDATA_SUBJECT_ONLY=WIN_TRUST_ACTDATA_SUBJECT_ONLY _WIN_TRUST_SUBJECT_FILE=WIN_TRUST_SUBJECT_FILE _WIN_TRUST_SUBJECT_FILE_AND_DISPLAY=WIN_TRUST_SUBJECT_FILE_AND_DISPLAY _WINTRUST_DATA=WINTRUST_DATA +HANDLE=IntPtr HWND__*=IntPtr SIP_DISPATCH_INFO_=SIP_DISPATCH_INFO SIP_INDIRECT_DATA_=SIP_INDIRECT_DATA diff --git a/generation/um/mssip/generate.rsp b/generation/um/mssip/generate.rsp index 1444b27d84..46c1633860 100644 --- a/generation/um/mssip/generate.rsp +++ b/generation/um/mssip/generate.rsp @@ -29,6 +29,7 @@ _CRYPTOAPI_BLOB=CRYPTOAPI_BLOB _GUID=Guid _SIP_CAP_SET_V2=SIP_CAP_SET_V2 _SIP_CAP_SET_V3=SIP_CAP_SET_V3 +HANDLE=IntPtr MS_ADDINFO_BLOB_=MS_ADDINFO_BLOB MS_ADDINFO_CATALOGMEMBER_=MS_ADDINFO_CATALOGMEMBER MS_ADDINFO_FLAT_=MS_ADDINFO_FLAT diff --git a/generation/um/wincrypt/generate.rsp b/generation/um/wincrypt/generate.rsp index d7328931ae..4e663762c2 100644 --- a/generation/um/wincrypt/generate.rsp +++ b/generation/um/wincrypt/generate.rsp @@ -351,6 +351,7 @@ _SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA=SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_P _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA=SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS=SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS _SYSTEMTIME=SYSTEMTIME +HANDLE=IntPtr HINSTANCE__*=IntPtr HKEY__*=IntPtr ULONG_PTR=UIntPtr diff --git a/sources/Interop/Advapi32/um/wincrypt/Advapi32.cs b/sources/Interop/Advapi32/um/wincrypt/Advapi32.cs index 840cd8e939..7a444d4d89 100644 --- a/sources/Interop/Advapi32/um/wincrypt/Advapi32.cs +++ b/sources/Interop/Advapi32/um/wincrypt/Advapi32.cs @@ -904,27 +904,27 @@ public static unsafe partial class Advapi32 [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptCreateAsyncHandle", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptCreateAsyncHandle([NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("PHCRYPTASYNC")] void** phAsync); + public static extern int CryptCreateAsyncHandle([NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("PHCRYPTASYNC")] IntPtr* phAsync); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptSetAsyncParam", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptSetAsyncParam([NativeTypeName("HCRYPTASYNC")] void* hAsync, [NativeTypeName("LPSTR")] sbyte* pszParamOid, [NativeTypeName("LPVOID")] void* pvParam, [NativeTypeName("PFN_CRYPT_ASYNC_PARAM_FREE_FUNC")] IntPtr* pfnFree); + public static extern int CryptSetAsyncParam([NativeTypeName("HCRYPTASYNC")] IntPtr hAsync, [NativeTypeName("LPSTR")] sbyte* pszParamOid, [NativeTypeName("LPVOID")] void* pvParam, [NativeTypeName("PFN_CRYPT_ASYNC_PARAM_FREE_FUNC")] IntPtr* pfnFree); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptGetAsyncParam", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptGetAsyncParam([NativeTypeName("HCRYPTASYNC")] void* hAsync, [NativeTypeName("LPSTR")] sbyte* pszParamOid, [NativeTypeName("LPVOID *")] void** ppvParam, [NativeTypeName("PFN_CRYPT_ASYNC_PARAM_FREE_FUNC *")] IntPtr** ppfnFree); + public static extern int CryptGetAsyncParam([NativeTypeName("HCRYPTASYNC")] IntPtr hAsync, [NativeTypeName("LPSTR")] sbyte* pszParamOid, [NativeTypeName("LPVOID *")] void** ppvParam, [NativeTypeName("PFN_CRYPT_ASYNC_PARAM_FREE_FUNC *")] IntPtr** ppfnFree); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptCloseAsyncHandle", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptCloseAsyncHandle([NativeTypeName("HCRYPTASYNC")] void* hAsync); + public static extern int CryptCloseAsyncHandle([NativeTypeName("HCRYPTASYNC")] IntPtr hAsync); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptRetrieveObjectByUrlA", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptRetrieveObjectByUrlA([NativeTypeName("LPCSTR")] sbyte* pszUrl, [NativeTypeName("LPCSTR")] sbyte* pszObjectOid, [NativeTypeName("DWORD")] uint dwRetrievalFlags, [NativeTypeName("DWORD")] uint dwTimeout, [NativeTypeName("LPVOID *")] void** ppvObject, [NativeTypeName("HCRYPTASYNC")] void* hAsyncRetrieve, [NativeTypeName("PCRYPT_CREDENTIALS")] CRYPT_CREDENTIALS* pCredentials, [NativeTypeName("LPVOID")] void* pvVerify, [NativeTypeName("PCRYPT_RETRIEVE_AUX_INFO")] CRYPT_RETRIEVE_AUX_INFO* pAuxInfo); + public static extern int CryptRetrieveObjectByUrlA([NativeTypeName("LPCSTR")] sbyte* pszUrl, [NativeTypeName("LPCSTR")] sbyte* pszObjectOid, [NativeTypeName("DWORD")] uint dwRetrievalFlags, [NativeTypeName("DWORD")] uint dwTimeout, [NativeTypeName("LPVOID *")] void** ppvObject, [NativeTypeName("HCRYPTASYNC")] IntPtr hAsyncRetrieve, [NativeTypeName("PCRYPT_CREDENTIALS")] CRYPT_CREDENTIALS* pCredentials, [NativeTypeName("LPVOID")] void* pvVerify, [NativeTypeName("PCRYPT_RETRIEVE_AUX_INFO")] CRYPT_RETRIEVE_AUX_INFO* pAuxInfo); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptRetrieveObjectByUrlW", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptRetrieveObjectByUrlW([NativeTypeName("LPCWSTR")] ushort* pszUrl, [NativeTypeName("LPCSTR")] sbyte* pszObjectOid, [NativeTypeName("DWORD")] uint dwRetrievalFlags, [NativeTypeName("DWORD")] uint dwTimeout, [NativeTypeName("LPVOID *")] void** ppvObject, [NativeTypeName("HCRYPTASYNC")] void* hAsyncRetrieve, [NativeTypeName("PCRYPT_CREDENTIALS")] CRYPT_CREDENTIALS* pCredentials, [NativeTypeName("LPVOID")] void* pvVerify, [NativeTypeName("PCRYPT_RETRIEVE_AUX_INFO")] CRYPT_RETRIEVE_AUX_INFO* pAuxInfo); + public static extern int CryptRetrieveObjectByUrlW([NativeTypeName("LPCWSTR")] ushort* pszUrl, [NativeTypeName("LPCSTR")] sbyte* pszObjectOid, [NativeTypeName("DWORD")] uint dwRetrievalFlags, [NativeTypeName("DWORD")] uint dwTimeout, [NativeTypeName("LPVOID *")] void** ppvObject, [NativeTypeName("HCRYPTASYNC")] IntPtr hAsyncRetrieve, [NativeTypeName("PCRYPT_CREDENTIALS")] CRYPT_CREDENTIALS* pCredentials, [NativeTypeName("LPVOID")] void* pvVerify, [NativeTypeName("PCRYPT_RETRIEVE_AUX_INFO")] CRYPT_RETRIEVE_AUX_INFO* pAuxInfo); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptInstallCancelRetrieval", ExactSpelling = true)] [return: NativeTypeName("BOOL")] @@ -936,7 +936,7 @@ public static unsafe partial class Advapi32 [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptCancelAsyncRetrieval", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptCancelAsyncRetrieval([NativeTypeName("HCRYPTASYNC")] void* hAsyncRetrieval); + public static extern int CryptCancelAsyncRetrieval([NativeTypeName("HCRYPTASYNC")] IntPtr hAsyncRetrieval); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptGetObjectUrl", ExactSpelling = true)] [return: NativeTypeName("BOOL")] @@ -972,18 +972,18 @@ public static unsafe partial class Advapi32 [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CertCreateCertificateChainEngine", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CertCreateCertificateChainEngine([NativeTypeName("PCERT_CHAIN_ENGINE_CONFIG")] CERT_CHAIN_ENGINE_CONFIG* pConfig, [NativeTypeName("HCERTCHAINENGINE *")] void** phChainEngine); + public static extern int CertCreateCertificateChainEngine([NativeTypeName("PCERT_CHAIN_ENGINE_CONFIG")] CERT_CHAIN_ENGINE_CONFIG* pConfig, [NativeTypeName("HCERTCHAINENGINE *")] IntPtr* phChainEngine); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CertFreeCertificateChainEngine", ExactSpelling = true)] - public static extern void CertFreeCertificateChainEngine([NativeTypeName("HCERTCHAINENGINE")] void* hChainEngine); + public static extern void CertFreeCertificateChainEngine([NativeTypeName("HCERTCHAINENGINE")] IntPtr hChainEngine); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CertResyncCertificateChainEngine", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CertResyncCertificateChainEngine([NativeTypeName("HCERTCHAINENGINE")] void* hChainEngine); + public static extern int CertResyncCertificateChainEngine([NativeTypeName("HCERTCHAINENGINE")] IntPtr hChainEngine); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CertGetCertificateChain", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CertGetCertificateChain([NativeTypeName("HCERTCHAINENGINE")] void* hChainEngine, [NativeTypeName("PCCERT_CONTEXT")] CERT_CONTEXT* pCertContext, [NativeTypeName("LPFILETIME")] FILETIME* pTime, [NativeTypeName("HCERTSTORE")] void* hAdditionalStore, [NativeTypeName("PCERT_CHAIN_PARA")] CERT_CHAIN_PARA* pChainPara, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPVOID")] void* pvReserved, [NativeTypeName("PCCERT_CHAIN_CONTEXT *")] CERT_CHAIN_CONTEXT** ppChainContext); + public static extern int CertGetCertificateChain([NativeTypeName("HCERTCHAINENGINE")] IntPtr hChainEngine, [NativeTypeName("PCCERT_CONTEXT")] CERT_CONTEXT* pCertContext, [NativeTypeName("LPFILETIME")] FILETIME* pTime, [NativeTypeName("HCERTSTORE")] void* hAdditionalStore, [NativeTypeName("PCERT_CHAIN_PARA")] CERT_CHAIN_PARA* pChainPara, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPVOID")] void* pvReserved, [NativeTypeName("PCCERT_CHAIN_CONTEXT *")] CERT_CHAIN_CONTEXT** ppChainContext); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CertFreeCertificateChain", ExactSpelling = true)] public static extern void CertFreeCertificateChain([NativeTypeName("PCCERT_CHAIN_CONTEXT")] CERT_CHAIN_CONTEXT* pChainContext); diff --git a/sources/Interop/Advapi32/um/wincrypt/CERT_REVOCATION_CHAIN_PARA.cs b/sources/Interop/Advapi32/um/wincrypt/CERT_REVOCATION_CHAIN_PARA.cs index ea1c758dbf..d9e9c094e2 100644 --- a/sources/Interop/Advapi32/um/wincrypt/CERT_REVOCATION_CHAIN_PARA.cs +++ b/sources/Interop/Advapi32/um/wincrypt/CERT_REVOCATION_CHAIN_PARA.cs @@ -3,6 +3,8 @@ // Ported from um/wincrypt.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct CERT_REVOCATION_CHAIN_PARA @@ -11,7 +13,7 @@ public unsafe partial struct CERT_REVOCATION_CHAIN_PARA public uint cbSize; [NativeTypeName("HCERTCHAINENGINE")] - public void* hChainEngine; + public IntPtr hChainEngine; [NativeTypeName("HCERTSTORE")] public void* hAdditionalStore; diff --git a/sources/Interop/Advapi32/um/wincrypt/CERT_SELECT_CHAIN_PARA.cs b/sources/Interop/Advapi32/um/wincrypt/CERT_SELECT_CHAIN_PARA.cs index aaeea86466..eba025b867 100644 --- a/sources/Interop/Advapi32/um/wincrypt/CERT_SELECT_CHAIN_PARA.cs +++ b/sources/Interop/Advapi32/um/wincrypt/CERT_SELECT_CHAIN_PARA.cs @@ -3,12 +3,14 @@ // Ported from um/wincrypt.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct CERT_SELECT_CHAIN_PARA { [NativeTypeName("HCERTCHAINENGINE")] - public void* hChainEngine; + public IntPtr hChainEngine; [NativeTypeName("PFILETIME")] public FILETIME* pTime; diff --git a/sources/Interop/Advapi32/um/wincrypt/PFN_CANCEL_ASYNC_RETRIEVAL_FUNC.cs b/sources/Interop/Advapi32/um/wincrypt/PFN_CANCEL_ASYNC_RETRIEVAL_FUNC.cs index f0edff3a85..af263acfb8 100644 --- a/sources/Interop/Advapi32/um/wincrypt/PFN_CANCEL_ASYNC_RETRIEVAL_FUNC.cs +++ b/sources/Interop/Advapi32/um/wincrypt/PFN_CANCEL_ASYNC_RETRIEVAL_FUNC.cs @@ -3,11 +3,12 @@ // Ported from um/wincrypt.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; using System.Runtime.InteropServices; namespace TerraFX.Interop { [UnmanagedFunctionPointer(CallingConvention.Winapi)] [return: NativeTypeName("BOOL")] - public unsafe delegate int PFN_CANCEL_ASYNC_RETRIEVAL_FUNC([NativeTypeName("HCRYPTASYNC")] void* hAsyncRetrieve); + public delegate int PFN_CANCEL_ASYNC_RETRIEVAL_FUNC([NativeTypeName("HCRYPTASYNC")] IntPtr hAsyncRetrieve); } diff --git a/sources/Interop/Crypt32/um/mssip/Crypt32.cs b/sources/Interop/Crypt32/um/mssip/Crypt32.cs index 754e11f1d7..67baa1d585 100644 --- a/sources/Interop/Crypt32/um/mssip/Crypt32.cs +++ b/sources/Interop/Crypt32/um/mssip/Crypt32.cs @@ -38,11 +38,11 @@ public static unsafe partial class Crypt32 [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptSIPRetrieveSubjectGuid", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptSIPRetrieveSubjectGuid([NativeTypeName("LPCWSTR")] ushort* FileName, [NativeTypeName("HANDLE")] void* hFileIn, [NativeTypeName("GUID *")] Guid* pgSubject); + public static extern int CryptSIPRetrieveSubjectGuid([NativeTypeName("LPCWSTR")] ushort* FileName, [NativeTypeName("HANDLE")] IntPtr hFileIn, [NativeTypeName("GUID *")] Guid* pgSubject); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptSIPRetrieveSubjectGuidForCatalogFile", ExactSpelling = true)] [return: NativeTypeName("BOOL")] - public static extern int CryptSIPRetrieveSubjectGuidForCatalogFile([NativeTypeName("LPCWSTR")] ushort* FileName, [NativeTypeName("HANDLE")] void* hFileIn, [NativeTypeName("GUID *")] Guid* pgSubject); + public static extern int CryptSIPRetrieveSubjectGuidForCatalogFile([NativeTypeName("LPCWSTR")] ushort* FileName, [NativeTypeName("HANDLE")] IntPtr hFileIn, [NativeTypeName("GUID *")] Guid* pgSubject); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "CryptSIPAddProvider", ExactSpelling = true)] [return: NativeTypeName("BOOL")] diff --git a/sources/Interop/Crypt32/um/mssip/SIP_DISPATCH_INFO.cs b/sources/Interop/Crypt32/um/mssip/SIP_DISPATCH_INFO.cs index b46e4468a8..0749eacd3f 100644 --- a/sources/Interop/Crypt32/um/mssip/SIP_DISPATCH_INFO.cs +++ b/sources/Interop/Crypt32/um/mssip/SIP_DISPATCH_INFO.cs @@ -13,7 +13,7 @@ public unsafe partial struct SIP_DISPATCH_INFO public uint cbSize; [NativeTypeName("HANDLE")] - public void* hSIP; + public IntPtr hSIP; [NativeTypeName("pCryptSIPGetSignedDataMsg")] public IntPtr* pfGet; diff --git a/sources/Interop/Crypt32/um/mssip/SIP_SUBJECTINFO.cs b/sources/Interop/Crypt32/um/mssip/SIP_SUBJECTINFO.cs index 4bf2c6ea65..acde4a6770 100644 --- a/sources/Interop/Crypt32/um/mssip/SIP_SUBJECTINFO.cs +++ b/sources/Interop/Crypt32/um/mssip/SIP_SUBJECTINFO.cs @@ -17,7 +17,7 @@ public unsafe partial struct SIP_SUBJECTINFO public Guid* pgSubjectType; [NativeTypeName("HANDLE")] - public void* hFile; + public IntPtr hFile; [NativeTypeName("LPCWSTR")] public ushort* pwsFileName; diff --git a/sources/Interop/Crypt32/um/mssip/pfnIsFileSupported.cs b/sources/Interop/Crypt32/um/mssip/pfnIsFileSupported.cs index 89f30f36d7..e4e247d315 100644 --- a/sources/Interop/Crypt32/um/mssip/pfnIsFileSupported.cs +++ b/sources/Interop/Crypt32/um/mssip/pfnIsFileSupported.cs @@ -10,5 +10,5 @@ namespace TerraFX.Interop { [UnmanagedFunctionPointer(CallingConvention.Winapi)] [return: NativeTypeName("BOOL")] - public unsafe delegate int pfnIsFileSupported([NativeTypeName("HANDLE")] void* hFile, [NativeTypeName("GUID *")] Guid* pgSubject); + public unsafe delegate int pfnIsFileSupported([NativeTypeName("HANDLE")] IntPtr hFile, [NativeTypeName("GUID *")] Guid* pgSubject); } diff --git a/sources/Interop/WinTrust/um/wintrust/WINTRUST_CATALOG_INFO.cs b/sources/Interop/WinTrust/um/wintrust/WINTRUST_CATALOG_INFO.cs index 49d631f918..41753c2184 100644 --- a/sources/Interop/WinTrust/um/wintrust/WINTRUST_CATALOG_INFO.cs +++ b/sources/Interop/WinTrust/um/wintrust/WINTRUST_CATALOG_INFO.cs @@ -3,6 +3,8 @@ // Ported from um/WinTrust.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct WINTRUST_CATALOG_INFO @@ -23,7 +25,7 @@ public unsafe partial struct WINTRUST_CATALOG_INFO public ushort* pcwszMemberFilePath; [NativeTypeName("HANDLE")] - public void* hMemberFile; + public IntPtr hMemberFile; [NativeTypeName("BYTE *")] public byte* pbCalculatedFileHash; @@ -35,6 +37,6 @@ public unsafe partial struct WINTRUST_CATALOG_INFO public CTL_CONTEXT* pcCatalogContext; [NativeTypeName("HCATADMIN")] - public void* hCatAdmin; + public IntPtr hCatAdmin; } } diff --git a/sources/Interop/WinTrust/um/wintrust/WINTRUST_DATA.cs b/sources/Interop/WinTrust/um/wintrust/WINTRUST_DATA.cs index ee400e692a..26cbbbb603 100644 --- a/sources/Interop/WinTrust/um/wintrust/WINTRUST_DATA.cs +++ b/sources/Interop/WinTrust/um/wintrust/WINTRUST_DATA.cs @@ -3,6 +3,7 @@ // Ported from um/WinTrust.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; using System.Runtime.InteropServices; namespace TerraFX.Interop @@ -34,7 +35,7 @@ public unsafe partial struct WINTRUST_DATA public uint dwStateAction; [NativeTypeName("HANDLE")] - public void* hWVTStateData; + public IntPtr hWVTStateData; [NativeTypeName("WCHAR *")] public ushort* pwszURLReference; diff --git a/sources/Interop/WinTrust/um/wintrust/WINTRUST_FILE_INFO.cs b/sources/Interop/WinTrust/um/wintrust/WINTRUST_FILE_INFO.cs index ed342319d2..b9c1115f2f 100644 --- a/sources/Interop/WinTrust/um/wintrust/WINTRUST_FILE_INFO.cs +++ b/sources/Interop/WinTrust/um/wintrust/WINTRUST_FILE_INFO.cs @@ -16,7 +16,7 @@ public unsafe partial struct WINTRUST_FILE_INFO public ushort* pcwszFilePath; [NativeTypeName("HANDLE")] - public void* hFile; + public IntPtr hFile; [NativeTypeName("GUID *")] public Guid* pgKnownSubject; diff --git a/sources/Interop/WinTrust/um/wintrust/WIN_SPUB_TRUSTED_PUBLISHER_DATA.cs b/sources/Interop/WinTrust/um/wintrust/WIN_SPUB_TRUSTED_PUBLISHER_DATA.cs index 1dc969f4a3..7f8f99f90b 100644 --- a/sources/Interop/WinTrust/um/wintrust/WIN_SPUB_TRUSTED_PUBLISHER_DATA.cs +++ b/sources/Interop/WinTrust/um/wintrust/WIN_SPUB_TRUSTED_PUBLISHER_DATA.cs @@ -3,12 +3,14 @@ // Ported from um/WinTrust.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct WIN_SPUB_TRUSTED_PUBLISHER_DATA { [NativeTypeName("HANDLE")] - public void* hClientToken; + public IntPtr hClientToken; [NativeTypeName("LPWIN_CERTIFICATE")] public WIN_CERTIFICATE* lpCertificate; diff --git a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT.cs b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT.cs index e3e0630d89..136a5f7af0 100644 --- a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT.cs +++ b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT.cs @@ -10,7 +10,7 @@ namespace TerraFX.Interop public unsafe partial struct WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT { [NativeTypeName("HANDLE")] - public void* hClientToken; + public IntPtr hClientToken; [NativeTypeName("GUID *")] public Guid* SubjectType; diff --git a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE.cs b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE.cs index 3ee85c8880..f2768696ae 100644 --- a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE.cs +++ b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE.cs @@ -3,12 +3,14 @@ // Ported from um/WinTrust.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct WIN_TRUST_SUBJECT_FILE { [NativeTypeName("HANDLE")] - public void* hFile; + public IntPtr hFile; [NativeTypeName("LPCWSTR")] public ushort* lpPath; diff --git a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE_AND_DISPLAY.cs b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE_AND_DISPLAY.cs index 0da659ef09..15dcaace87 100644 --- a/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE_AND_DISPLAY.cs +++ b/sources/Interop/WinTrust/um/wintrust/WIN_TRUST_SUBJECT_FILE_AND_DISPLAY.cs @@ -3,12 +3,14 @@ // Ported from um/WinTrust.h in the Windows SDK for Windows 10.0.18362.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public unsafe partial struct WIN_TRUST_SUBJECT_FILE_AND_DISPLAY { [NativeTypeName("HANDLE")] - public void* hFile; + public IntPtr hFile; [NativeTypeName("LPCWSTR")] public ushort* lpPath; diff --git a/sources/Interop/WinTrust/um/wintrust/WinTrust.cs b/sources/Interop/WinTrust/um/wintrust/WinTrust.cs index 780b406d3c..a35f600ec1 100644 --- a/sources/Interop/WinTrust/um/wintrust/WinTrust.cs +++ b/sources/Interop/WinTrust/um/wintrust/WinTrust.cs @@ -57,7 +57,7 @@ public static unsafe partial class WinTrust [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "WTHelperProvDataFromStateData", ExactSpelling = true)] [return: NativeTypeName("CRYPT_PROVIDER_DATA *")] - public static extern CRYPT_PROVIDER_DATA* WTHelperProvDataFromStateData([NativeTypeName("HANDLE")] void* hStateData); + public static extern CRYPT_PROVIDER_DATA* WTHelperProvDataFromStateData([NativeTypeName("HANDLE")] IntPtr hStateData); [DllImport(LibraryPath, CallingConvention = CallingConvention.Winapi, EntryPoint = "WTHelperGetProvPrivateDataFromChain", ExactSpelling = true)] [return: NativeTypeName("CRYPT_PROVIDER_PRIVDATA *")]