From: Rolf K. <lab...@us...> - 2007-11-20 14:35:29
|
Update of /cvsroot/opengtoolkit/portIO/c_source In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27955 Modified Files: ogportiodll.c Log Message: Index: ogportiodll.c =================================================================== RCS file: /cvsroot/opengtoolkit/portIO/c_source/ogportiodll.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ogportiodll.c 15 Nov 2007 09:12:57 -0000 1.5 --- ogportiodll.c 20 Nov 2007 14:35:26 -0000 1.6 *************** *** 92,100 **** --- 92,104 ---- case ERROR_INVALID_NAME: /* The specified service name is invalid */ + CloseServiceHandle(hSCManager); return err; case ERROR_SERVICE_DOES_NOT_EXIST: err = InstallPortIODriver(hSCManager, autostart); if (err) + { + CloseServiceHandle(hSCManager); return err; + } } } *************** *** 186,190 **** } ! /* Close Handle to Service Control Manager */ CloseServiceHandle(hService); return err; --- 190,194 ---- } ! /* Close Handle to Service */ CloseServiceHandle(hService); return err; *************** *** 208,212 **** SC_MANAGER_ALL_ACCESS); // access required ! /* Open Handle to PortTalk Service Database */ hService = OpenService (hSCManager, "OGPortIO", --- 212,221 ---- SC_MANAGER_ALL_ACCESS); // access required ! if (hSCManager == NULL) ! { ! return GetLastError(); ! } ! ! /* Open Handle to Port IO Service */ hService = OpenService (hSCManager, "OGPortIO", *************** *** 216,219 **** --- 225,229 ---- { /* Seems not installed at all */ + CloseServiceHandle(hSCManager); return ERROR_SERVICE_DOES_NOT_EXIST; } |