--- q_a/samples/process/process.c 2018/08/09 18:29:24 1.1.1.2 +++ q_a/samples/process/process.c 2018/08/09 18:29:47 1.1.1.3 @@ -1,9 +1,18 @@ + +/******************************************************************************\ +* 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. +\******************************************************************************/ + /**************************************************************************\ * process.c -- sample program demonstrating the CreateProcess and * TerminateProcess() functions. * -* written March 92 by Steve Firebaugh -* * In this sample the main window is a dialog box. There is no need to * register a new window class or create a new window. Instead just call * DialogBox() and use the template defined in the .RC file. @@ -27,7 +36,7 @@ HANDLE hInst; * input parameters: c.f. generic sample * \**************************************************************************/ -int APIENTRY WinMain(HANDLE hInstance, HANDLE hPrevInstance, +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int ret; @@ -121,6 +130,7 @@ LONG APIENTRY MainDlgProc(HWND hwnd, UIN default: return FALSE; } /* end switch(message) */ + return 0; } @@ -156,19 +166,19 @@ VOID doCreate (HWND hwnd) of.hInstance = hInst; of.lpstrFilter = "Executables\000 *.EXE\000\000"; of.lpstrCustomFilter = NULL; - of.nMaxCustFilter = NULL; - of.nFilterIndex = NULL; + of.nMaxCustFilter = 0; + of.nFilterIndex = 0; of.lpstrFile = buffer; of.nMaxFile = MAXCHARS; of.lpstrFileTitle = NULL; - of.nMaxFileTitle = NULL; + of.nMaxFileTitle = 0; of.lpstrInitialDir = NULL; of.lpstrTitle = NULL; of.Flags = OFN_HIDEREADONLY; - of.nFileOffset = NULL; - of.nFileExtension = NULL; + of.nFileOffset = 0; + of.nFileExtension = 0; of.lpstrDefExt = NULL; - of.lCustData = NULL; + of.lCustData = 0; of.lpfnHook = NULL; of.lpTemplateName = NULL; if (!GetOpenFileName (&of)) return;