--- q_a/samples/sharemem/sharemem.c 2018/08/09 18:29:19 1.1 +++ q_a/samples/sharemem/sharemem.c 2018/08/09 18:30:05 1.1.1.2 @@ -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: sharemem.c * @@ -95,7 +106,7 @@ int APIENTRY WinMain (HANDLE hInstance, hInst = hInstance; - wc.style = NULL; + wc.style = 0; wc.lpfnWndProc = (WNDPROC)MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; @@ -127,7 +138,7 @@ int APIENTRY WinMain (HANDLE hInstance, ShowWindow (hWndDlg, SW_SHOW); ShowWindow (hWnd, nCmdShow); - while (GetMessage (&msg, NULL, NULL, NULL)) + while (GetMessage (&msg, NULL, 0, 0)) if (!IsDialogMessage (hWndDlg, &msg)) { DispatchMessage (&msg); // Dispatch message to window. @@ -198,17 +209,17 @@ LONG APIENTRY MainWndProc (HWND hwnd, case WM_SIZE : - SetWindowPos (hWndDlg, NULL, 0,0, LOWORD(lParam), DIALOGHEIGHT, NULL); + SetWindowPos (hWndDlg, NULL, 0,0, LOWORD(lParam), DIALOGHEIGHT, 0); return (0); case WM_MOUSEMOVE: - try + __try { MapView[0] = lParam; } - except(EXCEPTION_EXECUTE_HANDLER) + __except(EXCEPTION_EXECUTE_HANDLER) { MessageBox( hwnd, "Trapped an exception when writing to memory.", "From within WM_MOUSEMOVE", MB_OK);