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

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

Merged in the Grace branch. New Win32k!

File size: 2.3 KB
Line 
1/* $Id: libW32kQueryOTEs.c,v 1.2 2000-09-02 21:08:11 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 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
27
28/*******************************************************************************
29* Global Variables *
30*******************************************************************************/
31extern BOOL fInited;
32extern HFILE hWin32k;
33
34
35/**
36 * Gets the object table entries for a module.
37 * @returns OS2 returncode.
38 * @param hMTE Module handle (HMTE) of the module.
39 * @param pQOte Pointer to output buffer.
40 * @param cbQOte Size (in bytes) of the output buffer.
41 * @status completely implelemented.
42 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
43 * @remark
44 */
45APIRET APIENTRY W32kQueryOTEs(HMODULE hMTE, PQOTEBUFFER pQOte, ULONG cbQOte)
46{
47 APIRET rc;
48
49 if (fInited)
50 {
51 K32QUERYOTES Param;
52 ULONG cbParam = sizeof(Param);
53 ULONG cbData = 0UL;
54
55 Param.hMTE = hMTE;
56 Param.pQOte = pQOte;
57 Param.cbQOte = cbQOte;
58 Param.rc = ERROR_INVALID_PARAMETER;
59
60 rc = DosDevIOCtl(hWin32k,
61 IOCTL_W32K_K32,
62 K32_QUERYOTES,
63 &Param, sizeof(Param), &cbParam,
64 "", 1, &cbData);
65
66 if (rc == NO_ERROR)
67 rc = Param.rc;
68 }
69 else
70 rc = ERROR_INIT_ROUTINE_FAILED;
71
72 return rc;
73}
74
Note: See TracBrowser for help on using the repository browser.