Share via


IVsProjectResources.GetResourceItem Method

Gets a resource item and adds it to the project. Commonly used to add a culture-specific resource.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function GetResourceItem ( _
    itemidDocument As UInteger, _
    pszCulture As String, _
    grfPRF As UInteger, _
    <OutAttribute> ByRef pitemidResource As UInteger _
) As Integer
'Usage
Dim instance As IVsProjectResources 
Dim itemidDocument As UInteger 
Dim pszCulture As String 
Dim grfPRF As UInteger 
Dim pitemidResource As UInteger 
Dim returnValue As Integer 

returnValue = instance.GetResourceItem(itemidDocument, _
    pszCulture, grfPRF, pitemidResource)
int GetResourceItem(
    uint itemidDocument,
    string pszCulture,
    uint grfPRF,
    out uint pitemidResource
)
int GetResourceItem(
    [InAttribute] unsigned int itemidDocument, 
    [InAttribute] String^ pszCulture, 
    [InAttribute] unsigned int grfPRF, 
    [OutAttribute] unsigned int% pitemidResource
)
function GetResourceItem(
    itemidDocument : uint, 
    pszCulture : String, 
    grfPRF : uint, 
    pitemidResource : uint
) : int

Parameters

  • itemidDocument
    Type: System.UInt32

    [in] The VSITEMID of the document to add the resource to.

  • pszCulture
    Type: System.String

    [in] String containing the culture designation. For more information about culture, see CultureInfo.

  • grfPRF
    Type: System.UInt32

    [in] Integer. A value from the __VSPROJRESFLAGS enumeration.

  • pitemidResource
    Type: System.UInt32%

    [out] Pointer to the VSITEMID of the resource added to the document.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

[C++]

HRESULT IVsProjectResources::GetResourceItem(
   [in] VSITEMID itemidDocument, 
   [in] LPCOLESTR pszCulture, 
   [in] VSPROJRESFLAGS grfPRF, 
   [out, retval] VSITEMID* pitemidResource
);

.NET Framework Security

See Also

Reference

IVsProjectResources Interface

IVsProjectResources Members

Microsoft.VisualStudio.Shell.Interop Namespace