IWDFDriver::RetrieveVersionString method

The RetrieveVersionString method retrieves the version of the framework.

Syntax


HRESULT RetrieveVersionString(
  [out]     PWSTR pVersion,
  [in, out] DWORD *pdwVersionLength
);

Parameters

pVersion [out]

A pointer to a buffer that receives a NULL-terminated string that represents the version of the framework if the supplied buffer is non-NULL and RetrieveVersionString is successful.

pdwVersionLength [in, out]

A pointer to a variable that receives the size, in characters, of the version string that pVersion points to. On input, this variable contains the size, in bytes, of the buffer at pVersion.

If the buffer at pVersion is NULL, the value that the driver supplies is zero. The framework then returns the size, in characters, that is required for the version string.

If the buffer at pVersion is non-NULL, the framework returns the size, in characters, of the version string.

Return value

RetrieveVersionString returns S_OK for the following scenarios:

  • The buffer that the pVersion parameter points to was non-NULL and large enough to hold the version string, including the NULL character. In addition, the framework successfully copied the string into the supplied buffer and set the variable that is pointed to by the pdwVersionLength parameter to the number of characters in the string.

  • The buffer at pVersion was NULL, the driver preset the variable at pdwVersionLength to 0, and the framework set the variable at pdwVersionLength to the number of characters that are required for the string.

RetrieveVersionString returns HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) to indicate that the supplied buffer is non-NULL and did not contain enough space to hold the version. The framework sets the variable at pdwVersionLength to the number of characters that are required for the string.

RetrieveVersionString might also return other HRESULT values.

Requirements

Target platform

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.5

Header

Wudfddi.h (include Wudfddi.h)

DLL

WUDFx.dll

 

 

Send comments about this topic to Microsoft

Show: