ReactOS  0.4.15-dev-4857-g47842d7
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 TEMP_FILE   L"shell-notify-temporary.txt"
 
#define CLASSNAME   L"SHChangeNotify testcase window"
 
#define EVENT_NAME   L"SHChangeNotify testcase event"
 
#define WM_SHELL_NOTIFY   (WM_USER + 100)
 
#define WM_GET_NOTIFY_FLAGS   (WM_USER + 101)
 
#define WM_CLEAR_FLAGS   (WM_USER + 102)
 
#define WM_SET_PATHS   (WM_USER + 103)
 

Typedefs

typedef enum TYPE TYPE
 
typedef enum DIRTYPE DIRTYPE
 

Enumerations

enum  TYPE {
  TYPE_None = 0, TYPE_Str, TYPE_U32, TYPE_RENAMEITEM,
  TYPE_CREATE, TYPE_DELETE, TYPE_MKDIR, TYPE_RMDIR,
  TYPE_RENAMEFOLDER, TYPE_UPDATEDIR, TYPE_MAX = TYPE_UPDATEDIR
}
 
enum  DIRTYPE { DIRTYPE_NULL = 0, DIRTYPE_DESKTOP, DIRTYPE_MYCOMPUTER, DIRTYPE_MYDOCUMENTS }
 

Functions

LPITEMIDLIST DoGetPidl (DIRTYPE iDir)
 
static LPWSTR DoGetDir (DIRTYPE iDir)
 
static HWND DoWaitForWindow (LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
 

Macro Definition Documentation

◆ CLASSNAME

#define CLASSNAME   L"SHChangeNotify testcase window"

Definition at line 9 of file shell32_apitest_sub.h.

◆ EVENT_NAME

#define EVENT_NAME   L"SHChangeNotify testcase event"

Definition at line 10 of file shell32_apitest_sub.h.

◆ TEMP_FILE

#define TEMP_FILE   L"shell-notify-temporary.txt"

Definition at line 8 of file shell32_apitest_sub.h.

◆ WM_CLEAR_FLAGS

#define WM_CLEAR_FLAGS   (WM_USER + 102)

Definition at line 14 of file shell32_apitest_sub.h.

◆ WM_GET_NOTIFY_FLAGS

#define WM_GET_NOTIFY_FLAGS   (WM_USER + 101)

Definition at line 13 of file shell32_apitest_sub.h.

◆ WM_SET_PATHS

#define WM_SET_PATHS   (WM_USER + 103)

Definition at line 15 of file shell32_apitest_sub.h.

◆ WM_SHELL_NOTIFY

#define WM_SHELL_NOTIFY   (WM_USER + 100)

Definition at line 12 of file shell32_apitest_sub.h.

Typedef Documentation

◆ DIRTYPE

typedef enum DIRTYPE DIRTYPE

◆ TYPE

typedef enum TYPE TYPE

Enumeration Type Documentation

◆ DIRTYPE

Enumerator
DIRTYPE_NULL 
DIRTYPE_DESKTOP 
DIRTYPE_MYCOMPUTER 
DIRTYPE_MYDOCUMENTS 

Definition at line 29 of file shell32_apitest_sub.h.

◆ TYPE

Enumerator
TYPE_None 
TYPE_Str 
TYPE_U32 
TYPE_RENAMEITEM 
TYPE_CREATE 
TYPE_DELETE 
TYPE_MKDIR 
TYPE_RMDIR 
TYPE_RENAMEFOLDER 
TYPE_UPDATEDIR 
TYPE_MAX 

Definition at line 17 of file shell32_apitest_sub.h.

Function Documentation

◆ DoGetDir()

static LPWSTR DoGetDir ( DIRTYPE  iDir)
inlinestatic

Definition at line 62 of file shell32_apitest_sub.h.

63 {
64  static size_t s_index = 0;
65  static WCHAR s_pathes[3][MAX_PATH];
66  LPWSTR psz = s_pathes[s_index];
67  LPITEMIDLIST pidl = DoGetPidl(iDir);
68  psz[0] = 0;
69  SHGetPathFromIDListW(pidl, psz);
70  CoTaskMemFree(pidl);
71  s_index = (s_index + 1) % _countof(s_pathes);
72  return psz;
73 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
LPITEMIDLIST DoGetPidl(DIRTYPE iDir)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by DoAction1(), DoAction10(), DoAction11(), DoAction12(), DoAction2(), DoAction3(), DoAction4(), DoAction5(), DoAction6(), DoAction7(), DoAction8(), DoAction9(), and DoInitTest().

◆ DoGetPidl()

LPITEMIDLIST DoGetPidl ( DIRTYPE  iDir)
inline

Definition at line 37 of file shell32_apitest_sub.h.

38 {
40 
41  switch (iDir)
42  {
43  case DIRTYPE_NULL:
44  break;
45 
46  case DIRTYPE_DESKTOP:
48  break;
49 
50  case DIRTYPE_MYCOMPUTER:
52  break;
53 
56  break;
57  }
58 
59  return ret;
60 }
#define CSIDL_DESKTOP
Definition: shlobj.h:2012
#define CSIDL_DRIVES
Definition: shlobj.h:2028
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2984
int ret
#define NULL
Definition: types.h:112
#define CSIDL_PERSONAL
Definition: shlobj.h:2017
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by DoGetDir(), and OnCreate().

◆ DoWaitForWindow()

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

Definition at line 75 of file shell32_apitest_sub.h.

76 {
77  HWND hwnd = NULL;
78  for (INT i = 0; i < 50; ++i)
79  {
80  hwnd = FindWindowW(clsname, text);
81  if (bClosing)
82  {
83  if (!hwnd)
84  break;
85 
86  if (bForce)
87  PostMessage(hwnd, WM_CLOSE, 0, 0);
88  }
89  else
90  {
91  if (hwnd)
92  break;
93  }
94 
95  Sleep(1);
96  }
97  return hwnd;
98 }
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
const WCHAR * text
Definition: package.c:1743
int32_t INT
Definition: typedefs.h:58
#define PostMessage
Definition: winuser.h:5812
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define WM_CLOSE
Definition: winuser.h:1608
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
#define NULL
Definition: types.h:112
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022

Referenced by DoInitTest(), DoQuitTest(), DoTestGroup(), and START_TEST().