32–Bit Windows® DLLs
The following 32–bit Windows® DLLs include information that
you can use to determine the version of the DLL:
- E32APPC.DLL
- WAPPC32.DLL
- WCPIC32.DLL
- WINCSV32.DLL
- WINMS32.DLL
- WINNOF32.DLL
- WINRUI32.DLL
- WINSLI32.DLL
The available keys are:
- CompanyName
- LegalCopyright
- LegalTrademarks
- ProductName
- ProductVersion
- FileDescription
- InternalName
- FileVersion
Note:
All keys are a part of the "\StringFileInfo\040904E4\"
version block, and are not translated.
You can retrieve the information by using a program, or by using Windows® Explorer
as follows:
- Select the DLL with the right mouse button
- Select Properties from the pop-up menu
- Select the Version tab.
Using this information, you can write code to determine whether a DLL came from IBM® or another company (CompanyName), and whether the DLL is for the SNA API Client or the server (ProductName). You can determine which version of the DLL is installed (FileVersion), and which version of the product is installed (ProductVersion).
The following sample C function determines if the named DLL was produced by IBM®:
//
// Function returns TRUE if and only if given pathname is a versioned IBM DLL
//
#include <winver.h>
#define CMPNY_KEY "\\StringFileInfo\\040904E4\\CompanyName"
BOOL bDllFromIBM(char *pcDllPathname)
{
DWORD dwBufSize = 0, dwTemp = 0, dwReturnBytes = 0;
LPVOID pReturnBuffer = NULL;
VOID *pVInfoBuffer = NULL;
BOOL bRC = FALSE;
// verify parameters aren't null
if (!pcDllPathname || !*pcDllPathname)
return FALSE;
// get size of Version Info
dwBufSize = GetFileVersionInfoSize(pcDllPathname, &dwTemp);
// no version info implies bad parameters or not versioned IBM DLL
if (!dwBufSize)
return FALSE;
// allocate a buffer for the version information (+50 for safety)
pVInfoBuffer = malloc(dwBufSize + 50);
// malloc failure
if (!pVInfoBuffer)
return FALSE;
// get version buffer filled
bRC = GetFileVersionInfo(pcDllName,dwTemp,dwBufSize,pVInfoBuffer);
// call failed
if (!bRC)
return FALSE;
// get the company name
bRC = VerQueryValue(pVInfoBuffer, TEXT(CMPNY_KEY), ReturnBuffer, ReturnBytes);
// not found or empty
if (!bRC || !dwReturnBytes)
return FALSE;
// value should begin with "IBM"
if (strncmp(pReturnBuffer, "IBM", strlen("IBM")) == 0)
return TRUE;
return FALSE;
}