Export (0) Print
Expand All

MAKEDLLVERULL macro

Used to pack DLL version information into a ULONGLONG value.

Syntax


ULONGLONG MAKEDLLVERULL(
  WORD wMajorVersion,
  WORD wMinorVersion,
  WORD wBuild,
  WORD wSP
);

Parameters

wMajorVersion

The major version number.

wMinorVersion

The minor version number.

wBuild

The build number.

wSP

The hotfix number that identifies the service pack.

Return value

Returns the version information packed into a ULONGLONG value.

Remarks

This macro is used in conjunction with DllGetVersion to pack version information into a form that can easily be compared to the ullVersion member of a DLLVERSIONINFO2 structure. It is defined as follows.


#define MAKEDLLVERULL(major, minor, build, sp) \
        (((ULONGLONG)(major) << 48) | \
         ((ULONGLONG)(minor) << 32) | \
         ((ULONGLONG)(build) << 16) | \
         ((ULONGLONG)(   sp) <<  0))


For most purposes, you only need to assign values to the major and minor version numbers. The remaining two parameters can be set to zero. The following code fragment illustrates how to use MAKEDLLVERULL to determine whether a DLL is version 4.71 or later. The VersionInfo structure is the DLLVERSIONINFO2 structure returned by DllGetVersion.


if(VersionInfo.ullVersion >= MAKEDLLVERULL(4, 71, 0, 0))
{
    ...
}


Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft