C# integration in Clarion with OLE and COM dll

561 views Asked by At

I've written a small test COM dll in c# and registered it. I would like to call this from Clarion.

So far in clarion I have the following code

?OLE{PROP:Create} = 'test.test_COM'
oc:MicData = ?OLE{ 'SayHello("myname")' }

The problem I'm having is there is a class testClass_COM and the function SayHello actually lies in the class. How can I access the function or create an object in clarion with the class testClass_COM and access the function that way.

Thanks in advance for any help

1

There are 1 answers

0
ProgrammerV5 On

The code you show says that the class is called test_COM but then you say the class is called testClass_COM:

?OLE{PROP:Create} = 'test.testClass_COM'
oc:MicData = ?OLE{ 'SayHello("myname")' }

anyway I will enable errors like this to get more details on what is going on:

?OLE{PROP:Create} = 'test.testClass_COM'
?Ole{PROP:ReportException} = true
oc:MicData = ?OLE{ 'SayHello("myname")' }