IVsDataProvider.CreateObject<TSite> Method (Guid, Type, TSite)
Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider, sited with the specified site object.
Namespace: Microsoft.VisualStudio.Data.Core
Assembly: Microsoft.VisualStudio.Data.Core (in Microsoft.VisualStudio.Data.Core.dll)
Syntax
'Declaration
Function CreateObject(Of TSite) ( _
source As Guid, _
objType As Type, _
site As TSite _
) As Object
Object CreateObject<TSite>(
Guid source,
Type objType,
TSite site
)
generic<typename TSite>
Object^ CreateObject(
Guid source,
Type^ objType,
TSite site
)
abstract CreateObject :
source:Guid *
objType:Type *
site:'TSite -> Object
JScript does not support generic types or methods.
Type Parameters
- TSite
The site.
Parameters
source
Type: System.GuidAn identifier of a DDEX data source, or Empty for no specific data source.
objType
Type: System.TypeA type of DDEX support entity.
site
Type: TSiteAn instance of an object that should site the new DDEX support entity.
Return Value
Type: System.Object
An instance of the specified DDEX support entity that is implemented by the DDEX provider, sited with the specified site object.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The objType parameter is nulla null reference (Nothing in Visual Basic). |
DataProviderException | The DDEX provider does not support the support entity, or 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 method implementation, or creation of the default or client object implementation (if there is one) failed. |
Remarks
This method first delegates to the TryCreateObject(Guid, Type, TSite) method. If the result is nulla null reference (Nothing in Visual Basic), it throws a DataProviderException. Otherwise, the result is returned.
.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.