Index: trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp	(revision 37405)
+++ trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp	(revision 37421)
@@ -16,4 +16,7 @@
  */
 
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
 #include <windows.h>
 #include <atlconv.h>
@@ -25,16 +28,29 @@
 #include "../../VBoxTray/VBoxTrayMsg.h"
 
-HINSTANCE g_hInstance;
-HWND g_hwndParent;
-
-typedef DWORD (WINAPI *fnSfcFileException) (DWORD param1, PWCHAR param2, DWORD param3);
-fnSfcFileException g_pfnSfcFileException = NULL;
-
+
+/*******************************************************************************
+*   Defined Constants And Macros                                               *
+*******************************************************************************/
 #define VBOXINSTALLHELPER_EXPORT extern "C" void __declspec(dllexport)
+
+
+/*******************************************************************************
+*   Structures and Typedefs                                                    *
+*******************************************************************************/
+typedef DWORD (WINAPI *PFNSFCFILEEXCEPTION)(DWORD param1, PWCHAR param2, DWORD param3);
+
+
+/*******************************************************************************
+*   Global Variables                                                           *
+*******************************************************************************/
+HINSTANCE               g_hInstance;
+HWND                    g_hwndParent;
+PFNSFCFILEEXCEPTION     g_pfnSfcFileException = NULL;
+
 
 /**
  * Pops (gets) a value from the internal NSIS stack.
  * Since the supplied popstring() method easily can cause buffer
- * overflows, use VBoxPopString() instead!
+ * overflows, use vboxPopString() instead!
  *
  * @return  HRESULT
@@ -42,5 +58,5 @@
  * @param   cchDest     Size (in characters) of pre-allocated string.
  */
-static HRESULT VBoxPopString(TCHAR *pszDest, size_t cchDest)
+static HRESULT vboxPopString(TCHAR *pszDest, size_t cchDest)
 {
     HRESULT hr = S_OK;
@@ -63,5 +79,5 @@
 }
 
-static HRESULT VBoxPopULong(ULONG *pulValue)
+static HRESULT vboxPopULong(PULONG pulValue)
 {
     HRESULT hr = S_OK;
@@ -82,5 +98,5 @@
 }
 
-void Char2WCharFree(PWCHAR pwString)
+static void vboxChar2WCharFree(PWCHAR pwString)
 {
     if (pwString)
@@ -88,9 +104,9 @@
 }
 
-HRESULT Char2WCharAlloc(const char *pszString, PWCHAR *ppwString)
+static HRESULT vboxChar2WCharAlloc(const char *pszString, PWCHAR *ppwString)
 {
     HRESULT hr;
     int iLen = strlen(pszString) + 2;
-	WCHAR *pwString = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, iLen * sizeof(WCHAR));
+    WCHAR *pwString = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, iLen * sizeof(WCHAR));
     if (!pwString)
         hr = ERROR_NOT_ENOUGH_MEMORY;
@@ -111,5 +127,5 @@
 }
 
-HANDLE VBoIPCConnect()
+static HANDLE vboxIPCConnect(void)
 {
     HANDLE hPipe = NULL;
@@ -149,10 +165,10 @@
 }
 
-void VBoxIPCDisconnect(HANDLE hPipe)
+static void vboxIPCDisconnect(HANDLE hPipe)
 {
     CloseHandle(hPipe);
 }
 
-HRESULT VBoxIPCWriteMessage(HANDLE hPipe, BYTE *pMessage, DWORD cbMessage)
+static HRESULT vboxIPCWriteMessage(HANDLE hPipe, BYTE *pMessage, DWORD cbMessage)
 {
     HRESULT hr = S_OK;
@@ -182,11 +198,11 @@
 
     VBOXTRAYIPCMSG_SHOWBALLOONMSG msg;
-    HRESULT hr = VBoxPopString(msg.szContent, sizeof(msg.szContent) / sizeof(TCHAR));
-    if (SUCCEEDED(hr))
-        hr = VBoxPopString(msg.szTitle, sizeof(msg.szTitle) / sizeof(TCHAR));
-    if (SUCCEEDED(hr))
-        hr = VBoxPopULong(&msg.ulType);
-    if (SUCCEEDED(hr))
-        hr = VBoxPopULong(&msg.ulShowMS);
+    HRESULT hr = vboxPopString(msg.szContent, sizeof(msg.szContent) / sizeof(TCHAR));
+    if (SUCCEEDED(hr))
+        hr = vboxPopString(msg.szTitle, sizeof(msg.szTitle) / sizeof(TCHAR));
+    if (SUCCEEDED(hr))
+        hr = vboxPopULong(&msg.ulType);
+    if (SUCCEEDED(hr))
+        hr = vboxPopULong(&msg.ulShowMS);
 
     if (SUCCEEDED(hr))
@@ -194,11 +210,11 @@
         msg.ulFlags = 0;
 
-        HANDLE hPipe = VBoIPCConnect();
+        HANDLE hPipe = vboxIPCConnect();
         if (hPipe)
         {
-            hr = VBoxIPCWriteMessage(hPipe, (BYTE*)&hdr, sizeof(VBOXTRAYIPCHEADER));
+            hr = vboxIPCWriteMessage(hPipe, (BYTE*)&hdr, sizeof(VBOXTRAYIPCHEADER));
             if (SUCCEEDED(hr))
-                hr = VBoxIPCWriteMessage(hPipe, (BYTE*)&msg, sizeof(VBOXTRAYIPCMSG_SHOWBALLOONMSG));
-            VBoxIPCDisconnect(hPipe);
+                hr = vboxIPCWriteMessage(hPipe, (BYTE*)&msg, sizeof(VBOXTRAYIPCMSG_SHOWBALLOONMSG));
+            vboxIPCDisconnect(hPipe);
         }
     }
@@ -229,5 +245,5 @@
 
     TCHAR szFile[MAX_PATH + 1];
-    HRESULT hr = VBoxPopString(szFile, sizeof(szFile) / sizeof(TCHAR));
+    HRESULT hr = vboxPopString(szFile, sizeof(szFile) / sizeof(TCHAR));
     if (SUCCEEDED(hr))
     {
@@ -235,10 +251,10 @@
         if (NULL != hSFC)
         {
-            g_pfnSfcFileException = (fnSfcFileException)GetProcAddress(hSFC, "SfcFileException");
+            g_pfnSfcFileException = (PFNSFCFILEEXCEPTION)GetProcAddress(hSFC, "SfcFileException");
             if (g_pfnSfcFileException == NULL)
             {
                 /* If we didn't get the proc address with the call above, try it harder with
                  * the (zero based) index of the function list. */
-                g_pfnSfcFileException = (fnSfcFileException)GetProcAddress(hSFC, (LPCSTR)5);
+                g_pfnSfcFileException = (PFNSFCFILEEXCEPTION)GetProcAddress(hSFC, (LPCSTR)5);
                 if (g_pfnSfcFileException == NULL)
                     hr = HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
@@ -251,10 +267,10 @@
         {
             WCHAR *pwszFile;
-            hr = Char2WCharAlloc(szFile, &pwszFile);
+            hr = vboxChar2WCharAlloc(szFile, &pwszFile);
             if (SUCCEEDED(hr))
             {
                 if (g_pfnSfcFileException(0, pwszFile, -1) != 0)
                     hr = HRESULT_FROM_WIN32(GetLastError());
-                Char2WCharFree(pwszFile);
+                vboxChar2WCharFree(pwszFile);
             }
         }
