From the documentation
pbParamInfo – Pointer to a null-terminated string of bytes specifying the types of the parameters following pbParamInfo.
… – Variable list of parameters, of types specified in pbParamInfo.
You are passing NULL for pbParamInfo
, which I assume means that no data will be stored in the returned variant, so of course the pointer is invalid.
If you follow the documentation further, you find that passing VTS_BSTR
specifies that you can initialize the variant with a pointer-to-char (pass that as the next argument after pbParamInfo).
3
solved Pointer stored in int