source: trunk/src/win32k/lib/libW32kQueryOTEs.c@ 5224

Last change on this file since 5224 was 5224, checked in by bird, 25 years ago

CallGate changes.

File size: 2.1 KB
Line 
1/* $Id: libW32kQueryOTEs.c,v 1.3 2001-02-21 07:47:59 bird Exp $
2 *
3 * libW32kQueryOTEs - Get's the object table entries (OTEs) for a given
4 * module (given by a module handle).
5 *
6 * Copyright (c) 2000-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.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_DOSERRORS
17#define INCL_DOSFILEMGR
18#define INCL_DOSDEVICES
19
20
21/*******************************************************************************
22* Internal Functions *
23*******************************************************************************/
24#include <os2.h>
25#include "win32k.h"
26#include "libPrivate.h"
27
28
29/**
30 * Gets the object table entries for a module.
31 * @returns OS2 returncode.
32 * @param hMTE Module handle (HMTE) of the module.
33 * @param pQOte Pointer to output buffer.
34 * @param cbQOte Size (in bytes) of the output buffer.
35 * @status completely implelemented.
36 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
37 * @remark
38 */
39APIRET APIENTRY W32kQueryOTEs(HMODULE hMTE, PQOTEBUFFER pQOte, ULONG cbQOte)
40{
41 APIRET rc;
42
43 if (fInited)
44 {
45 K32QUERYOTES Param;
46 ULONG cbParam = sizeof(Param);
47 ULONG cbData = 0UL;
48
49 Param.hdr.cb = sizeof(Param);
50 Param.hdr.rc = ERROR_NOT_SUPPORTED;
51 Param.hMTE = hMTE;
52 Param.pQOte = pQOte;
53 Param.cbQOte = cbQOte;
54
55 if (usCGSelector)
56 return libCallThruCallGate(K32_QUERYOTES, &Param);
57 rc = DosDevIOCtl(hWin32k,
58 IOCTL_W32K_K32,
59 K32_QUERYOTES,
60 &Param, sizeof(Param), &cbParam,
61 "", 1, &cbData);
62
63 if (rc == NO_ERROR)
64 rc = Param.hdr.rc;
65 }
66 else
67 rc = ERROR_INIT_ROUTINE_FAILED;
68
69 return rc;
70}
71
Note: See TracBrowser for help on using the repository browser.