共用方式為


IVsDataProvider.CreateObject Method

Definition

Overloads

CreateObject(Type)

Creates an instance of the specified DDEX support entity that is implemented by the DDEX provider.

CreateObject(Guid, Type)

Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

CreateObject<TObject,TSite>(Guid, 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.

CreateObject<TObject>()

Creates an instance of the specified DDEX support entity that is implemented by the DDEX provider.

CreateObject<TObject>(Guid)

Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

CreateObject<TSite>(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.

CreateObject(Type)

Creates an instance of the specified DDEX support entity that is implemented by the DDEX provider.

public:
 System::Object ^ CreateObject(Type ^ objType);
public object CreateObject (Type objType);
abstract member CreateObject : Type -> obj
Public Function CreateObject (objType As Type) As Object

Parameters

objType
Type

A type of DDEX support entity.

Returns

An instance of the specified DDEX support entity that is implemented by the DDEX provider.

Exceptions

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to

CreateObject(Guid, Type)

Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

public:
 System::Object ^ CreateObject(Guid source, Type ^ objType);
public object CreateObject (Guid source, Type objType);
abstract member CreateObject : Guid * Type -> obj
Public Function CreateObject (source As Guid, objType As Type) As Object

Parameters

source
Guid

An identifier of a DDEX data source, or Empty for no specific data source.

objType
Type

A type of DDEX support entity.

Returns

An instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

Exceptions

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to

CreateObject<TObject,TSite>(Guid, 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.

public:
generic <typename TObject, typename TSite>
 TObject CreateObject(Guid source, TSite site);
public TObject CreateObject<TObject,TSite> (Guid source, TSite site);
abstract member CreateObject : Guid * 'Site -> 'Object
Public Function CreateObject(Of TObject, TSite) (source As Guid, site As TSite) As TObject

Type Parameters

TObject

The object.

TSite

The site.

Parameters

source
Guid

An identifier of a DDEX data source, or Empty for no specific data source.

site
TSite

An instance of an object that should site the new DDEX support entity.

Returns

TObject

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.

Exceptions

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to

CreateObject<TObject>()

Creates an instance of the specified DDEX support entity that is implemented by the DDEX provider.

public:
generic <typename TObject>
 TObject CreateObject();
public TObject CreateObject<TObject> ();
abstract member CreateObject : unit -> 'Object
Public Function CreateObject(Of TObject) () As TObject

Type Parameters

TObject

The object.

Returns

TObject

An instance of the specified DDEX support entity that is implemented by the DDEX provider.

Exceptions

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to

CreateObject<TObject>(Guid)

Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

public:
generic <typename TObject>
 TObject CreateObject(Guid source);
public TObject CreateObject<TObject> (Guid source);
abstract member CreateObject : Guid -> 'Object
Public Function CreateObject(Of TObject) (source As Guid) As TObject

Type Parameters

TObject

The object.

Parameters

source
Guid

An identifier of a DDEX data source, or Empty for no specific data source.

Returns

TObject

An instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

Exceptions

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to

CreateObject<TSite>(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.

public:
generic <typename TSite>
 System::Object ^ CreateObject(Guid source, Type ^ objType, TSite site);
public object CreateObject<TSite> (Guid source, Type objType, TSite site);
abstract member CreateObject : Guid * Type * 'Site -> obj
Public Function CreateObject(Of TSite) (source As Guid, objType As Type, site As TSite) As Object

Type Parameters

TSite

The site.

Parameters

source
Guid

An identifier of a DDEX data source, or Empty for no specific data source.

objType
Type

A type of DDEX support entity.

site
TSite

An instance of an object that should site the new DDEX support entity.

Returns

An instance of the specified DDEX support entity that is implemented by the DDEX provider, sited with the specified site object.

Exceptions

The objType parameter is null.

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(Type) method implementation, or creation of the default or client object implementation (if there is one) failed.

Applies to