Skip to content

Commit

Permalink
Update SandMan.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos authored Jul 28, 2021
1 parent 291e55b commit 1b0a38d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions SandboxiePlus/SandMan/SandMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,12 +1221,13 @@ SB_STATUS CSandMan::ConnectSbieImpl()
{
SB_STATUS Status = theAPI->Connect(theConf->GetBool("Options/UseInteractiveQueue", true));

if (Status.GetStatus() == 0xC0000038L /*STATUS_DEVICE_ALREADY_ATTACHED*/) {
OnLogMessage(tr("CAUTION: Another agent (probably SbieCtrl.exe) is already managing this Sandboxie session, please close it first and reconnect to take over."));
return SB_OK;
}
if (Status && !CSbieAPI::IsSbieCtrlRunning()) // don't take over when SbieCtrl is up and running
Status = theAPI->TakeOver();

return Status;
if (!Status)
return Status;

return SB_OK;
}

SB_STATUS CSandMan::DisconnectSbie()
Expand Down

0 comments on commit 1b0a38d

Please sign in to comment.