NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ObjectCreationDelegate Delegate

Creates a COM object.

[Visual Basic]
Public Delegate Sub ObjectCreationDelegate( _
   ByVal aggregator As Integer _
) As Integer
[C#]
public delegate int ObjectCreationDelegate(
   int aggregator
);
[C++]
public __gc __delegate int ObjectCreationDelegate(
   int aggregator
);

[JScript] In JScript, you can use the delegates in the NGWS frameworks, but you cannot define your own.

Parameters [Visual Basic, C#, C++]

The declaration of your event-handling method must have the same parameters as the ObjectCreationDelegate delegate declaration.

Remarks

This delegate is called to create a COM object as an alternative to CoCreateInstance when a managed object wishes to instantiate its unmanaged portion. The IUnknown of the managed object (the aggregator) is passed as a parameter and the delegate should return the IUnknown of the unmanaged object (the aggregatee). Both are passed as ints to avoid any marshaling.

Every subclass of Delegate and MulticastDelegate has a constructor and an Invoke method.

Requirements

Namespace: System.Runtime.InteropServices

Assembly: mscorlib.dll

See Also

System.Runtime.InteropServices Namespace