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

Function Ext2StartSrvAsElevated

Ext2Mgr/Ext2Pipe.cpp:614–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614int Ext2StartSrvAsElevated()
615{
616 LPTSTR cmd = NULL;
617 STARTUPINFO si = {0};
618 PROCESS_INFORMATION pi = {0};
619 int rc = -1;
620
621 cmd = Ext2BuildCMDA();
622 if (!cmd) {
623 rc = -1;
624 goto errorout;
625 }
626
627 si.cb = sizeof( STARTUPINFO );
628 rc = CreateProcess( NULL, cmd, NULL, NULL,
629 FALSE, NORMAL_PRIORITY_CLASS |
630 CREATE_NO_WINDOW, NULL, NULL,
631 &si, &pi );
632
633 if (!rc) {
634 rc = -1 * GetLastError();
635 goto errorout;
636 }
637
638 g_Ext2Srv = pi;
639
640errorout:
641
642 if (cmd)
643 delete []cmd;
644
645 return rc;
646}
647
648int Ext2StartSrv()
649{

Callers 1

Ext2StartSrvFunction · 0.85

Calls 1

Ext2BuildCMDAFunction · 0.85

Tested by

no test coverage detected