IVsDataConnectionFactory.MakeConnectionFrom Method
Initializes a new instance of the IVsDataConnection class for the specified provider from an existing underlying provider object.
Namespace: Microsoft.VisualStudio.Data.Services
Assembly: Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)
Syntax
'宣言
Function MakeConnectionFrom ( _
provider As Guid, _
providerObj As Object _
) As IVsDataConnection
'使用
Dim instance As IVsDataConnectionFactory
Dim provider As Guid
Dim providerObj As Object
Dim returnValue As IVsDataConnection
returnValue = instance.MakeConnectionFrom(provider, _
providerObj)
IVsDataConnection MakeConnectionFrom(
Guid provider,
Object providerObj
)
IVsDataConnection^ MakeConnectionFrom(
Guid provider,
Object^ providerObj
)
function MakeConnectionFrom(
provider : Guid,
providerObj : Object
) : IVsDataConnection
Parameters
provider
Type: System.GuidThe unique identifier of a DDEX provider.
providerObj
Type: System.ObjectAn existing underlying provider object.
Return Value
Type: Microsoft.VisualStudio.Data.Services.IVsDataConnection
A IVsDataConnection object representing a data connection.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The providerObj parameter is a null reference (Nothing in Visual Basic). |
ArgumentException | The provider is not a registered DDEX provider. |
Remarks
Other exceptions that occur indicate a provider-specific error during attachment of the provider connection object.
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.
See Also
Reference
IVsDataConnectionFactory Interface
IVsDataConnectionFactory Members