VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPRegistry.cpp@ 55210

Last change on this file since 55210 was 36867, checked in by vboxsync, 14 years ago

Additions/Video: display/miniport drivers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/* $Id: VBoxMPRegistry.cpp 36867 2011-04-28 07:27:03Z vboxsync $ */
2
3/** @file
4 * VBox XPDM Miniport registry related functions
5 */
6
7/*
8 * Copyright (C) 2011 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#include "common/VBoxMPCommon.h"
20
21static VP_STATUS
22VBoxMPQueryNamedValueCB(PVOID HwDeviceExtension, PVOID Context,
23 PWSTR ValueName, PVOID ValueData, ULONG ValueLength)
24{
25 PAGED_CODE();
26
27 if (!ValueLength || !Context)
28 {
29 WARN(("failed due to invalid parameters"));
30 return ERROR_INVALID_PARAMETER;
31 }
32
33 *(uint32_t *)Context = *(uint32_t *)ValueData;
34
35 return NO_ERROR;
36}
37
38
39VP_STATUS VBoxMPCmnRegInit(IN PVBOXMP_DEVEXT pExt, OUT VBOXMPCMNREGISTRY *pReg)
40{
41 *pReg = pExt->pPrimary;
42 return NO_ERROR;
43}
44
45VP_STATUS VBoxMPCmnRegFini(IN VBOXMPCMNREGISTRY Reg)
46{
47 return NO_ERROR;
48}
49
50VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t Val)
51{
52 return VideoPortSetRegistryParameters(Reg, pName, &Val, sizeof(Val));
53}
54
55VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t *pVal)
56{
57 VP_STATUS rc;
58
59 rc = VideoPortGetRegistryParameters(Reg, pName, FALSE, VBoxMPQueryNamedValueCB, pVal);
60 if (rc!=NO_ERROR && pVal)
61 {
62 *pVal = 0;
63 }
64 return rc;
65}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette