开发者

Webservices API - WsCreateError with WS_ERROR_PROPERTY

开发者 https://www.devze.com 2023-02-09 17:21 出处:网络
Is it possible to to create an error obj with WSCreateError with WS_ERROR_PROPERTY set? I am getting E_INVALID_ARG.

Is it possible to to create an error obj with WSCreateError with WS_ERROR_PROPERTY set? I am getting E_INVALID_ARG.

WS_ERROR_PROPERTY Prop;
DWORD lang_Id = 1033;

Prop.id = WS_ERROR_PROPERTY_LANGID;
Prop.value = (void *)&lang_Id;
Prop.valueSize = sizeof(lang_Id);

WS_ERROR *err = NULL;
HRESULT hr = WsCreateError(&prop, 1, &err);
// returns E_INVALID_ARG

Is there anything wrong w开发者_JAVA百科ith the way I am calling this? An example with any property would be great!


lang_id needs to be of type LANGID

0

精彩评论

暂无评论...
验证码 换一张
取 消