다음을 통해 공유


IVsProjectSpecialFiles.GetFile Method

Retrieves the item identifier, name, and path of a special project file.

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

Syntax

‘선언
Function GetFile ( _
    fileID As Integer, _
    grfFlags As UInteger, _
    <OutAttribute> ByRef pitemid As UInteger, _
    <OutAttribute> ByRef pbstrFilename As String _
) As Integer
‘사용 방법
Dim instance As IVsProjectSpecialFiles
Dim fileID As Integer
Dim grfFlags As UInteger
Dim pitemid As UInteger
Dim pbstrFilename As String
Dim returnValue As Integer

returnValue = instance.GetFile(fileID, _
    grfFlags, pitemid, pbstrFilename)
int GetFile(
    int fileID,
    uint grfFlags,
    out uint pitemid,
    out string pbstrFilename
)
int GetFile(
    [InAttribute] int fileID, 
    [InAttribute] unsigned int grfFlags, 
    [OutAttribute] unsigned int% pitemid, 
    [OutAttribute] String^% pbstrFilename
)
abstract GetFile : 
        fileID:int * 
        grfFlags:uint32 * 
        pitemid:uint32 byref * 
        pbstrFilename:string byref -> int 
function GetFile(
    fileID : int, 
    grfFlags : uint, 
    pitemid : uint, 
    pbstrFilename : String
) : int

Parameters

  • grfFlags
    Type: System.UInt32
    [in] Bit flags indicating whether or not to create the file, or whether the full path has been provided. A value from the __PSFFLAGS enumeration.
  • pitemid
    Type: System.UInt32%
    [out] Pointer to the VSITEMID of the special file.
  • pbstrFilename
    Type: System.String%
    [out] Pointer to a string containing the name of the file and, optionally, the full path.

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 IVsProjectSpecialFiles::GetFile(
   [in] PSFFILEID fileID, 
   [in] PSFFLAGS grfFlags, 
   [out] VSITEMID* pitemid, 
   [out] BSTR* pbstrFilename
);

.NET Framework Security

See Also

Reference

IVsProjectSpecialFiles Interface

IVsProjectSpecialFiles Members

Microsoft.VisualStudio.Shell.Interop Namespace