ReactOS 0.4.16-dev-91-g764881a
shell32_apitest_sub.h File Reference
#include <shlwapi.h>
#include <stdlib.h>
#include <stdio.h>
#include <strsafe.h>
Include dependency graph for shell32_apitest_sub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAIN_CLASSNAME   L"SHChangeNotify main window"
 
#define SUB_CLASSNAME   L"SHChangeNotify sub-window"
 
#define WM_SHELL_NOTIFY   (WM_USER + 100)
 
#define NUM_STAGE   10
 

Functions

static BOOL FindSubProgram (LPWSTR pszSubProgram, DWORD cchSubProgram)
 
static HWND DoWaitForWindow (LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
 

Macro Definition Documentation

◆ MAIN_CLASSNAME

#define MAIN_CLASSNAME   L"SHChangeNotify main window"

Definition at line 8 of file shell32_apitest_sub.h.

◆ NUM_STAGE

#define NUM_STAGE   10

Definition at line 13 of file shell32_apitest_sub.h.

◆ SUB_CLASSNAME

#define SUB_CLASSNAME   L"SHChangeNotify sub-window"

Definition at line 9 of file shell32_apitest_sub.h.

◆ WM_SHELL_NOTIFY

#define WM_SHELL_NOTIFY   (WM_USER + 100)

Definition at line 11 of file shell32_apitest_sub.h.

Function Documentation

◆ DoWaitForWindow()

static HWND DoWaitForWindow ( LPCWSTR  clsname,
LPCWSTR  text,
BOOL  bClosing,
BOOL  bForce 
)
inlinestatic

Definition at line 33 of file shell32_apitest_sub.h.

34{
35 HWND hwnd = NULL;
36 for (INT i = 0; i < 50; ++i)
37 {
38 hwnd = FindWindowW(clsname, text);
39 if (bClosing)
40 {
41 if (!hwnd)
42 break;
43
44 if (bForce)
46 }
47 else
48 {
49 if (hwnd)
50 break;
51 }
52
53 Sleep(1);
54 }
55 return hwnd;
56}
#define NULL
Definition: types.h:112
const WCHAR * text
Definition: package.c:1794
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WM_CLOSE
Definition: winuser.h:1624
#define PostMessage
Definition: winuser.h:5844
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)

Referenced by START_TEST(), TEST_Init(), and TEST_Quit().

◆ FindSubProgram()

static BOOL FindSubProgram ( LPWSTR  pszSubProgram,
DWORD  cchSubProgram 
)
inlinestatic

Definition at line 15 of file shell32_apitest_sub.h.

16{
17 GetModuleFileNameW(NULL, pszSubProgram, cchSubProgram);
18 PathRemoveFileSpecW(pszSubProgram);
19 PathAppendW(pszSubProgram, L"shell32_apitest_sub.exe");
20
21 if (!PathFileExistsW(pszSubProgram))
22 {
23 PathRemoveFileSpecW(pszSubProgram);
24 PathAppendW(pszSubProgram, L"testdata\\shell32_apitest_sub.exe");
25
26 if (!PathFileExistsW(pszSubProgram))
27 return FALSE;
28 }
29
30 return TRUE;
31}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1777
#define L(x)
Definition: ntvdm.h:50
#define PathAppendW
Definition: pathcch.h:309

Referenced by START_TEST(), test_DoInvalidDir(), and TEST_Init().