VirtualBox

Changeset 106395 in vbox


Ignore:
Timestamp:
Oct 16, 2024 4:27:03 PM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165210
Message:

Windows installers: Added code for also parsing and querying version information from INF files. Will be also displayed in tstVBoxInstHlpDrvInst now [build fix]. bugref:10762

Location:
trunk
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/VBoxWinDrvDefs.h

    r106394 r106395  
    11/* $Id$ */
    22/** @file
    3  * VBoxWinDrvCommon - Common Windows driver functions.
     3 * VBoxWinDrvDefs - Common definitions for Windows driver functions.
    44 */
    55
     
    4141#endif
    4242
    43 #include <iprt/win/windows.h>
    44 #include <iprt/win/setupapi.h>
    45 
    4643#include <iprt/utf16.h>
    4744
     
    8178typedef VBOXWINDRVINFSEC_VERSION *PVBOXWINDRVINFSEC_VERSION;
    8279
    83 int VBoxWinDrvInfOpenEx(PCRTUTF16 pwszInfFile, PRTUTF16 pwszClassName, HINF *phInf);
    84 int VBoxWinDrvInfOpen(PCRTUTF16 pwszInfFile, HINF *phInf);
    85 int VBoxWinDrvInfOpenUtf8(const char *pszInfFile, HINF *phInf);
    86 int VBoxWinDrvInfClose(HINF hInf);
    87 int VBoxWinDrvInfQueryFirstModel(HINF hInf, PRTUTF16 *ppwszModel);
    88 int VBoxWinDrvInfQueryFirstPnPId(HINF hInf, PRTUTF16 pwszModel, PRTUTF16 *ppwszPnPId);
    89 int VBoxWinDrvInfQueryKeyValue(PINFCONTEXT pCtx, DWORD iValue, PRTUTF16 *ppwszValue, PDWORD pcwcValue);
    90 int VBoxWinDrvInfQueryModelsSectionName(HINF hInf, PRTUTF16 *ppwszValue, PDWORD pcwcValue);
    91 int VBoxWinDrvInfQuerySectionVerEx(HINF hInf, UINT uIndex, PVBOXWINDRVINFSEC_VERSION pVer);
    92 int VBoxWinDrvInfQuerySectionVer(HINF hInf, PVBOXWINDRVINFSEC_VERSION pVer);
    93 
    9480#endif /* !VBOX_INCLUDED_GuestHost_VBoxWinDrvCommon_h */
    95 
  • trunk/include/VBox/GuestHost/VBoxWinDrvStore.h

    r106392 r106395  
    4545#include <iprt/utf16.h>
    4646
    47 #include <VBox/GuestHost/VBoxWinDrvCommon.h>
     47#include <VBox/GuestHost/VBoxWinDrvDefs.h>
    4848
    4949/** Maximum model PnP ID length (in characters). */
  • trunk/src/VBox/GuestHost/installation/VBoxWinDrvCommon.cpp

    r106393 r106395  
    5151#endif
    5252
    53 #include <VBox/GuestHost/VBoxWinDrvCommon.h>
     53#include "VBoxWinDrvCommon.h"
    5454
    5555
  • trunk/src/VBox/GuestHost/installation/VBoxWinDrvCommon.h

    r106394 r106395  
    2323 * along with this program; if not, see <https://www.gnu.org/licenses>.
    2424 *
    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
     25 * SPDX-License-Identifier: GPL-3.0-only
    3526 */
    3627
    37 #ifndef VBOX_INCLUDED_GuestHost_VBoxWinDrvCommon_h
    38 #define VBOX_INCLUDED_GuestHost_VBoxWinDrvCommon_h
     28#ifndef VBOX_INCLUDED_SRC_installation_VBoxWinDrvCommon_h
     29#define VBOX_INCLUDED_SRC_installation_VBoxWinDrvCommon_h
    3930#ifndef RT_WITHOUT_PRAGMA_ONCE
    4031# pragma once
     
    4637#include <iprt/utf16.h>
    4738
    48 #if defined(RT_ARCH_AMD64)
    49 # define VBOXWINDRVINF_NATIVE_ARCH_STR     "AMD64"
    50 #elif defined(RT_ARCH_X86)
    51 # define VBOXWINDRVINF_NATIVE_ARCH_STR     "X86"
    52 #elif defined(RT_ARCH_ARM64)
    53 # define VBOXWINDRVINF_NATIVE_ARCH_STR     "ARM64"
    54 #else
    55 # error "Port me!"
    56 #endif
    57 
    58 /** Defines a string which emits the bulld target's native architeture, e.g. ".NTAMD64". */
    59 #define VBOXWINDRVINF_DOT_NT_NATIVE_ARCH_STR ".NT" VBOXWINDRVINF_NATIVE_ARCH_STR
    60 
    61 /** Maximum catalog file (.cat) length (in characters). */
    62 #define VBOXWINDRVINF_MAX_CATALOG_FILE     255
    63 /** Maximum driver version length (in characters). */
    64 #define VBOXWINDRVINF_MAX_DRIVER_VER       255
    65 /** Maximum provider name length (in characters). */
    66 #define VBOXWINDRVINF_MAX_PROVIDER_FILE    255
    67 
    68 /**
    69  * Structure for keeping INF Version section information.
    70  */
    71 typedef struct _VBOXWINDRVINFSEC_VERSION
    72 {
    73     /** Catalog (.cat) file. */
    74     RTUTF16 wszCatalogFile[VBOXWINDRVINF_MAX_CATALOG_FILE];
    75     /** Driver version. */
    76     RTUTF16 wszDriverVer[VBOXWINDRVINF_MAX_DRIVER_VER];
    77     /** Provider name. */
    78     RTUTF16 wszProvider[VBOXWINDRVINF_MAX_PROVIDER_FILE];
    79 } VBOXWINDRVINFSEC_VERSION;
    80 /** Pointer to structure for keeping INF Version section information. */
    81 typedef VBOXWINDRVINFSEC_VERSION *PVBOXWINDRVINFSEC_VERSION;
     39#include <VBox/GuestHost/VBoxWinDrvCommon.h>
    8240
    8341int VBoxWinDrvInfOpenEx(PCRTUTF16 pwszInfFile, PRTUTF16 pwszClassName, HINF *phInf);
     
    9250int VBoxWinDrvInfQuerySectionVer(HINF hInf, PVBOXWINDRVINFSEC_VERSION pVer);
    9351
    94 #endif /* !VBOX_INCLUDED_GuestHost_VBoxWinDrvCommon_h */
     52#endif /* !VBOX_INCLUDED_SRC_installation_VBoxWinDrvCommon_h */
    9553
Note: See TracChangeset for help on using the changeset viewer.

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