Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- int __stdcall f(HWND Wnd, LPARAM L) {
- SetLastError(ERROR_SUCCESS);
- int Success = SetPropW(Wnd, L"asdf", (HANDLE) 0xdeadbeef);
- int Error = GetLastError();
- wchar_t Class[500] = {'\0'};
- GetClassNameW(Wnd, Class, 500);
- printf("window %x: %S\n", Wnd, Class);
- printf("\tsuccess: %u\n", Success);
- printf("\terror: %u\n", Error);
- printf("\tprop: %x\n\n", (unsigned) GetPropW(Wnd, L"asdf"));
- return 1;
- };
- void main() {
- EnumDesktopWindows(0, f, 0);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement