Release 950727
[wine/multimedia.git] / misc / exec.c
blobab5bc0eb5e542b6279de45411a21a828ca50d73f
1 /*
2 * Windows Exec & Help
4 */
6 #include <stdlib.h>
7 #include <stdio.h>
8 #include <string.h>
9 #include <unistd.h>
10 #include "neexe.h"
11 #include "dlls.h"
12 #include "windows.h"
13 #include "callback.h"
14 #include "stddebug.h"
15 #include "debug.h"
17 #define HELP_CONTEXT 0x0001
18 #define HELP_QUIT 0x0002
19 #define HELP_INDEX 0x0003
20 #define HELP_CONTENTS 0x0003
21 #define HELP_HELPONHELP 0x0004
22 #define HELP_SETINDEX 0x0005
23 #define HELP_SETCONTENTS 0x0005
24 #define HELP_CONTEXTPOPUP 0x0008
25 #define HELP_FORCEFILE 0x0009
26 #define HELP_KEY 0x0101
27 #define HELP_COMMAND 0x0102
28 #define HELP_PARTIALKEY 0x0105
29 #define HELP_MULTIKEY 0x0201
30 #define HELP_SETWINPOS 0x0203
33 /**********************************************************************
34 * ExitWindows [USER.7]
36 BOOL ExitWindows(DWORD dwReturnCode, WORD wReserved)
38 api_assert("ExitWindows", wReserved == 0);
39 api_assert("ExitWindows", HIWORD(dwReturnCode) == 0);
41 dprintf_exec( stdnimp,"PARTIAL STUB ExitWindows(%08lX, %04X)\n",
42 dwReturnCode, wReserved);
44 exit( LOWORD(dwReturnCode) );
48 /**********************************************************************
49 * WinHelp [USER.171]
51 BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
53 char str[256];
54 dprintf_exec(stddeb,"WinHelp(%s, %u, %lu)\n",
55 lpHelpFile, wCommand, dwData);
56 switch(wCommand) {
57 case 0:
58 case HELP_HELPONHELP:
59 GetWindowsDirectory(str, sizeof(str));
60 strcat(str, "\\winhelp.exe");
61 dprintf_exec(stddeb,"'%s'\n", str);
62 break;
63 case HELP_INDEX:
64 GetWindowsDirectory(str, sizeof(str));
65 strcat(str, "\\winhelp.exe");
66 dprintf_exec(stddeb,"'%s'\n", str);
67 break;
68 default:
69 return FALSE;
71 WinExec(str, SW_SHOWNORMAL);
72 return(TRUE);