IAPI::FileVersion

property FileVersion.

Returns the version number of a specified file (typically an exe or dll)

 

HRESULT FileVersion(
  BSTR FileName,
  BSTR * pVal
);

Parameters

FileName

[in] .   Fullpath filename

pVal

[out, retval]

The returned value is string of the file version number or NULL.

(if not NULL, the string must be freed by FreeBSTR)

 

The FileVersion works only on the provided fullpath filename string.

It doesn’t attempt to resolve the filename, nor does it check for the existence of the specified filename.

Return Values

S_OK

The operation was successfull.

E_POINTER

A NULL pointer was supplied as an argument.

E_UNEXPECTED

An unexpected error occoured.

See Also

IAPI