ReactOS  0.4.12-dev-432-g3463b2d
enumws.c
Go to the documentation of this file.
1 #include <windows.h>
2 #include <stdio.h>
3 
5 EnumDesktopProc(LPWSTR lpszWindowStation, LPARAM lParam)
6 {
7  printf("\t%S\n", lpszWindowStation);
8 
9  return TRUE;
10 }
11 
14 {
15  HWINSTA hWinSta;
16 
17  printf("%S\n", lpszWindowStation);
18  hWinSta = OpenWindowStationW(lpszWindowStation, FALSE,
20  if (hWinSta == NULL)
21  {
22  printf("\tCan't open window station.\n");
23  return TRUE;
24  }
25  EnumDesktopsW(hWinSta, EnumDesktopProc, 0xdede);
26 
27  return TRUE;
28 }
29 
30 int main()
31 {
33 
34  return 0;
35 }
#define TRUE
Definition: types.h:120
BOOL CALLBACK EnumDesktopProc(LPWSTR lpszWindowStation, LPARAM lParam)
Definition: enumws.c:5
#define CALLBACK
Definition: compat.h:27
int main()
Definition: enumws.c:30
LONG_PTR LPARAM
Definition: windef.h:208
smooth NULL
Definition: ftsmooth.c:416
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI EnumDesktopsW(_In_opt_ HWINSTA, _In_ DESKTOPENUMPROCW, _In_ LPARAM)
#define WINSTA_ENUMDESKTOPS
Definition: winuser.h:411
BOOL CALLBACK EnumWindowStationProc(LPWSTR lpszWindowStation, LPARAM lParam)
Definition: enumws.c:13
BOOL WINAPI EnumWindowStationsW(_In_ WINSTAENUMPROCW, _In_ LPARAM)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPARAM lParam
Definition: combotst.c:139
HWINSTA WINAPI OpenWindowStationW(_In_ LPCWSTR, _In_ BOOL, _In_ DWORD)
#define printf
Definition: config.h:203