VBoxWindowsAdditions.cpp revision 78a072e1b56619e3230735ae073668311232ec94
/* $Id$ */
/** @file
* VBoxWindowsAdditions - The Windows Guest Additions Loader
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* Oracle Corporation confidential
* All rights reserved
*/
#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;
}