VB and Clarion Dlls
VB and Clarion Dlls
(OP)
Is it possible to access clarion dll's from a
VB application?
I've tried to register the dll with regsvr32.exe
but it cannot find the DllRegisterServer entrypoint.
When I try to create an entrypoint, clarion creates
it as DllRegisterServer@F, which regsvr32.exe
doesn't pick up as well.
VB application?
I've tried to register the dll with regsvr32.exe
but it cannot find the DllRegisterServer entrypoint.
When I try to create an entrypoint, clarion creates
it as DllRegisterServer@F, which regsvr32.exe
doesn't pick up as well.
RE: VB and Clarion Dlls
RE: VB and Clarion Dlls
It is possible to do this and it is also quite easy.
Declare a function in your clarion App like that :
MyFunc(Long MyStringAddress,Long MyLong),Long,Pascal,Name('MYFUNC')
In VB the code to use it is :
Public Declare Function MYFUNC Lib "ClarionDLL" (ByVal MyStringAddress As String, ByVal MyLong As Long) As Long
You need to pass the address of a string, but you can pass directly a long.
In Clarion to get a string from its address use the window APi lstrcpy
lstrcpy(address(MyString),MyStringAddress)
the same in VB.
The easiest is to use only long for parameters / return values.
No ActiveX or DLL registration... etc. Just be carefull with the paths.
I have an example APp if you want.
Valery.