extern "C" {
#include <afs/param.h>
#include <afs/stds.h>
+#include <osilog.h>
+#include <afs/fs_utils.h>
}
#include "afscreds.h"
#include "..\afsreg\afsreg.h" // So we can see if the server's installed
-
+#include "drivemap.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include "rxkad.h"
/*
* DEFINITIONS ________________________________________________________________
BOOL InitApp (LPSTR pszCmdLineA);
void ExitApp (void);
-void Quit (void);
void PumpMessage (MSG *pmsg);
BOOL IsServerInstalled (void);
*
*/
-int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow)
+extern "C" int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdShow)
{
Shortcut_Init();
TaLocale_LoadCorrespondingModule (hInst);
+ osi_InitTraceOption();
+ osi_LogEvent0("AFSCreds Main command line",pCmdLine);
+ fs_utils_InitMountRoot();
+
if (InitApp (pCmdLine))
{
MSG msg;
return 0;
}
+#define ISHIGHSECURITY(v) ( ((v) & LOGON_OPTION_HIGHSECURITY)==LOGON_OPTION_HIGHSECURITY)
+#define REG_CLIENT_PROVIDER_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\NetworkProvider"
BOOL InitApp (LPSTR pszCmdLineA)
{
case 'U':
fUninstall = TRUE;
break;
+ case ':':
+ MapShareName(pszCmdLineA);
+ break;
+ case 'x':
+ case 'X':
+ TestAndDoMapShare(SERVICE_START_PENDING);
+ TestAndDoMapShare(SERVICE_RUNNING);
+ return 0;
}
while (*pszCmdLineA && (*pszCmdLineA != ' '))
++pszCmdLineA;
+ if (*pszCmdLineA==' ') ++pszCmdLineA;
}
if (fInstall)
InitCommonControls();
RegisterCheckListClass();
+ osi_Init();
+ lock_InitializeMutex(&g.expirationCheckLock, "expiration check lock");
+ lock_InitializeMutex(&g.credsLock, "global creds lock");
+
+ if ( IsDebuggerPresent() ) {
+ if ( !g.fIsWinNT )
+ OutputDebugString("No Service Present on non-NT systems\n");
+ else {
+ if ( IsServiceRunning() )
+ OutputDebugString("AFSD Service started\n");
+ else {
+ OutputDebugString("AFSD Service stopped\n");
+ if ( !IsServiceConfigured() )
+ OutputDebugString("AFSD Service not configured\n");
+ }
+ }
+ }
// Create a main window. All further initialization will be done during
// processing of WM_INITDIALOG.
else if (!IsServerInstalled())
Message (MB_ICONHAND, IDS_UNCONFIG_TITLE, IDS_UNCONFIG_DESC);
}
- if (IsServiceRunning() && fShow)
+ if (IsServiceRunning()) {
+ if (fShow)
{
+ if ( IsDebuggerPresent() )
+ OutputDebugString("Displaying Main window\n");
Main_Show (TRUE);
}
-
- return TRUE;
+ } else if ( IsDebuggerPresent() )
+ OutputDebugString("Displaying Main window\n");
+ return TRUE;
}