MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / ProcessCommandLine

Method ProcessCommandLine

cppcryptfs/ui/MountPropertyPage.cpp:1321–1666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1319
1320
1321void CMountPropertyPage::ProcessCommandLine(LPCWSTR szCmd, BOOL bOnStartup, HANDLE hPipe)
1322{
1323 // need to intialize these getop variables before we process a command line
1324 getopt_init();
1325
1326 CString errMes;
1327
1328 int argc = 1;
1329
1330 LPWSTR *argv = NULL;
1331
1332 if (szCmd)
1333 argv = CommandLineToArgvW(szCmd, &argc);
1334
1335 if (argv == NULL || argc < 2) {
1336 if (argv)
1337 LocalFree(argv);
1338 return;
1339 }
1340
1341 OutputHandler output_handler(hPipe);
1342
1343 const auto printMessages = bOnStartup || output_handler.have_pipe(); // OpenConsole(bOnStartup ? 0 : pid);
1344
1345 CString path;
1346 CString mountPoint;
1347 LockZeroBuffer<WCHAR> password((DWORD)(wcslen(szCmd) + 1), false);
1348 BOOL mount = FALSE;
1349 BOOL dismount = FALSE;
1350 BOOL dismount_all = FALSE;
1351
1352 BOOL invalid_opt = FALSE;
1353
1354 BOOL do_help = FALSE;
1355 BOOL do_info = FALSE;
1356 BOOL do_csv = FALSE;
1357 BOOL do_version = FALSE;
1358 BOOL do_dirsfirst = FALSE;
1359 BOOL exit_if_no_mounted = FALSE;
1360 BOOL hide_to_system_tray = FALSE;
1361 BOOL do_list = FALSE;
1362 bool readonly = false;
1363 bool reverse = false;
1364 CString config_path;
1365 bool use_saved_password = false;
1366 bool force = false;
1367 int deny_other_sessions = -1;
1368 int deny_services = -1;
1369
1370 CString list_arg;
1371 wstring transform_arg;
1372
1373 try {
1374
1375 static struct option long_options[] =
1376 {
1377 {L"mount", required_argument, 0, 'm'},
1378 {L"drive", required_argument, 0, 'd'},

Callers 1

OnCopyDataMethod · 0.45

Calls 12

getopt_initFunction · 0.85
getopt_longFunction · 0.85
GetProductVersionInfoFunction · 0.85
usageFunction · 0.85
transform_pathFunction · 0.85
list_filesFunction · 0.85
have_pipeMethod · 0.80
printMethod · 0.80
findMethod · 0.80
initMethod · 0.80
emptyMethod · 0.80
OnIdrExitcppcryptfsMethod · 0.80

Tested by

no test coverage detected