mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
700 B
31 lines
700 B
// File: pfnver.cpp
|
|
|
|
#include "precomp.h"
|
|
#include "pfnver.h"
|
|
|
|
#ifdef DEBUG
|
|
|
|
HINSTANCE DLLVER::m_hInstance = NULL;
|
|
|
|
PFN_GETVERINFOSIZE DLLVER::GetFileVersionInfoSize = NULL;
|
|
PFN_GETVERINFO DLLVER::GetFileVersionInfo = NULL;
|
|
PFN_VERQUERYVAL DLLVER::VerQueryValue = NULL;
|
|
|
|
#define DLLVER_APIFCN_ENTRY(pfn) {(PVOID *) &DLLVER::##pfn, #pfn}
|
|
|
|
APIFCN s_apiFcnDllVer[] = {
|
|
DLLVER_APIFCN_ENTRY(GetFileVersionInfoSize),
|
|
DLLVER_APIFCN_ENTRY(GetFileVersionInfo),
|
|
DLLVER_APIFCN_ENTRY(VerQueryValue),
|
|
};
|
|
|
|
HRESULT DLLVER::Init(void)
|
|
{
|
|
if (NULL != m_hInstance)
|
|
return S_OK;
|
|
|
|
return HrInitLpfn(s_apiFcnDllVer, ARRAY_ELEMENTS(s_apiFcnDllVer), &m_hInstance, TEXT("VERSION.dll"));
|
|
}
|
|
|
|
#endif /* DEBUG */
|
|
|