[Mplayer-cvslog] CVS: main/libdha/dhahelperwin dhasetup.c,1.2,1.3
Diego Biurrun CVS
syncmail at mplayerhq.hu
Fri Apr 2 00:48:39 CEST 2004
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/main/libdha/dhahelperwin
In directory mail:/var2/tmp/cvs-serv16578
Modified Files:
dhasetup.c
Log Message:
Error message improved, wording.
Index: dhasetup.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/dhahelperwin/dhasetup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dhasetup.c 23 Mar 2004 12:43:54 -0000 1.2
+++ dhasetup.c 1 Apr 2004 22:48:37 -0000 1.3
@@ -1,6 +1,6 @@
-/*dhahelper setup program (c) 2004 Sascha Sommer*/
-/*compile with gcc -o dhasetup.exe dhasetup.c */
-/*LICENSE: GPL */
+/* dhahelper setup program (c) 2004 Sascha Sommer */
+/* compile with gcc -o dhasetup.exe dhasetup.c */
+/* LICENSE: GPL */
#include <windows.h>
#include <stdio.h>
@@ -10,19 +10,20 @@
SC_HANDLE hService;
char path[MAX_PATH];
printf("dhasetup (c) 2004 Sascha Sommer\n");
+ GetWindowsDirectory(path,MAX_PATH);
+ strcpy(path+strlen(path),"\\system32\\drivers\\dhahelper.sys");
if(argc==1){
- printf("usage:\n");
- printf("dhasetup install - copys dhahelper.sys from the current dir to windows/system32/drivers and configures it to start at system start\n");
- printf("dhasetup remove - removes the dhahelper util\n");
+ printf("Usage:\n");
+ printf("dhasetup install - Copies dhahelper.sys from the current directory to\n%s and configures it to start at boot.\n", path);
+ printf("dhasetup remove - Removes the dhahelper utility.\n");
return 0;
}
hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
- GetWindowsDirectory(path,MAX_PATH);
- strcpy(path+strlen(path),"\\system32\\drivers\\dhahelper.sys");
if(!strcmp(argv[1],"install")){
- printf("installing dhahelper\n");
+ printf("Installing dhahelper...\n");
if(!CopyFile("dhahelper.sys",path,FALSE))
- printf("can't find dhahelper.sys\n");
+ printf("Copying dhahelper.sys failed.\nEither dhahelper.sys is not in the current directory or you lack sufficient\nprivileges to write to %s.", path);
+ return 1;
// Install the driver
hService = CreateService(hSCManager,
"DHAHELPER",
@@ -40,7 +41,7 @@
}
else if(!strcmp(argv[1],"remove")){
SERVICE_STATUS ServiceStatus;
- printf("removing dhahelper\n");
+ printf("Removing dhahelper...\n");
hService = OpenService(hSCManager, "DHAHELPER", SERVICE_ALL_ACCESS);
ControlService(hService, SERVICE_CONTROL_STOP, &ServiceStatus);
DeleteService(hService);
@@ -51,6 +52,6 @@
}
CloseServiceHandle(hService);
CloseServiceHandle(hSCManager);
- printf("please reboot to let the changes take effect\n");
+ printf("Please reboot to let the changes take effect.\n");
return 0;
}
More information about the MPlayer-cvslog
mailing list