When X509_KEYGEN_REQUEST_TO_BE_SIGNED is used for the lpszStructType with CryptEncodeObject, CryptEncodeObjectEx, CryptDecodeObject, or CryptDecodeObjectEx the following details apply.
N/A
pvStructInfo points to CERT_KEYGEN_REQUEST_INFO structure.
For CryptDecodeObject and CryptDecodeObjectEx the pbEncoded is the "to be signed" plus its signature (output of a X509_CERT CryptEncodeObject).
For CryptEncodeObject and CryptEncodeObjectEx the pbEncoded is just the "to be signed".