本文整理匯總了VB.NET中System.Runtime.InteropServices.ExtensibleClassFactory類的典型用法代碼示例。如果您正苦於以下問題:VB.NET ExtensibleClassFactory類的具體用法?VB.NET ExtensibleClassFactory怎麽用?VB.NET ExtensibleClassFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ExtensibleClassFactory類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: CallBack
' 導入命名空間
Imports System.Runtime.InteropServices
Public Class CallBack
Public Function Activate(Aggregator As IntPtr) As IntPtr
Dim oCOM As New ECFSRV32Lib.ObjectActivator()
Dim itf As ECFSRV32Lib.IObjectActivator = _
CType(oCOM, ECFSRV32Lib.IObjectActivator)
Return New IntPtr(itf.CreateBaseComponent(Aggregator.ToInt32()))
End Function
End Class
'
' The EcfInner class. First .NET class derived directly from COM class.
'
Public Class EcfInner
Inherits ECFSRV32Lib.BaseComponent
Private Shared callbackInner As CallBack
Shared Sub RegisterInner()
callbackInner = New CallBack()
ExtensibleClassFactory.RegisterObjectCreationCallback( _
New System.Runtime.InteropServices.ObjectCreationDelegate( _
AddressOf callbackInner.Activate))
End Sub
'This is the static initializer.
Shared Sub New()
RegisterInner()
End Sub
End Class