VirtualBox

source: vbox/trunk/include/VBox/GuestHost/VBoxWinDrvDefs.h@ 107901

Last change on this file since 107901 was 107901, checked in by vboxsync, 2 weeks ago

Windows driver installation: Fixed incorrect size passed to SetupDiGetINFClassW in VBoxWinDrvInfOpen and RTUtf16Copy+RTUtf16Cat in VBoxWinDrvInfQueryModelEx; tried to fix bogus key+value parsing in VBoxWinDrvInfQuerySectionVerEx. bugref:10762

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/* $Id: VBoxWinDrvDefs.h 107901 2025-01-22 22:21:48Z vboxsync $ */
2/** @file
3 * VBoxWinDrvDefs - Common definitions for Windows driver installation functions.
4 */
5
6/*
7 * Copyright (C) 2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37#ifndef VBOX_INCLUDED_GuestHost_VBoxWinDrvDefs_h
38#define VBOX_INCLUDED_GuestHost_VBoxWinDrvDefs_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43#include <iprt/utf16.h>
44
45/* If not defined explicitly, use the given / current target architecture. */
46#ifndef VBOXWINDRVINF_NATIVE_ARCH_STR /* For cross testing and testcases. */
47# if defined(RT_ARCH_AMD64)
48# define VBOXWINDRVINF_NATIVE_ARCH_STR "AMD64"
49# elif defined(RT_ARCH_X86)
50# define VBOXWINDRVINF_NATIVE_ARCH_STR "X86"
51# elif defined(RT_ARCH_ARM64)
52# define VBOXWINDRVINF_NATIVE_ARCH_STR "ARM64"
53# else
54# error "Port me!"
55# endif
56#endif
57
58/** Defines a string which emits the decoration separator. */
59#define VBOXWINDRVINF_DECORATION_SEP_STR "."
60
61/** Defines a string which emits the decoration separator (UTF-16 version). */
62#define VBOXWINDRVINF_DECORATION_SEP_UTF16_STR L"."
63
64/** Defines a string which emits the bulld target's native architeture, e.g. "NTAMD64". */
65#define VBOXWINDRVINF_NT_NATIVE_ARCH_STR "NT" VBOXWINDRVINF_NATIVE_ARCH_STR
66
67/** Defines a string which emits the bulld target's native architeture, e.g. ".NTAMD64". */
68#define VBOXWINDRVINF_DOT_NT_NATIVE_ARCH_STR VBOXWINDRVINF_DECORATION_SEP_STR VBOXWINDRVINF_NT_NATIVE_ARCH_STR
69
70/** Maximum INF catalog file (.cat) length (in characters). */
71#define VBOXWINDRVINF_MAX_CATALOG_FILE_LEN 255
72/** Maximum INF driver version length (in characters). */
73#define VBOXWINDRVINF_MAX_DRIVER_VER_LEN 255
74/** Maximum INF provider name length (in characters). */
75#define VBOXWINDRVINF_MAX_PROVIDER_NAME_LEN 255
76/** Maximum INF section name length (in characters). */
77#define VBOXWINDRVINF_MAX_SECTION_NAME_LEN 255
78/** Maximum INF model name length (in characters). */
79#define VBOXWINDRVINF_MAX_MODEL_NAME_LEN 255
80/** Maximum INF PnP ID length (in characters). */
81#define VBOXWINDRVINF_MAX_PNP_ID_LEN 255
82
83
84/**
85 * Structure for keeping INF Version section information.
86 */
87typedef struct VBOXWINDRVINFSECVERSION
88{
89 /** Catalog (.cat) file. */
90 RTUTF16 wszCatalogFile[VBOXWINDRVINF_MAX_CATALOG_FILE_LEN];
91 /** Driver version. */
92 RTUTF16 wszDriverVer[VBOXWINDRVINF_MAX_DRIVER_VER_LEN];
93 /** Provider name. */
94 RTUTF16 wszProvider[VBOXWINDRVINF_MAX_PROVIDER_NAME_LEN];
95} VBOXWINDRVINFSECVERSION;
96/** Pointer to structure for keeping INF Version section information. */
97typedef VBOXWINDRVINFSECVERSION *PVBOXWINDRVINFSECVERSION;
98
99#endif /* !VBOX_INCLUDED_GuestHost_VBoxWinDrvDefs_h */
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