19 WCHAR WindowTextW[256];
20 char WindowTextA[256];
60 printf(
"Calling GetWindowTextW\n");
66 printf(
"GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
68 printf(
"Calling GetWindowTextA\n");
74 printf(
"GetWindowTextA returned Ansi string \"%s\"\n", WindowTextA);
85 printf(
"After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
89 printf(
"Calling GetWindowTextW\n");
95 printf(
"GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
100 printf(
"After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
104 printf(
"Calling GetWindowTextW\n");
105 if (!
GetWindowTextW(
hWnd, WindowTextW,
sizeof(WindowTextW) /
sizeof(WindowTextW[0])))
110 printf(
"GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW);
124 printf(
"UnicodeWndProc calling DefWindowProcW\n");
143 printf(
"UnicodeSubclassProc calling SavedWindowProc\n");
162 printf(
"AnsiSubclassProc calling SavedWindowProcA\n");
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define WS_OVERLAPPEDWINDOW
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
LRESULT WINAPI AnsiSubclassProc(HWND, UINT, WPARAM, LPARAM)
LRESULT WINAPI UnicodeWndProc(HWND, UINT, WPARAM, LPARAM)
static WNDPROC SavedWndProcW
LRESULT WINAPI UnicodeSubclassProc(HWND, UINT, WPARAM, LPARAM)
static WNDPROC SavedWndProcA
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
#define SetWindowLongPtrA
#define GetWindowLongPtrW
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define GetWindowLongPtrA
BOOL WINAPI IsWindowUnicode(_In_ HWND)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define SetWindowLongPtrW
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO