feature: Add logic for reading loaded library's version

getLoadedLibVersion is intended for reading version of a library that was
already loaded into the process prior to this call (i.e. new instance of
the library willnot be loaded).
Note: Currently, only windows version of this functionality is implemented.
Related-To: GSD-10248

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
Chodor, Jaroslaw
2024-12-19 16:56:46 +00:00
committed by Compute-Runtime-Automation
parent db3f268a97
commit dd3d5c6460
11 changed files with 477 additions and 6 deletions

View File

@@ -180,5 +180,22 @@ BOOL heapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem) {
SIZE_T virtualQuery(LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength) {
return VirtualQuery(lpAddress, lpBuffer, dwLength);
}
BOOL getModuleHandleExW(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE *phModule) {
return ::GetModuleHandleExW(dwFlags, lpModuleName, phModule);
}
DWORD getModuleFileNameW(HMODULE hModule, LPWSTR lpFilename, DWORD nSize) {
return ::GetModuleFileNameW(hModule, lpFilename, nSize);
}
DWORD getFileVersionInfoSizeW(LPCWSTR lptstrFilename, LPDWORD lpdwHandle) {
return ::GetFileVersionInfoSizeW(lptstrFilename, lpdwHandle);
}
BOOL getFileVersionInfoW(LPCWSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData) {
return ::GetFileVersionInfoW(lptstrFilename, dwHandle, dwLen, lpData);
}
BOOL verQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lpBuffer, PUINT puLen) {
return ::VerQueryValueW(pBlock, lpSubBlock, lpBuffer, puLen);
}
} // namespace SysCalls
} // namespace NEO