Aracılığıyla paylaş


GetRequestedRuntimeVersionForCLSID Function

Gets the appropriate common language runtime (CLR) version information for the class with the specified CLSID.

This function has been deprecated in the .NET Framework version 4.

HRESULT GetRequestedRuntimeVersionForCLSID (
    [in]  REFCLSID   rclsid, 
    [in]  LPWSTR     pVersion, 
    [in]  DWORD      cchBuffer, 
    [out] DWORD*     dwLength, 
    [in]  CLSID_RESOLUTION_FLAGS dwResolutionFlags
);

Parameters

  • rclsid
    [in] The CLSID of the component.

  • pVersion
    [in] A pointer to a wide character string containing the returned runtime version information.

  • cchBuffer
    [in] The size, in wide characters, of the pVersion buffer.

  • dwLength
    [out] The length, in bytes, of the returned buffer.

  • dwResolutionFlags
    [in] One of the CLSID_RESOLUTION_FLAGS values. The following values are supported:

    • CLSID_RESOLUTION_DEFAULT: (0x0) Specifies that default interop behavior should be used.

    • CLSID_RESOLUTION_REGISTERED: (0x1) Specifies that the registry should be searched and shim policy should be applied.

Return Value

HRESULT

Description

S_OK

The function returned successfully.

E_INVALIDARG

One of the parameters has an invalid type or format.

ERROR_INSUFFICIENT_BUFFER

The pVersion buffer is not large enough to hold the entire version string.

REGDB_E_CLASSNOTREG

There is no class registered with the specified CLSID.

Requirements

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1

See Also

Other Resources

.NET Framework 1.1 and 2.0 Hosting Global Static Functions