IVsDataProvider.TryCreateObject Method (Guid, Type)
Tries to create an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.
Namespace: Microsoft.VisualStudio.Data.Core
Assembly: Microsoft.VisualStudio.Data.Core (in Microsoft.VisualStudio.Data.Core.dll)
Syntax
'Declaration
Function TryCreateObject ( _
source As Guid, _
objType As Type _
) As Object
Object TryCreateObject(
Guid source,
Type objType
)
Object^ TryCreateObject(
Guid source,
Type^ objType
)
abstract TryCreateObject :
source:Guid *
objType:Type -> Object
function TryCreateObject(
source : Guid,
objType : Type
) : Object
Parameters
- source
Type: System.Guid
A DDEX data source identifier, or Empty for no specific data source.
- objType
Type: System.Type
A type of DDEX support entity.
Return Value
Type: System.Object
An instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider, if the DDEX provider supports it; otherwise, nulla null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Instantiation of a new instance of the support entity threw an exception, whether by way of a CreateInstance call through reflection or through the DDEX provider’s CreateObject or CreateObject method implementation, or creation of the default or client object implementation (if there is one) failed. |
Remarks
This method delegates to the TryCreateObject method, passing Object as the TSite generic parameter value and nulla null reference (Nothing in Visual Basic) as the site parameter.
.NET Framework Security
- 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.