source: trunk/src/win32k/lib/libWin32kSetOptions.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.6 KB
Line 
1/* $Id: libWin32kSetOptions.c,v 1.2 2000-09-02 21:08:12 bird Exp $
2 *
3 * libWin32kSetOptions - Sets the changable options of win32k.sys the options.
4 *
5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11
12/*******************************************************************************
13* Header Files *
14*******************************************************************************/
15#define INCL_DOSERRORS
16#define INCL_DOSFILEMGR
17#define INCL_DOSDEVICES
18
19
20/*******************************************************************************
21* Internal Functions *
22*******************************************************************************/
23#include <os2.h>
24#include "win32k.h"
25
26
27/*******************************************************************************
28* Global Variables *
29*******************************************************************************/
30extern BOOL fInited;
31extern HFILE hWin32k;
32
33#include "log.h"
34
35/**
36 * Gets the options settings and/or the status of win32k.sys.
37 * @returns OS2 returncode.
38 * @param pOptions Pointer to an options struct. (NULL is allowed)
39 * (cb have to be set to the size of the structure.)
40 * @param pStatus Pointer to a status struct. (NULL is allowed)
41 * (cb have to be set to the size of the structure.)
42 * @status completely implelemented.
43 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
44 * @remark
45 */
46APIRET APIENTRY libWin32kSetOptions(PK32OPTIONS pOptions)
47{
48 APIRET rc;
49
50 /*
51 * Simple validation.
52 */
53 if (pOptions == NULL || pOptions->cb != sizeof(K32OPTIONS))
54 rc = ERROR_INVALID_PARAMETER;
55
56 /*
57 * Check that we're initiated.
58 */
59 else if (fInited)
60 {
61 /*
62 * Build parameters and call win32k.
63 */
64 K32SETOPTIONS Param;
65 ULONG cbParam = sizeof(Param);
66 ULONG cbData = 0UL;
67
68 Param.pOptions = pOptions;
69 Param.rc = ERROR_INVALID_PARAMETER;
70
71 rc = DosDevIOCtl(hWin32k,
72 IOCTL_W32K_K32,
73 K32_SETOPTIONS,
74 &Param, sizeof(Param), &cbParam,
75 "", 1, &cbData);
76
77 if (rc == NO_ERROR)
78 rc = Param.rc;
79 }
80 else
81 rc = ERROR_INIT_ROUTINE_FAILED;
82
83 return rc;
84}
85
Note: See TracBrowser for help on using the repository browser.