共用方式為


IVsExternalFilesManager2 Interface

Definition

Implemented by the environment to handle the Miscellaneous Files project.

public interface class IVsExternalFilesManager2 : Microsoft::VisualStudio::Shell::Interop::IVsExternalFilesManager
public interface class IVsExternalFilesManager2 : Microsoft::VisualStudio::Shell::Interop::IVsExternalFilesManager
__interface IVsExternalFilesManager2 : Microsoft::VisualStudio::Shell::Interop::IVsExternalFilesManager
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("999B1784-A1EE-42EB-B4B6-E928008FFB5D")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsExternalFilesManager2 : Microsoft.VisualStudio.Shell.Interop.IVsExternalFilesManager
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("999B1784-A1EE-42EB-B4B6-E928008FFB5D")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsExternalFilesManager2 : Microsoft.VisualStudio.Shell.Interop.IVsExternalFilesManager
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("999B1784-A1EE-42EB-B4B6-E928008FFB5D")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsExternalFilesManager2 = interface
    interface IVsExternalFilesManager
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("999B1784-A1EE-42EB-B4B6-E928008FFB5D")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsExternalFilesManager2 = interface
    interface IVsExternalFilesManager
Public Interface IVsExternalFilesManager2
Implements IVsExternalFilesManager
Attributes
Implements

Remarks

Call this function when your project system needs to handle external files. HierUtil7 is a class library that implements many of the elements needed in a custom project. The files vsdoc.cpp and hu_util.cpp, found in <envsdk>\common\HierUtil7 folder, show implementations of IVsExternalFilesManger2. Additionally, Saving a Standard Document shows how to change a file's ownership to the Miscellaneous Files project.

To access this interface, call Query Service on SVsExternalFilesManager Service1F88C1E9-3336-4C6D-963E-EA71B2379B46 and pass in a value of IID_IVsExternalFilesManager.

Notes to Implementers

IVsExternalFilesManager2 is implemented by the Miscellaneous Files (External Files) project. For example, to handle files from "directory-based" project systems, the environment hands an open file to the Miscellaneous Files project after a Save As operation saves the file outside of the original directory of the project.

To access this interface, call Query Service on SVsExternalFilesManager Service and pass in a value of IID_IVsExternalFilesManager.


The Miscellaneous Files project is listed in Solution Explorer. By default, the node is not visible. To make it visible, select Options on the Tools menu. In the Options dialog box, open the Environment folder and choose Documents. On the Documents tab, select the Show Miscellaneous files in Solution Explorer

Notes to Callers

IVsExternalFilesManager2 is implemented by the Miscellaneous Files (External Files) project. For example, to handle files from "directory-based" project systems, the environment hands an open file to the Miscellaneous Files project after a Save As operation saves the file outside of the original directory of the project.

Methods

AddDocument(UInt32, String, IntPtr, IntPtr, Guid, String, Guid, String, String, Int32, IVsWindowFrame)

Programmatically tells the Miscellaneous Files project to add a node.

AddDocumentEx(UInt32, String, IntPtr, IntPtr, Guid, String, Guid, String, String, IServiceProvider, IntPtr, Int32, IVsWindowFrame)

Programmatically informs the Miscellaneous Files project to add a node, allows control over the icon for the node, and provides an opportunity for the editor to query for contextual services.

GetExternalFilesProject(IVsProject)

Instantiates the Miscellaneous Files (External Files) project and returns a pointer to it.

IsVisible(Int32)

Determines whether the Miscellaneous Files node is visible in Solution Explorer.

TransferDocument(String, String, IVsWindowFrame)

Transfers a document to the Miscellaneous Files project.

Applies to