Scraped enums used in CryptQueryObject contain wrong members, are misleadingly named and incorrectly assigned. #343
Labels
broken api
An API is inaccurate and could lead to runtime failure
usability
Touch-up to improve the user experience for a language projection
There are multiple issues with the automatically generated enums after #327 (previously there were no enums at all).
Currently (
10.0.19041.5-preview.51
) theCryptQueryObject
declaration looks like this:The issues are:
CryptQueryObject_dwObjectTypeFlags
, but it doesn't contain flags (just two constants with values1
and2
) and (correctly) has no[Flags]
attribute. The Flags part in the name is misleading.CERT_QUERY_FLAGS
type, which contains too many members. It should contain only flags -CERT_QUERY_CONTENT_FLAG_
prefixed constants, but contains allCERT_QUERY_CONTENT_
ones.CertOpenStore_dwEncodingType
(type of the sixth parameter) containsPKCS_7_ASN_ENCODING
andX509_ASN_ENCODING
constants, which as a result are not available as loose constants in theWindows.Win32.Security.Apis
namespace. ThedwCertEncodingType
member of theEFS_CERTIFICATE_BLOB
struct should contain one of the following values:CRYPT_ASN_ENCODING
CRYPT_NDR_ENCODING
X509_ASN_ENCODING
X509_NDR_ENCODING
The fact that two of these constants can be accessed only through a completely unrelated enum makes working with this struct harder.
It should be of a pointer type (DWORD * is replaced with enum (not pointer) #337)(fixed)[Flags]
attribute/CERT_QUERY_CONTENT_(?!FLAG_)\w+/
regular expressions -CERT_QUERY_CONTENT_
prefixed constants, which are not flags for thedwExpectedContentTypeFlags
parameter (these have an additionalFLAG_
part in their names).The text was updated successfully, but these errors were encountered: