What interop signature do you use for the following COM method? I am particularly interested in the last two options, and whether to try MarshalAswith SizeParamIndexor not.
MarshalAs
SizeParamIndex
HRESULT GetOutputSetting( DWORD dwOutputNum, LPCWSTR pszName, WMT_ATTR_DATATYPE* pType, BYTE* pValue, WORD* pcbLength );
The documentation reads:
pValue [out] Pointer to a byte buffer containing the value. Pass NULL to retrieve the length of the buffer required.pcbLength [in, out] At the input, a pointer to a variable containing the length of pValue. The output variable contains the number of bytes in pValue.
pValue [out] Pointer to a byte buffer containing the value. Pass NULL to retrieve the length of the buffer required.
pcbLength [in, out] At the input, a pointer to a variable containing the length of pValue. The output variable contains the number of bytes in pValue.
PInvoke Signature Toolkit. . , , , , , .
SizeParamIndex, - , : .
, #:
byte[] pValue, ref ushort pcbLength
- , . NULL ( null #) pValue, . , . pcbLength ref, in/out.
Source: https://habr.com/ru/post/1698522/More articles:UdpClient, Receive () immediately after sending () does not work? - c #How to display events on a calendar using Ruby? - ruby | fooobar.comКак открыть EJB как веб-сервис, который позже позволит мне поддерживать совместимость клиента при изменении ejb? - javaC ++ / CLI from the MFC DLL Extension Library - mfcHow do I change the name of a top value in a text box in a Cognos report? - drop-down-menuNested Transactions in LINQ to SQL - sqlJavaDoc as an environment for shell scripts? - shellCan you recommend a good MySQL stored procedure debugger? - debuggingAdding an AND clause to a regex - regexASP.NET PasswordRecovery Control with localized content - asp.netAll Articles