mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-27 06:12:17 +08:00
Potential fix for issue 26, but needs some GUI integration
This commit is contained in:
@@ -615,13 +615,14 @@ CArchDaemonWindows::serviceMain(DWORD argc, LPTSTR* argvIn)
|
||||
m_serviceState = SERVICE_START_PENDING;
|
||||
setStatus(m_serviceState, 0, 10000);
|
||||
|
||||
std::string commandLine;
|
||||
|
||||
// if no arguments supplied then try getting them from the registry.
|
||||
// the first argument doesn't count because it's the service name.
|
||||
Arguments args;
|
||||
ArgList myArgv;
|
||||
if (argc <= 1) {
|
||||
// read command line
|
||||
std::string commandLine;
|
||||
HKEY key = openNTServicesKey();
|
||||
key = CArchMiscWindows::openKey(key, argvIn[0]);
|
||||
key = CArchMiscWindows::openKey(key, _T("Parameters"));
|
||||
@@ -685,6 +686,8 @@ CArchDaemonWindows::serviceMain(DWORD argc, LPTSTR* argvIn)
|
||||
}
|
||||
}
|
||||
|
||||
m_commandLine = commandLine;
|
||||
|
||||
try {
|
||||
// invoke daemon function
|
||||
m_daemonResult = m_daemonFunc(static_cast<int>(argc), argv);
|
||||
|
||||
Reference in New Issue
Block a user