--- q_a/samples/virtmem/virtmem.c 2018/08/09 18:29:33 1.1.1.2 +++ q_a/samples/virtmem/virtmem.c 2018/08/09 18:29:58 1.1.1.3 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + /*************************************************************************\ * PROGRAM: Virtmem.c * @@ -94,7 +105,7 @@ int APIENTRY WinMain (HANDLE hInstance, hInst = hInstance; - wc.style = NULL; + wc.style = 0; wc.lpfnWndProc = (WNDPROC)MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; @@ -122,7 +133,7 @@ int APIENTRY WinMain (HANDLE hInstance, ShowWindow(hWnd, nCmdShow); - while (GetMessage (&msg, NULL, NULL, NULL)) + while (GetMessage (&msg, NULL, 0, 0)) DispatchMessage (&msg); // Dispatch message to window. return (msg.wParam); // Returns value from PostQuitMessage. @@ -252,7 +263,7 @@ LONG APIENTRY MainWndProc (HWND hwnd, if (!base) WERR ("VirtualAlloc", "WM_CREATE"); - PostMessage (hwnd, WM_USER, NULL, NULL); + PostMessage (hwnd, WM_USER, 0, 0); return (0); @@ -305,12 +316,12 @@ LONG APIENTRY MainWndProc (HWND hwnd, #endif case IDM_WRITE: - try + __try { base[100] = 'a'; MessageBox (hWnd, ExceptSuccess, "try/except", MB_OK); } - except (EXCEPTION_EXECUTE_HANDLER) + __except (EXCEPTION_EXECUTE_HANDLER) { MessageBox (hWnd, ExceptError, "try/except", MB_OK); }