IBuilderWizardManager.MapObjectToBuilderCLSID Method
Returns the CLSID of a builder for an OLE object given the object's CLSID.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣言
Function MapObjectToBuilderCLSID ( _
ByRef rclsidObject As Guid, _
dwPromptOpt As UInteger, _
hwndPromptOwner As IntPtr, _
<OutAttribute> ByRef pclsidBuilder As Guid _
) As Integer
'使用
Dim instance As IBuilderWizardManager
Dim rclsidObject As Guid
Dim dwPromptOpt As UInteger
Dim hwndPromptOwner As IntPtr
Dim pclsidBuilder As Guid
Dim returnValue As Integer
returnValue = instance.MapObjectToBuilderCLSID(rclsidObject, _
dwPromptOpt, hwndPromptOwner, pclsidBuilder)
int MapObjectToBuilderCLSID(
ref Guid rclsidObject,
uint dwPromptOpt,
IntPtr hwndPromptOwner,
out Guid pclsidBuilder
)
int MapObjectToBuilderCLSID(
[InAttribute] Guid% rclsidObject,
[InAttribute] unsigned int dwPromptOpt,
[InAttribute] IntPtr hwndPromptOwner,
[OutAttribute] Guid% pclsidBuilder
)
function MapObjectToBuilderCLSID(
rclsidObject : Guid,
dwPromptOpt : uint,
hwndPromptOwner : IntPtr,
pclsidBuilder : Guid
) : int
Parameters
rclsidObject
Type: System.Guid%[in] CLSID of the object
dwPromptOpt
Type: System.UInt32[in] Bit flags controlling whether there is a user prompt to choose the builder. Values are taken from the BLDPROMPTOPT enumeration.
hwndPromptOwner
Type: System.IntPtr[in] Owner HWND for all dialogs and windows. May be NULL. If NULL, IBuilderWizardManager uses the HWND for the application frame window.
注意
This method may bring up a modal dialog asking the user to choose the builder to use.
pclsidBuilder
Type: System.Guid%[out] The CLSID of a specific builder.
Return Value
Type: System.Int32
S_OK if the CLSID maps to a builder.
S_FALSE if there is no builder for the CLSID.
Remarks
The caller can control whether there is a user prompt to choose among multiple available builders for a particular CATID. If there is to be no prompt and there is more than one builder available, then IBuilderWizardManager picks a default builder.
A container calls this method when inserting a control to discover if there is a control builder to run. If so, the container calls GetBuilder to get the builder.
The builder manager’s implementation of MapObjectToBuilderCLSID may have private knowledge of how to do the mapping for special CLSIDs or it may use a general mechanism that looks in the registry.
This method always returns the CLSID of a particular builder.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.