ReactOS 0.4.15-dev-8109-gd7be748
dimmedwindow.cpp File Reference
#include "msgina.h"
#include <wingdi.h>
#include <atlbase.h>
#include <atlcom.h>
#include <pseh/pseh2.h>
Include dependency graph for dimmedwindow.cpp:

Go to the source code of this file.

Classes

class  CDimmedWindow
 

Macros

#define COM_NO_WINDOWS_H
 
#define INIT_TIMER_ID   0x112233
 
#define FADE_TIMER_ID   0x12345
 

Functions

HRESULT WINAPI ShellDimScreen (void **pUnknown, HWND *hWindow)
 

Variables

CComModule gModule
 

Macro Definition Documentation

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 9 of file dimmedwindow.cpp.

◆ FADE_TIMER_ID

#define FADE_TIMER_ID   0x12345

Definition at line 21 of file dimmedwindow.cpp.

◆ INIT_TIMER_ID

#define INIT_TIMER_ID   0x112233

Definition at line 20 of file dimmedwindow.cpp.

Function Documentation

◆ ShellDimScreen()

HRESULT WINAPI ShellDimScreen ( void **  pUnknown,
HWND hWindow 
)

Definition at line 256 of file dimmedwindow.cpp.

257{
258 CComObject<CDimmedWindow> *pWindow;
259 HRESULT hr = CComObject<CDimmedWindow>::CreateInstance(&pWindow);
260 ULONG refcount;
261
262 pWindow->WaitForInit();
263
264 if (!IsWindow(pWindow->Wnd()))
265 {
266 refcount = pWindow->AddRef();
267 while (refcount)
268 refcount = pWindow->Release();
269
270 return E_FAIL;
271 }
272
274 {
276 *hWindow = pWindow->Wnd();
277 hr = S_OK;
278 }
280 {
282 refcount = pWindow->AddRef();
283 while (refcount)
284 refcount = pWindow->Release();
285 }
287
288 return hr;
289}
const GUID IID_IUnknown
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
HRESULT hr
Definition: shlfolder.c:183
uint32_t ULONG
Definition: typedefs.h:59
BOOL WINAPI IsWindow(_In_opt_ HWND)

Variable Documentation

◆ gModule

CComModule gModule

Definition at line 16 of file dimmedwindow.cpp.