I am currently trying to make a call to this function call. Here’s the declaration:
const void* WINAPI CertCreateContext(
__in DWORD dwContextType,
__in DWORD dwEncodingType,
__in const BYTE *pbEncoded,
__in DWORD cbEncoded,
__in DWORD dwFlags,
__in_opt PCERT_CREATE_CONTEXT_PARA pCreatePara
);
As you can see, the third input param calls for a const BYTE * which represents the encoded certificate you are trying to create. How do I define such a variable in c++?
You don’t need to. The function parameter is a pointer to a const BYTE, which means the function will not change the byte it points to. A simple example:
You will of course need to #include the header that declares the type BYTE.