source: trunk/src/win32k/lib/libDosAllocMemEx.c@ 2823

Last change on this file since 2823 was 2823, checked in by bird, 26 years ago

Unfinised stuff! Don't work. Don't even compile!

File size: 1.9 KB
Line 
1/* $Id: libDosAllocMemEx.c,v 1.1 2000-02-18 19:27:31 bird Exp $
2 *
3 * DosAllocMemEx - Extened Edition of DosAllocMem.
4 * Allows you to suggest an address of the memory.
5 *
6 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11
12
13/*******************************************************************************
14* Header Files *
15*******************************************************************************/
16#define INCL_DOSERROR
17#define INCL_DOSFILEMGR
18#define INCL_DOSDEVICES
19#define INCL_WIN32K_LIB
20
21
22/*******************************************************************************
23* Internal Functions *
24*******************************************************************************/
25#include <os2.h>
26#include <win32k.h>
27
28
29/*******************************************************************************
30* Global Variables *
31*******************************************************************************/
32static BOOL fInited = FALSE;
33HFILE hWin32k = NULLHANDLE;
34
35
36
37
38APIRET APIENTRY DosAllocMemEx(PPVOID ppv, ULONG cb, ULONG flag)
39{
40 APIRET rc;
41
42 if (fInited)
43 {
44 K32ALLOCMEMEX Param;
45 Param.pv = *ppv;
46 Param.cb = cb;
47 Param.flFlags = flag;
48 Param.rc = 0;
49 Param.ulCS = ;
50 Param.ulEIP = ;
51
52 param.pRpInitIn = pRpIn;
53 rc = DosDevIOCtl(hWin32k,
54 IOCTL_W32K_K32,
55 K32_ALLOCMEMEX,
56 &Param, sizeof(Param), &cbParam,
57 "", 1, &cbData);
58 if (rc == NO_ERROR)
59 {
60 ppv = Param.pv;
61 rc = Param.rc;
62 }
63 }
64 else
65 rc = ERROR_INIT_ROUTINE_FAILED;
66
67 return rc;
68}
69
Note: See TracBrowser for help on using the repository browser.