MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryGlobalProperty

Function Ext2QueryGlobalProperty

Ext2Mgr/enumDisk.cpp:2523–2654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2521
2522
2523BOOL
2524Ext2QueryGlobalProperty(
2525 ULONG * ulStartup,
2526 BOOL * bReadonly,
2527 BOOL * bExt3Writable,
2528 CHAR * Codepage,
2529 CHAR * sPrefix,
2530 CHAR * sSuffix,
2531 BOOL * bAutoMount
2532 )
2533{
2534 int rc = TRUE;
2535 HKEY hKey;
2536 CHAR keyPath[MAX_PATH];
2537 DWORD data = 0;
2538 LONG status, type, len;
2539
2540 /* Open ext2fsd sevice key */
2541 strcpy (keyPath, "SYSTEM\\CurrentControlSet\\Services\\Ext2Fsd") ;
2542 status = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE,
2543 keyPath,
2544 0,
2545 KEY_ALL_ACCESS,
2546 &hKey) ;
2547 if (status != ERROR_SUCCESS) {
2548 rc = FALSE;
2549 goto errorout;
2550 }
2551
2552 /* Query Start type */
2553 len = sizeof(DWORD);
2554 status = RegQueryValueEx( hKey,
2555 "Start",
2556 0,
2557 (LPDWORD)&type,
2558 (BYTE *)&data,
2559 (LPDWORD)&len);
2560 if (status == ERROR_SUCCESS) {
2561 *ulStartup = data;
2562 }
2563
2564 RegCloseKey(hKey);
2565
2566 /* Open ext2fsd parameters key */
2567 strcpy (keyPath, "SYSTEM\\CurrentControlSet\\Services\\Ext2Fsd\\Parameters") ;
2568 status = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE,
2569 keyPath,
2570 0,
2571 KEY_ALL_ACCESS,
2572 &hKey) ;
2573 if (status != ERROR_SUCCESS) {
2574 rc = FALSE;
2575 goto errorout;
2576 }
2577
2578 /* Query WritingSupport */
2579 len = sizeof(DWORD);
2580 status = RegQueryValueEx( hKey,

Callers 3

OnInitDialogMethod · 0.85
OnServiceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected