Release 960114
[wine] / win32 / newfns.c
1 /*
2  * Win32 miscellaneous functions
3  *
4  * Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
5  */
6
7 /* Misc. new functions - they should be moved into appropriate files
8 at a later date. */
9
10 #include <stdio.h>
11 #include "windows.h"
12 #include "winerror.h"
13 #include "kernel32.h"
14 #include "stddebug.h"
15 #include "debug.h"
16
17 /***********************************************************************
18  *           RaiseException             (KERNEL32.??)
19  *
20  * Stub function - does not allow exceptions to be caught yet
21  */
22 WINAPI VOID RaiseException(DWORD dwExceptionCode,
23                     DWORD dwExceptionFlags,
24                     DWORD cArguments,
25                     const DWORD * lpArguments)
26 {
27     ExitProcess(dwExceptionCode); /* what status should be used here ? */
28 }
29
30 /***********************************************************************
31  *           GetProcAddress             (KERNEL32.257)
32  *
33  */
34 WINAPI FARPROC W32_GetProcAddress(HMODULE hModule,
35                               LPCSTR lpszProc)
36 {
37     char *modulename;
38
39     modulename = MODULE_GetModuleName(hModule);
40     if (modulename == NULL)
41         return (FARPROC) NULL;
42     if (((int) lpszProc) & 0xffff) 
43         return RELAY32_GetEntryPoint(modulename, lpszProc, 0);
44     else
45         return RELAY32_GetEntryPoint(modulename, (char *) NULL, (int) lpszProc);
46 }
47