43{
47 static WCHAR wszDescription[] = {
'F',
'a',
'i',
'l',
'e',
'd',
' ',
'S',
'p',
'r',
'o',
'c',
'k',
'e',
't',0};
48 static WCHAR wszHelpFile[] = {
's',
'p',
'r',
'o',
'c',
'k',
'e',
't',
'.',
'h',
'l',
'p',0};
49 static WCHAR wszSource[] = {
's',
'p',
'r',
'o',
'c',
'k',
'e',
't',0};
51
54
55 hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &
IID_IUnknown, (
void**)&unk);
57 IUnknown_Release(unk);
58
59 hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo,
NULL);
61
62 hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo, wszDescription);
64
67
68 hr = ICreateErrorInfo_SetHelpContext(pCreateErrorInfo, 0xdeadbeef);
70
71 hr = ICreateErrorInfo_SetHelpFile(pCreateErrorInfo,
NULL);
73
74 hr = ICreateErrorInfo_SetHelpFile(pCreateErrorInfo, wszHelpFile);
76
77 hr = ICreateErrorInfo_SetSource(pCreateErrorInfo,
NULL);
79
80 hr = ICreateErrorInfo_SetSource(pCreateErrorInfo, wszSource);
82
83 hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IErrorInfo, (
void **)&pErrorInfo);
85
86 hr = IErrorInfo_QueryInterface(pErrorInfo, &
IID_IUnknown, (
void**)&unk);
88 IUnknown_Release(unk);
89
90 ICreateErrorInfo_Release(pCreateErrorInfo);
91
94
95 IErrorInfo_Release(pErrorInfo);
97
100
101 IErrorInfo_Release(pErrorInfo);
102
104 ok(
hr ==
S_FALSE,
"GetErrorInfo should have returned S_FALSE instead of 0x%08x\n",
hr);
105 ok(!pErrorInfo,
"pErrorInfo should be set to NULL\n");
106
109
111 ok(
hr ==
E_INVALIDARG,
"GetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
112
114 ok(
hr ==
E_INVALIDARG,
"SetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n",
hr);
115}
HRESULT WINAPI SetErrorInfo(ULONG dwReserved, IErrorInfo *perrinfo)
HRESULT WINAPI GetErrorInfo(ULONG dwReserved, IErrorInfo **pperrinfo)
HRESULT WINAPI CreateErrorInfo(ICreateErrorInfo **pperrinfo)
#define ok_ole_success(hr, func)
static const CLSID CLSID_WineTest