Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: wetwood on April 19, 2013, 12:05:22 PM



Title: cgminer
Post by: wetwood on April 19, 2013, 12:05:22 PM
Hi guys,
after a bit of information if anyone knows.
trying to run cgminer as local_service it seems to run but doesnt send any information to the pool.
if i run it as administrator it works. but displayed the dos window. point is to have it run in background.
does cgminer have /hide or any arguments i can add to my code?


Title: Re: cgminer
Post by: grue on April 19, 2013, 03:00:34 PM
you'll need code to do this:

(c++)
Code:
STARTUPINFO StartupInfo;
PROCESS_INFORMATION ProcessInformation;

memset(&StartupInfo, 0, sizeof(STARTUPINFO));
ProcessInformation.hProcess = 0;
ProcessInformation.hThread = 0;
ProcessInformation.dwProcessId = 0;
ProcessInformation.dwThreadId = 0;
StartupInfo.wShowWindow = 0;
StartupInfo.cb = 0x44;
StartupInfo.dwFlags = 1;
CreateProcessA(0, lpCmdLine, 0, 0, 0, 0, 0, 0, &StartupInfo, &ProcessInformation);
relevant: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx


Title: Re: cgminer
Post by: wetwood on April 19, 2013, 03:03:33 PM
Cheers grue will look into it, normally code in c# looking like i might have to just write a .exe to run.