Compartir a través de


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
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
)
abstract GetResourceItem : 
        itemidDocument:uint32 * 
        pszCulture:string * 
        grfPRF:uint32 * 
        pitemidResource:uint32 byref -> int
function GetResourceItem(
    itemidDocument : uint, 
    pszCulture : String, 
    grfPRF : uint, 
    pitemidResource : uint
) : int

Parameters

  • itemidDocument
    Type: UInt32

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

  • pszCulture
    Type: String

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

  • grfPRF
    Type: UInt32

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

  • pitemidResource
    Type: UInt32%

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

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace