13#define ok_hr(status, expected) ok_hex(status, expected)
15#define HRESULT_CANCELLED HRESULT_FROM_WIN32(ERROR_CANCELLED)
76 CComPtr<IUserNotification> pUserNotif;
82 IID_IUserNotification, (
void**)&pUserNotif);
83 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
86 skip(
"Could not instantiate IUserNotification\n");
101 hr = pUserNotif->SetIconInfo(
NULL,
L"Tooltip text");
111 hr = pUserNotif->SetBalloonInfo(
L"Balloon title",
L"Balloon text", NIIF_ERROR);
118 hr = pUserNotif->SetBalloonRetry(2000, 1000, 2);
122 hr = pUserNotif->Show(
NULL, 0);
135 hr = pUserNotif->Show(
NULL, 0);
142 hr = pUserNotif->SetBalloonInfo(
NULL,
L"Balloon text", NIIF_WARNING);
145 hr = pUserNotif->Show(
NULL, 0);
151 hr = pUserNotif->SetBalloonInfo(
L"Balloon title",
L"Balloon text", NIIF_WARNING);
154 hr = pUserNotif->Show(&queryContinue, 2000);
159 hr = pUserNotif->SetBalloonInfo(
L"Balloon title",
NULL, NIIF_WARNING);
162 hr = pUserNotif->Show(&queryContinue, 2000);
166 hr = pUserNotif->SetBalloonInfo(
L"Balloon title",
L"Balloon text", NIIF_WARNING);
170 hr = pUserNotif->Show(&queryContinue, 2000);
199 skip(
"Could not create the CUserNotification test thread!\n");
205 ok(dwWait ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %lu, expected WAIT_OBJECT_0\n", dwWait);
#define UlongToHandle(ul)
#define STDMETHODCALLTYPE
virtual ULONG STDMETHODCALLTYPE Release()
CQueryContinue(HRESULT hContinue=S_OK)
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
CQueryContinue & operator=(HRESULT hContinue)
virtual HRESULT STDMETHODCALLTYPE QueryContinue(void)
CQueryContinue & operator=(const CQueryContinue &qc)
virtual ULONG STDMETHODCALLTYPE AddRef()
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
DWORD CALLBACK TestThread(LPVOID lpParam)
static void TestNotification(void)
#define HRESULT_CANCELLED
#define ok_hr(status, expected)
@ COINIT_APARTMENTTHREADED
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject