VBoxGuestInstallHelper.cpp revision 9b26f96bcfeda631b89494cf2f5c31529f2e1419
af062818b47340eef15700d2f0211576ba3506eevboxsync * VBoxGuestInstallHelper - Various helper routines for Windows guest installer.
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2010 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync * available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync * you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync/* Required structures/defines of VBoxTray. */
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync#include "../../VBoxTray/VBoxTrayMsg.h"
af062818b47340eef15700d2f0211576ba3506eevboxsync#define VBOXINSTALLHELPER_EXPORT extern "C" void __declspec(dllexport)
af062818b47340eef15700d2f0211576ba3506eevboxsync * Pops (gets) a value from the internal NSIS stack.
af062818b47340eef15700d2f0211576ba3506eevboxsync * Since the supplied popstring() method easily can cause buffer
af062818b47340eef15700d2f0211576ba3506eevboxsync * overflows, use VBoxPopString() instead!
af062818b47340eef15700d2f0211576ba3506eevboxsync * @return HRESULT
af062818b47340eef15700d2f0211576ba3506eevboxsync * @param pszDest Pointer to pre-allocated string to store result.
af062818b47340eef15700d2f0211576ba3506eevboxsync * @param cchDest Size (in characters) of pre-allocated string.
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic HRESULT VBoxPopString(TCHAR *pszDest, size_t cchDest)
af062818b47340eef15700d2f0211576ba3506eevboxsync hr = StringCchCopy(pszDest, cchDest, pStack->text);
return hr;
if (pStack)
return hr;
return NULL;
return NULL;
if (!fSuccess)
return NULL;
return hPipe;
return hr;
EXDLL_INIT();
if (hPipe)
return TRUE;