Skip to content

Commit

Permalink
Use explicit API version on structs instead of depending on size of s…
Browse files Browse the repository at this point in the history
…truct
  • Loading branch information
robmen committed Mar 4, 2024
1 parent 807e888 commit e9a232f
Show file tree
Hide file tree
Showing 6 changed files with 1,408 additions and 1,407 deletions.
104 changes: 52 additions & 52 deletions src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,154 +119,154 @@ enum BOOTSTRAPPER_ENGINE_MESSAGE

typedef struct _BAENGINE_APPLY_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD64 hwndParent;
} BAENGINE_APPLY_ARGS;

typedef struct _BAENGINE_APPLY_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_APPLY_RESULTS;

typedef struct _BAENGINE_CLOSESPLASHSCREEN_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_CLOSESPLASHSCREEN_ARGS;

typedef struct _BAENGINE_CLOSESPLASHSCREEN_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_CLOSESPLASHSCREEN_RESULTS;

typedef struct _BAENGINE_COMPAREVERSIONS_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVersion1;
LPCWSTR wzVersion2;
} BAENGINE_COMPAREVERSIONS_ARGS;

typedef struct _BAENGINE_COMPAREVERSIONS_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
INT32 nResult;
} BAENGINE_COMPAREVERSIONS_RESULTS;

typedef struct _BAENGINE_DETECT_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD64 hwndParent;
} BAENGINE_DETECT_ARGS;

typedef struct _BAENGINE_DETECT_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_DETECT_RESULTS;

typedef struct _BAENGINE_ELEVATE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD64 hwndParent;
} BAENGINE_ELEVATE_ARGS;

typedef struct _BAENGINE_ELEVATE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_ELEVATE_RESULTS;

typedef struct _BAENGINE_ESCAPESTRING_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzIn;
} BAENGINE_ESCAPESTRING_ARGS;

typedef struct _BAENGINE_ESCAPESTRING_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LPWSTR wzOut;
// Should be initialized to the size of wzOut.
DWORD cchOut;
} BAENGINE_ESCAPESTRING_RESULTS;

typedef struct _BAENGINE_EVALUATECONDITION_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzCondition;
} BAENGINE_EVALUATECONDITION_ARGS;

typedef struct _BAENGINE_EVALUATECONDITION_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
BOOL f;
} BAENGINE_EVALUATECONDITION_RESULTS;

typedef struct _BAENGINE_FORMATSTRING_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzIn;
} BAENGINE_FORMATSTRING_ARGS;

typedef struct _BAENGINE_FORMATSTRING_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LPWSTR wzOut;
// Should be initialized to the size of wzOut.
DWORD cchOut;
} BAENGINE_FORMATSTRING_RESULTS;

typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_GETPACKAGECOUNT_ARGS;

typedef struct _BAENGINE_GETPACKAGECOUNT_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD cPackages;
} BAENGINE_GETPACKAGECOUNT_RESULTS;

typedef struct _BAENGINE_GETVARIABLENUMERIC_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
} BAENGINE_GETVARIABLENUMERIC_ARGS;

typedef struct _BAENGINE_GETVARIABLENUMERIC_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LONGLONG llValue;
} BAENGINE_GETVARIABLENUMERIC_RESULTS;

typedef struct _BAENGINE_GETVARIABLESTRING_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
} BAENGINE_GETVARIABLESTRING_ARGS;

typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LPWSTR wzValue;
// Should be initialized to the size of wzValue.
DWORD cchValue;
} BAENGINE_GETVARIABLESTRING_RESULTS;

typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
} BAENGINE_GETVARIABLEVERSION_ARGS;

typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LPWSTR wzValue;
// Should be initialized to the size of wzValue.
DWORD cchValue;
} BAENGINE_GETVARIABLEVERSION_RESULTS;

typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD64 hwndParent;
LPCWSTR wzApprovedExeForElevationId;
LPCWSTR wzArguments;
Expand All @@ -275,85 +275,85 @@ typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS

typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_LAUNCHAPPROVEDEXE_RESULTS;

typedef struct _BAENGINE_SETUPDATESOURCE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzUrl;
LPCWSTR wzAuthorizationHeader;
} BAENGINE_SETUPDATESOURCE_ARGS;

typedef struct _BAENGINE_SETUPDATESOURCE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETUPDATESOURCE_RESULTS;

typedef struct _BAENGINE_LOG_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
BOOTSTRAPPER_LOG_LEVEL level;
LPCWSTR wzMessage;
} BAENGINE_LOG_ARGS;

typedef struct _BAENGINE_LOG_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_LOG_RESULTS;

typedef struct _BAENGINE_PLAN_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
BOOTSTRAPPER_ACTION action;
} BAENGINE_PLAN_ARGS;

typedef struct _BAENGINE_PLAN_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_PLAN_RESULTS;

typedef struct _BAENGINE_QUIT_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD dwExitCode;
} BAENGINE_QUIT_ARGS;

typedef struct _BAENGINE_QUIT_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_QUIT_RESULTS;

typedef struct _BAENGINE_SENDEMBEDDEDERROR_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD dwErrorCode;
LPCWSTR wzMessage;
DWORD dwUIHint;
} BAENGINE_SENDEMBEDDEDERROR_ARGS;

typedef struct _BAENGINE_SENDEMBEDDEDERROR_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
INT32 nResult;
} BAENGINE_SENDEMBEDDEDERROR_RESULTS;

typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
DWORD dwProgressPercentage;
DWORD dwOverallProgressPercentage;
} BAENGINE_SENDEMBEDDEDPROGRESS_ARGS;

typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
INT32 nResult;
} BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS;

typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzPackageOrContainerId;
LPCWSTR wzPayloadId;
LPCWSTR wzUrl;
Expand All @@ -364,25 +364,25 @@ typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS

typedef struct _BAENGINE_SETDOWNLOADSOURCE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETDOWNLOADSOURCE_RESULTS;

typedef struct _BAENGINE_SETLOCALSOURCE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzPackageOrContainerId;
LPCWSTR wzPayloadId;
LPCWSTR wzPath;
} BAENGINE_SETLOCALSOURCE_ARGS;

typedef struct _BAENGINE_SETLOCALSOURCE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETLOCALSOURCE_RESULTS;

typedef struct _BAENGINE_SETUPDATE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzLocalSource;
LPCWSTR wzDownloadSource;
DWORD64 qwSize;
Expand All @@ -393,56 +393,56 @@ typedef struct _BAENGINE_SETUPDATE_ARGS

typedef struct _BAENGINE_SETUPDATE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETUPDATE_RESULTS;

typedef struct _BAENGINE_SETVARIABLENUMERIC_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
LONGLONG llValue;
} BAENGINE_SETVARIABLENUMERIC_ARGS;

typedef struct _BAENGINE_SETVARIABLENUMERIC_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETVARIABLENUMERIC_RESULTS;

typedef struct _BAENGINE_SETVARIABLESTRING_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
LPCWSTR wzValue;
BOOL fFormatted;
} BAENGINE_SETVARIABLESTRING_ARGS;

typedef struct _BAENGINE_SETVARIABLESTRING_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETVARIABLESTRING_RESULTS;

typedef struct _BAENGINE_SETVARIABLEVERSION_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzVariable;
LPCWSTR wzValue;
} BAENGINE_SETVARIABLEVERSION_ARGS;

typedef struct _BAENGINE_SETVARIABLEVERSION_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
} BAENGINE_SETVARIABLEVERSION_RESULTS;

typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS
{
DWORD cbSize;
DWORD dwApiVersion;
LPCWSTR wzBundleId;
LPCWSTR wzVariable;
} BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS;

typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS
{
DWORD cbSize;
DWORD dwApiVersion;
LPWSTR wzValue;
// Should be initialized to the size of wzValue.
DWORD cchValue;
Expand Down
Loading

0 comments on commit e9a232f

Please sign in to comment.