minor fixes, build events
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -144,6 +144,9 @@
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(TargetPath)" "$(SolutionDir)install\$(TargetFileName)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -163,6 +166,9 @@
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(TargetPath)" "$(SolutionDir)install\$(TargetFileName)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="core.c" />
|
||||
|
Reference in New Issue
Block a user