| 612 | } |
| 613 | |
| 614 | int 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 | |
| 640 | errorout: |
| 641 | |
| 642 | if (cmd) |
| 643 | delete []cmd; |
| 644 | |
| 645 | return rc; |
| 646 | } |
| 647 | |
| 648 | int Ext2StartSrv() |
| 649 | { |
no test coverage detected