You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the 10.0.19041.5-preview.39 NuGet the DWORD *CryptQueryObject parameters (pdwContentType and pdwFormatType) have CERT_QUERY_FLAGS and CERT_QUERY_FORMAT_TYPE types respectively.
The same issue applies to CryptAcquireCertificatePrivateKey (pdwKeySpec). I didn't find any more cases - most DWORD * parameters I found in the Windows SDK header files are just uint * in the .winmd.
[DllImport("CRYPT32",ExactSpelling=true,SetLastError=true)]publicunsafestaticexternBOOLCryptQueryObject([In]CryptQueryObject_dwObjectTypeFlagsdwObjectType,// This enum does not contain flags (and has no// [Flags] attribute), but has "Flags" in name[In][Const]void*pvObject,[In]CERT_QUERY_FLAGSdwExpectedContentTypeFlags,// Contains invalid "flags", it should contain only// the CERT_QUERY_CONTENT_FLAG_* ones[In]CERT_QUERY_FORMAT_FLAGSdwExpectedFormatTypeFlags,[In]uintdwFlags,[Optional][Out]CertOpenStore_dwEncodingTypepdwMsgAndCertEncodingType,[Optional][Out]CERT_QUERY_FLAGSpdwContentType,// It should be a pointer, not a value. The enum// contains too many values and should not be marked// with the [Flags] attribute. This enum should// contain only /CERT_QUERY_CONTENT_(?!FLAG_)\w+/// values.[Optional][Out]CERT_QUERY_FORMAT_TYPEpdwFormatType,// It should be a pointer, not a value[Optional][Out]void**phCertStore,[Optional][Out]void**phMsg,[Optional][Out][Const]void**ppvContext);
The text was updated successfully, but these errors were encountered:
This problem can also affect other pointer type parameters such as LPDWORD.
The InternetGetConnectedStateExA/W functions have _Out_opt_ LPDWORD lpdwFlags as the first parameter, but in the metadata the pointer is lost:
In the
10.0.19041.5-preview.39
NuGet theDWORD *
CryptQueryObject
parameters (pdwContentType
andpdwFormatType
) haveCERT_QUERY_FLAGS
andCERT_QUERY_FORMAT_TYPE
types respectively.The same issue applies to
CryptAcquireCertificatePrivateKey
(pdwKeySpec
). I didn't find any more cases - mostDWORD *
parameters I found in the Windows SDK header files are justuint *
in the.winmd
.The original declaration:
Declaration in the
.winmd
(formatted):The text was updated successfully, but these errors were encountered: