Help Center

DVARIANT.PutResourcemethod

Initializes the DVARIANT based on a string resource imbedded in an executable file.

COMmethodDVARIANT.INCdocumented

Syntax

FUNCTION PutResource (BYVAL hinst AS HINSTANCE, BYVAL id AS UINT) AS HRESULT

Parameters

NameDescription
hinstThe instance handle.
idInteger identifier of the string to be loaded.

Return value

If this function succeeds, it returns S_OK (0). Otherwise, it returns an HRESULT error code.

Description

Initializes the DVARIANT based on a string resource imbedded in an executable file.

Remarks

Creates a VT_BSTR variant. If the resource does not exist, this function initializes the VARIANT as VT_EMPTY and returns a failure code.

Reference

  • Include file DVARIANT.INC
  • Defined in AfxNova/DVARIANT.inc:1303
  • Documented in COM/DVARIANT Class.md
  • Topic: DVARIANT Class