mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Compilation warnings cleanup
This commit is contained in:
1 parent
f70a8c0019
commit
3b8e7741b3
21 files changed
+173
-172
No files matched your search
+8
-8
@@ -87,7 +87,7 @@ void __stdcall CommandHandler( DWORD dwCommand )
|
||||
void __stdcall ServiceMain(int argc, unsigned char* argv[] )
|
||||
{
|
||||
|
||||
hSrv = RegisterServiceCtrlHandler(conf.stringtable[1], (LPHANDLER_FUNCTION)CommandHandler);
|
||||
hSrv = RegisterServiceCtrlHandler((LPCSTR)conf.stringtable[1], (LPHANDLER_FUNCTION)CommandHandler);
|
||||
if( hSrv == 0 ) return;
|
||||
|
||||
SetStatus( SERVICE_START_PENDING, 0, 1 );
|
||||
@@ -394,7 +394,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
"By clicking Yes you confirm you read and accepted License Agreement.\n"
|
||||
"You can use Administration/Services to control %s service.",
|
||||
conf.stringtable[1], conf.stringtable[2]);
|
||||
if(MessageBox(NULL, (char *)tmpbuf, conf.stringtable[2], MB_YESNO|MB_ICONASTERISK) != IDYES) return 1;
|
||||
if(MessageBox(NULL, (LPCSTR)tmpbuf, (LPCSTR)conf.stringtable[2], MB_YESNO|MB_ICONASTERISK) != IDYES) return 1;
|
||||
|
||||
|
||||
*tmpbuf = '\"';
|
||||
@@ -415,7 +415,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
perror("Failed to open Service Manager");
|
||||
RETURN(101);
|
||||
}
|
||||
if (!(sch = CreateService(sch, conf.stringtable[1], conf.stringtable[2], GENERIC_EXECUTE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, (char *)tmpbuf, NULL, NULL, NULL, NULL, NULL))){
|
||||
if (!(sch = CreateService(sch, (LPCSTR)conf.stringtable[1], (LPCSTR)conf.stringtable[2], GENERIC_EXECUTE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, (char *)tmpbuf, NULL, NULL, NULL, NULL, NULL))){
|
||||
perror("Failed to create service");
|
||||
RETURN(103);
|
||||
}
|
||||
@@ -436,10 +436,10 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
RETURN(104);
|
||||
}
|
||||
if(RegSetValueEx( runsrv,
|
||||
conf.stringtable[1],
|
||||
(LPCSTR)conf.stringtable[1],
|
||||
0,
|
||||
REG_EXPAND_SZ,
|
||||
(char *)tmpbuf,
|
||||
(BYTE *)tmpbuf,
|
||||
(int)strlen((char *)tmpbuf)+1)!=ERROR_SUCCESS){
|
||||
perror("Failed to set registry value");
|
||||
RETURN(105);
|
||||
@@ -457,7 +457,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
perror("Failed to open Service Manager\n");
|
||||
RETURN(106);
|
||||
}
|
||||
if (!(sch = OpenService(sch, conf.stringtable[1], DELETE))){
|
||||
if (!(sch = OpenService(sch, (LPCSTR)conf.stringtable[1], DELETE))){
|
||||
perror("Failed to open service");
|
||||
RETURN(107);
|
||||
}
|
||||
@@ -476,7 +476,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
perror("Failed to open registry");
|
||||
RETURN(109);
|
||||
}
|
||||
if(RegDeleteValue(runsrv, conf.stringtable[1]) != ERROR_SUCCESS){
|
||||
if(RegDeleteValue(runsrv, (LPCSTR)conf.stringtable[1]) != ERROR_SUCCESS){
|
||||
perror("Failed to clear registry");
|
||||
RETURN(110);
|
||||
}
|
||||
@@ -528,7 +528,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
||||
if(service){
|
||||
SERVICE_TABLE_ENTRY ste[] =
|
||||
{
|
||||
{ conf.stringtable[1], (LPSERVICE_MAIN_FUNCTION)ServiceMain},
|
||||
{ (LPSTR)conf.stringtable[1], (LPSERVICE_MAIN_FUNCTION)ServiceMain},
|
||||
{ NULL, NULL }
|
||||
};
|
||||
if(!StartServiceCtrlDispatcher( ste ))cyclestep();
|
||||
|
||||
Reference in new issue
Block a user