1 | /* $Id: VBoxStubBld.h 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxStubBld - VirtualBox's Windows installer stub builder.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009-2022 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h
|
---|
19 | #define VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #define VBOXSTUB_MAX_PACKAGES 128
|
---|
25 |
|
---|
26 | typedef struct VBOXSTUBPKGHEADER
|
---|
27 | {
|
---|
28 | /** Some magic string not defined by this header? Turns out it's a write only
|
---|
29 | * field... */
|
---|
30 | char szMagic[9];
|
---|
31 | /* Inbetween szMagic and dwVersion there are 3 bytes of implicit padding. */
|
---|
32 | /** Some version number not defined by this header? Also write only field.
|
---|
33 | * Should be a uint32_t, not DWORD. */
|
---|
34 | DWORD dwVersion;
|
---|
35 | /** Number of packages following the header. byte is prefixed 'b', not 'by'!
|
---|
36 | * Use uint8_t instead of BYTE. */
|
---|
37 | BYTE byCntPkgs;
|
---|
38 | /* There are 3 bytes of implicit padding here. */
|
---|
39 | } VBOXSTUBPKGHEADER;
|
---|
40 | typedef VBOXSTUBPKGHEADER *PVBOXSTUBPKGHEADER;
|
---|
41 |
|
---|
42 | typedef enum VBOXSTUBPKGARCH
|
---|
43 | {
|
---|
44 | VBOXSTUBPKGARCH_ALL = 0,
|
---|
45 | VBOXSTUBPKGARCH_X86,
|
---|
46 | VBOXSTUBPKGARCH_AMD64
|
---|
47 | } VBOXSTUBPKGARCH;
|
---|
48 |
|
---|
49 | typedef struct VBOXSTUBPKG
|
---|
50 | {
|
---|
51 | BYTE byArch;
|
---|
52 | /** Probably the name of the PE resource or something, read the source to
|
---|
53 | * find out for sure. Don't use _MAX_PATH, define your own max lengths! */
|
---|
54 | char szResourceName[_MAX_PATH];
|
---|
55 | char szFileName[_MAX_PATH];
|
---|
56 | } VBOXSTUBPKG;
|
---|
57 | typedef VBOXSTUBPKG *PVBOXSTUBPKG;
|
---|
58 |
|
---|
59 | /* Only for construction. */
|
---|
60 | /* Since it's only used by VBoxStubBld.cpp, why not just keep it there? */
|
---|
61 |
|
---|
62 | typedef struct VBOXSTUBBUILDPKG
|
---|
63 | {
|
---|
64 | char szSourcePath[_MAX_PATH];
|
---|
65 | BYTE byArch;
|
---|
66 | } VBOXSTUBBUILDPKG;
|
---|
67 | typedef VBOXSTUBBUILDPKG *PVBOXSTUBBUILDPKG;
|
---|
68 |
|
---|
69 | #endif /* !VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h */
|
---|