I'm trying to Invoke third party code in my application, I have been able to do this with if the third party assembly is com registered with createobject the first sub will return a user control the second will run a function called Execute like so:
So, the above will allow me to run third party code in my application, provided the assembly is com registered.Code:Public Sub CreateUserControl(ByVal ProjectName As String, ByVal ClassName As String) 'Create a com visible user control Dim objUserControl As Object objUserControl = CreateObject(ProjectName & "." & ClassName) Dim user As New UserControl user = objUserControl End Sub Public Sub InvokeUserDefinedCode(ByVal ProjectName As String, ByVal ClassName As String) 'Run user defined code - com visible Dim objUserDefinedInstance As Object objUserDefinedInstance = CreateObject(ProjectName & "." & ClassName) objUserDefinedInstance.Execute() End Sub
My question is, I would like some of the objects in my application (such as variables and thier values) to be visible for the third party code to access
is this called an API? if anyone could point me in the right direction links or examples or anything that will be most helpful
Thanks in advance
enex


Reply With Quote