What interop signature would you use for the following COM method? I am interested particularly in the final two parameters, and whether to try to use MarshalAs
with a SizeParamIndex
or not.
HRESULT GetOutputSetting(
DWORD dwOutputNum,
LPCWSTR pszName,
WMT_ATTR_DATATYPE* pType,
BYTE* pValue,
WORD* pcbLength
);
Documentation states:
pValue [out] Pointer to a byte buffer containing the value. Pass NULL to retrieve the length of the buffer required.
pcbLength [in, out] On input, pointer to a variable containing the length of pValue. On output, the variable contains the number of bytes in pValue used.