ReactOS  0.4.14-dev-1332-g6db3d88
enumws.c File Reference
#include <windows.h>
#include <stdio.h>
Include dependency graph for enumws.c:

Go to the source code of this file.

Functions

BOOL CALLBACK EnumDesktopProc (LPWSTR lpszWindowStation, LPARAM lParam)
 
BOOL CALLBACK EnumWindowStationProc (LPWSTR lpszWindowStation, LPARAM lParam)
 
int main ()
 

Function Documentation

◆ EnumDesktopProc()

BOOL CALLBACK EnumDesktopProc ( LPWSTR  lpszWindowStation,
LPARAM  lParam 
)

Definition at line 5 of file enumws.c.

6 {
7  printf("\t%S\n", lpszWindowStation);
8 
9  return TRUE;
10 }
#define TRUE
Definition: types.h:120
#define printf
Definition: config.h:203

Referenced by EnumWindowStationProc().

◆ EnumWindowStationProc()

BOOL CALLBACK EnumWindowStationProc ( LPWSTR  lpszWindowStation,
LPARAM  lParam 
)

Definition at line 13 of file enumws.c.

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 }
#define TRUE
Definition: types.h:120
BOOL CALLBACK EnumDesktopProc(LPWSTR lpszWindowStation, LPARAM lParam)
Definition: enumws.c:5
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI EnumDesktopsW(_In_opt_ HWINSTA, _In_ DESKTOPENUMPROCW, _In_ LPARAM)
#define WINSTA_ENUMDESKTOPS
Definition: winuser.h:411
HWINSTA WINAPI OpenWindowStationW(_In_ LPCWSTR, _In_ BOOL, _In_ DWORD)
#define printf
Definition: config.h:203

Referenced by main().

◆ main()

int main ( void  )

Definition at line 30 of file enumws.c.

31 {
33 
34  return 0;
35 }
BOOL CALLBACK EnumWindowStationProc(LPWSTR lpszWindowStation, LPARAM lParam)
Definition: enumws.c:13
BOOL WINAPI EnumWindowStationsW(_In_ WINSTAENUMPROCW, _In_ LPARAM)