Hi LiaoMi
Check the file ...\Windows Kits\10\Include\10.0.19041.0\um\wincrypt.h lines 1049-1052.
It defines the structure and the alias
typedef struct _CRYPTOAPI_BLOB {
DWORD cbData;
_Field_size_bytes_(cbData) BYTE *pbData;
} CRYPT_INTEGER_BLOB, *PCRYPT_INTEGER_BLOB,
Biterider
Hi Biterider,
I'm confused by the fact that access to these structures will be through the stub structure _CRYPTOAPI_BLOB, not through aliases, but through this structure.
https://en.cppreference.com/w/cpp/language/typedef// common C idiom to avoid having to write "struct S"
typedef struct {
int a;
int b;
} S, *pS;
// the following two objects have the same type
pS ps1;
S* ps2;It would be more logical to do something like (this was done in
EasyCode):
#######################################################
CRYPTOAPI_BLOB struct
cbData DWORD ?
pbData POINTER ?
CRYPTOAPI_BLOB ends
//
CRYPT_INTEGER_BLOB,
*PCRYPT_INTEGER_BLOB, <- Orig
//CRYPT_UINT_BLOB, *PCRYPT_UINT_BLOB, <- Orig
CRYPT_INTEGER_BLOB typedef ptr CRYPTOAPI_BLOB
<- This line has been removed by the translator.
PCRYPT_INTEGER_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_UINT_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_UINT_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_OBJID_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_OBJID_BLOB typedef ptr CRYPTOAPI_BLOB
CERT_NAME_BLOB typedef CRYPTOAPI_BLOB
PCERT_NAME_BLOB typedef ptr CRYPTOAPI_BLOB
CERT_RDN_VALUE_BLOB typedef CRYPTOAPI_BLOB
PCERT_RDN_VALUE_BLOB typedef ptr CRYPTOAPI_BLOB
CERT_BLOB typedef CRYPTOAPI_BLOB
PCERT_BLOB typedef ptr CRYPTOAPI_BLOB
CRL_BLOB typedef CRYPTOAPI_BLOB
PCRL_BLOB typedef ptr CRYPTOAPI_BLOB
DATA_BLOB typedef CRYPTOAPI_BLOB
PDATA_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_DATA_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_DATA_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_HASH_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_HASH_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_DIGEST_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_DIGEST_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_DER_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_DER_BLOB typedef ptr CRYPTOAPI_BLOB
CRYPT_ATTR_BLOB typedef CRYPTOAPI_BLOB
PCRYPT_ATTR_BLOB typedef ptr CRYPTOAPI_BLOB
#######################################################
Since, based on the construction CRYPT_INTEGER_BLOB, it is the same alias as other records. Otherwise, it turns out that the alias was turned into the original structure. This can be done, provided that the original structure is preserved as a duplicate.