ReactOS  0.4.13-dev-249-gcba1a2f
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 
273  _SEH2_TRY
274  {
275  hr = pWindow->QueryInterface(IID_IUnknown, pUnknown);
276  *hWindow = pWindow->Wnd();
277  hr = S_OK;
278  }
280  {
281  hr = E_INVALIDARG;
282  refcount = pWindow->AddRef();
283  while (refcount)
284  refcount = pWindow->Release();
285  }
286  _SEH2_END
287 
288  return hr;
289 }
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define E_FAIL
Definition: ddrawi.h:102
_SEH2_TRY
Definition: create.c:4250
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define E_INVALIDARG
Definition: ddrawi.h:101
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
_SEH2_END
Definition: create.c:4424
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

Variable Documentation

◆ gModule

CComModule gModule

Definition at line 16 of file dimmedwindow.cpp.