共用方式為


IVsProjectResources.GetResourceItem(UInt32, String, UInt32, UInt32) Method

Definition

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

public:
 int GetResourceItem(System::UInt32 itemidDocument, System::String ^ pszCulture, System::UInt32 grfPRF, [Runtime::InteropServices::Out] System::UInt32 % pitemidResource);
int GetResourceItem(unsigned int itemidDocument, std::wstring const & pszCulture, unsigned int grfPRF, [Runtime::InteropServices::Out] unsigned int & pitemidResource);
public int GetResourceItem (uint itemidDocument, string pszCulture, uint grfPRF, out uint pitemidResource);
abstract member GetResourceItem : uint32 * string * uint32 * uint32 -> int
Public Function GetResourceItem (itemidDocument As UInteger, pszCulture As String, grfPRF As UInteger, ByRef pitemidResource As UInteger) As Integer

Parameters

itemidDocument
UInt32

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

pszCulture
String

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

grfPRF
UInt32

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

pitemidResource
UInt32

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

Returns

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  
);  

Applies to