Changeset 82615 in vbox
- Timestamp:
- Dec 18, 2019 1:39:25 PM (5 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Installer/InstallHelper
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/Makefile.kmk
r82464 r82615 18 18 SUB_DEPTH = ../../../../../.. 19 19 include $(KBUILD_PATH)/subheader.kmk 20 21 # Include Sub-Makefiles. 22 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk 20 23 21 24 # -
trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp
r76553 r82615 2 2 /** @file 3 3 * VBoxGuestInstallHelper - Various helper routines for Windows guest installer. 4 * Works with NSIS 3.x. 4 5 */ 5 6 … … 46 47 #define VBOXINSTALLHELPER_EXPORT extern "C" void __declspec(dllexport) 47 48 48 49 49 /********************************************************************************************************************************* 50 50 * Structures and Typedefs * … … 160 160 { 161 161 HRESULT hr; 162 int iLen = strlen(pszString) + 2;162 int iLen = (int)strlen(pszString) + 2; 163 163 WCHAR *pwString = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, iLen * sizeof(WCHAR)); 164 164 if (!pwString) … … 206 206 * @param variables The actual variable string. 207 207 * @param stacktop Pointer to a pointer to the current stack. 208 */ 209 VBOXINSTALLHELPER_EXPORT DisableWFP(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop) 210 { 211 NOREF(hwndParent); 208 * @param extra Extra parameters. Currently unused. 209 */ 210 VBOXINSTALLHELPER_EXPORT DisableWFP(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, 211 extra_parameters *extra) 212 { 213 RT_NOREF(hwndParent, extra); 214 212 215 EXDLL_INIT(); 213 216 … … 259 262 * @param variables The actual variable string. 260 263 * @param stacktop Pointer to a pointer to the current stack. 261 */ 262 VBOXINSTALLHELPER_EXPORT FileGetArchitecture(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop) 263 { 264 NOREF(hwndParent); 264 * @param extra Extra parameters. Currently unused. 265 */ 266 VBOXINSTALLHELPER_EXPORT FileGetArchitecture(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, 267 extra_parameters *extra) 268 { 269 RT_NOREF(hwndParent, extra); 270 265 271 EXDLL_INIT(); 266 272 … … 316 322 * @param variables The actual variable string. 317 323 * @param stacktop Pointer to a pointer to the current stack. 318 */ 319 VBOXINSTALLHELPER_EXPORT FileGetVendor(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop) 320 { 321 NOREF(hwndParent); 324 * @param extra Extra parameters. Currently unused. 325 */ 326 VBOXINSTALLHELPER_EXPORT FileGetVendor(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, 327 extra_parameters *extra) 328 { 329 RT_NOREF(hwndParent, extra); 330 322 331 EXDLL_INIT(); 323 332 … … 379 388 * @param variables The actual variable string. 380 389 * @param stacktop Pointer to a pointer to the current stack. 381 */ 382 VBOXINSTALLHELPER_EXPORT VBoxTrayShowBallonMsg(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop) 383 { 384 NOREF(hwndParent); 390 * @param extra Extra parameters. Currently unused. 391 */ 392 VBOXINSTALLHELPER_EXPORT VBoxTrayShowBallonMsg(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, 393 extra_parameters *extra) 394 { 395 RT_NOREF(hwndParent, extra); 396 385 397 EXDLL_INIT(); 386 398 … … 398 410 399 411 uint32_t cbMsg = sizeof(VBOXTRAYIPCMSG_SHOWBALLOONMSG) 400 + strlen(szMsg) + 1/* Include terminating zero */401 + strlen(szTitle) + 1; /* Dito. */412 + (uint32_t)strlen(szMsg) + 1 /* Include terminating zero */ 413 + (uint32_t)strlen(szTitle) + 1; /* Ditto. */ 402 414 Assert(cbMsg); 403 415 PVBOXTRAYIPCMSG_SHOWBALLOONMSG pIpcMsg = -
trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/exdll.h
r76563 r82615 33 33 #endif 34 34 35 // Starting with NSIS 2.42, you can check the version of the plugin API in exec_flags->plugin_api_version 36 // The format is 0xXXXXYYYY where X is the major version and Y is the minor version (MAKELONG(y,x)) 37 // When doing version checks, always remember to use >=, ex: if (pX->exec_flags->plugin_api_version >= NSISPIAPIVER_1_0) {} 38 39 #define NSISPIAPIVER_1_0 0x00010000 40 #define NSISPIAPIVER_CURR NSISPIAPIVER_1_0 41 42 // NSIS Plug-In Callback Messages 43 enum NSPIM 44 { 45 NSPIM_UNLOAD, // This is the last message a plugin gets, do final cleanup 46 NSPIM_GUIUNLOAD, // Called after .onGUIEnd 47 }; 48 49 /** Defines the maximum string length NSIS can handle. 50 * Note: This depends on the NSIS build being used, e.g. there are different builds which can also handle larger strings. 51 * So to play safe go with the minimum (default) string length here. */ 52 #define NSIS_MAX_STRLEN 1024 53 54 // Prototype for callbacks registered with extra_parameters->RegisterPluginCallback() 55 // Return NULL for unknown messages 56 // Should always be __cdecl for future expansion possibilities 57 typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM); 58 59 #ifndef NSISCALL 60 # define NSISCALL __stdcall 61 #endif 62 35 63 // only include this file from one place in your DLL. 36 64 // (it is all static, if you use it in two places it will fail) … … 41 69 g_variables=variables; } 42 70 43 typedef struct _stack_t { 44 struct _stack_t *next; 45 char text[1]; // this should be the length of string_size 71 typedef struct _stack_t 72 { 73 struct _stack_t *next; 74 char text[1]; // this should be the length of string_size 46 75 } stack_t; 47 76 77 // extra_parameters data structures containing other interesting stuff 78 // but the stack, variables and HWND passed on to plug-ins. 79 typedef struct 80 { 81 int autoclose; 82 int all_user_var; 83 int exec_error; 84 int abort; 85 int exec_reboot; // NSIS_SUPPORT_REBOOT 86 int reboot_called; // NSIS_SUPPORT_REBOOT 87 int XXX_cur_insttype; // depreacted 88 int plugin_api_version; // see NSISPIAPIVER_CURR 89 // used to be XXX_insttype_changed 90 int silent; // NSIS_CONFIG_SILENT_SUPPORT 91 int instdir_error; 92 int rtl; 93 int errlvl; 94 int alter_reg_view; 95 int status_update; 96 } exec_flags_t; 97 98 typedef struct 99 { 100 exec_flags_t *exec_flags; 101 int (NSISCALL *ExecuteCodeSegment)(int, HWND); 102 void (NSISCALL *validate_filename)(TCHAR *); 103 BOOL (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); 104 } extra_parameters; 48 105 49 106 static unsigned int g_stringsize;
Note:
See TracChangeset
for help on using the changeset viewer.