From b02ad7a9d6e2b9e915bb95284db9293218e49db0 Mon Sep 17 00:00:00 2001 From: zeffy Date: Mon, 5 Jun 2017 15:30:45 -0700 Subject: [PATCH] minor fixes, build events --- wufuc/service.c | 5 ++--- wufuc/wufuc.vcxproj | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wufuc/service.c b/wufuc/service.c index e3d7ab2..543eb80 100644 --- a/wufuc/service.c +++ b/wufuc/service.c @@ -14,12 +14,11 @@ BOOL get_svcpath(SC_HANDLE hSCManager, LPCTSTR lpServiceName, LPTSTR lpBinaryPat QueryServiceConfig(hService, NULL, 0, &cbBytesNeeded); LPQUERY_SERVICE_CONFIG sc = malloc(cbBytesNeeded); BOOL result = QueryServiceConfig(hService, sc, cbBytesNeeded, &cbBytesNeeded); - int a = GetLastError(); CloseServiceHandle(hService); if (result) { _tcscpy_s(lpBinaryPathName, dwSize, sc->lpBinaryPathName); } - LocalFree(sc); + free(sc); return result; } @@ -87,6 +86,6 @@ BOOL get_svcgpid(SC_HANDLE hSCManager, LPTSTR lpServiceGroupName, DWORD *lpdwPro break; } } - LocalFree(pvData); + free(pvData); return result; } diff --git a/wufuc/wufuc.vcxproj b/wufuc/wufuc.vcxproj index fc92c11..42c9744 100644 --- a/wufuc/wufuc.vcxproj +++ b/wufuc/wufuc.vcxproj @@ -144,6 +144,9 @@ false Shlwapi.lib;%(AdditionalDependencies) + + copy /Y "$(TargetPath)" "$(SolutionDir)install\$(TargetFileName)" + @@ -163,6 +166,9 @@ false Shlwapi.lib;%(AdditionalDependencies) + + copy /Y "$(TargetPath)" "$(SolutionDir)install\$(TargetFileName)" +