VBoxWindowsAdditions.cpp revision 2f139cbf73f9adba01382892f33558ad7bcb40cb
/* $Id$ */
/** @file
* VBoxWindowsAdditions - The Windows Guest Additions Loader
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
{
fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
if (NULL != fnIsWow64Process)
{
{
/* Error in retrieving process type - assume that we're running on 32bit. */
return FALSE;
}
}
return bIsWow64;
}
{
int iRet = 0;
int nArgs = 0;
SHELLEXECUTEINFOW TempInfo = { 0 };
{
/* Module not found, use a default name. */
_stprintf(szModule, _T("%ws"), (pszArgList != NULL) ? pszArgList[0] : _T("VBoxWindowsAdditions.exe"));
}
if (IsWow64()) /* 64bit Windows. */
{
}
else /* 32bit Windows. */
{
}
/* Construct parameter list. */
if (pszParams)
{
if (nArgs > 1)
{
for (int i=0; i<nArgs-1; i++)
{
if (i > 0)
{
}
}
}
}
/* Struct for ShellExecute. */
if (!dwRes && GetLastError() == 740) /* 740 = ERROR_ELEVATION_REQUIRED -> Only for Windows Vista. */
{
{
iRet = 1;
}
}
if (pszParams)
if (pszArgList)
return iRet;
}