gpt4 book ai didi

c# - .NET COM 互操作方法签名

转载 作者:行者123 更新时间:2023-11-30 16:37:01 27 4
gpt4 key购买 nike

您会为以下 COM 方法使用什么互操作签名?我特别感兴趣的是最后两个参数,以及是否尝试将 MarshalAsSizeParamIndex 一起使用。

HRESULT GetOutputSetting(
DWORD dwOutputNum,
LPCWSTR pszName,
WMT_ATTR_DATATYPE* pType,
BYTE* pValue,
WORD* pcbLength
);

文档状态:

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.

最佳答案

你可以试试 PInvoke Signature Toolkit .在执行平台互操作时,它对于正确编码非常有用。它很可能不会涵盖您的特定问题,但您可能会找到类似的问题,为您提供所需的信息。

关于c# - .NET COM 互操作方法签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/222161/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com