--- mstools/samples/rpc/mandel/mandel.c 2018/08/09 18:20:01 1.1.1.1 +++ mstools/samples/rpc/mandel/mandel.c 2018/08/09 18:20:56 1.1.1.2 @@ -4,7 +4,7 @@ Main code for the Windows Mandelbrot Set distributed drawing program. - Copyright (C) 1990 Microsoft Corporation. + Copyright (C) 1990, 1992 Microsoft Corporation. This code sample is provided for demonstration purposes only. Microsoft makes no warranty, either express or implied, @@ -24,8 +24,8 @@ #include #ifdef RPC -#include -#include "mdlrpc.h" +#include // RPC data and API function prototypes +#include "mdlrpc.h" // header file generated by the MIDL compiler #endif #include /* Required for all Windows applications */ @@ -148,16 +148,13 @@ RpcTryExcept { RpcExcept(1) { sprintf(pszFail, "Please start the server application."); MessageBox(msg.hwnd, pszFail, "Mandel Server Not Started", - MB_ICONHAND | MB_SYSTEMMODAL); + MB_ICONHAND | MB_SYSTEMMODAL); } RpcEndExcept #endif } // end WinMain - - - /* * FUNCTION: InitApplication(HANDLE) * @@ -358,10 +355,10 @@ LONG lParam) /* additional informat case IDM_ABOUT: lpProcAbout = MakeProcInstance((FARPROC)About, hInst); - DialogBox(hInst, /* current instance */ - ABOUTBOX, /* resource to use */ - hWnd, /* parent handle */ - (WNDPROC)lpProcAbout); /* About() instance address */ + DialogBox(hInst, /* current instance */ + ABOUTBOX, /* resource to use */ + hWnd, /* parent handle */ + lpProcAbout); /* About() instance address */ FreeProcInstance(lpProcAbout); break; @@ -474,9 +471,6 @@ LONG lParam) /* additional informat case IDM_1LINE: case IDM_2LINES: case IDM_4LINES: - case IDM_8LINES: - case IDM_16LINES: - case IDM_32LINES: CheckMenuItem(GetMenu(hWnd), miOldLines, MF_UNCHECKED); miOldLines = wParam; @@ -491,14 +485,6 @@ LONG lParam) /* additional informat case IDM_4LINES: iLines = 4; break; - case IDM_8LINES: - iLines = 8; - break; - case IDM_16LINES: - iLines = 16; - break; - case IDM_32LINES: - iLines = 32; } CheckMenuItem(GetMenu(hWnd), miOldLines, MF_CHECKED); @@ -935,3 +921,10 @@ void CountHistogram(void) InitHistogram(); /* initialize for next time */ } + +/* need this function to link properly; ndrlib needs it */ +void * MIDL_user_allocate(size_t len) +{ + UNREFERENCED_PARAMETER(len); + return(NULL); +}