Dear Paul
Greetings I have a question, perhaps, very fundamental, hence I am asking here for quick help. I have just searched in our FTN95 forum, but not able to spot of this kind of question's discussion.
I want to import the externally available DLL reference into my .f95 code. In this, I want to create (or instantiate) an object referring to the DLL (exported function object) in .f95 code and then use the published function out of the DLL through the instantiate object handle in .f95.
Let me give an example here.
Assume the external DLL is MyComponent.dll and it has a function SquareIt()
Its code looks like this, it a activex DLL developed in VB, called Mycomponent.dll
Option Explicit
Public Function SquareIt(lngNumber As Long)
SquareIt = lngNumber ^ 2
End Function
So this function is developed in project 'MyComponent' and class module name is MyClass. So, the MyClass has this function SquareIt() as above.
Now, let me show the Main program code, which import the reference to MyComponent.dll
Public Sub ma()
'begin procedure
'create a object reference to the component
Dim obj As MyComponent.MyClass
Dim lngArgument As Long
Dim lngResult As Long
'create an instance of the object
Set obj = New MyClass
lngArgument = 2
'call the objects SquareIt method
lngResult = obj.SquareIt(lngArgument)
MsgBox 'The Square of ' & lngArgument & _
' is ' & lngResult
'end procedure
End Sub
For explanation, I use the VB6 code here as above. If you notice the codelines in the above code, An object 'obj' is created from MyComponent.MyClass, then the object instance is created using 'Set obj..', which allocates the memory instance as well here. Further, the SquareIt is called as given in the next line
lngResult = obj.SquareIt(lngArgument)
The covenience to the programmer is that when i type 'obj.' then the published functions will be displayed in our IDE editor, which is one important.
How to do this in our FTN95, by importing the external DLL references. Could you please let me know how this is done in V8.10. And also, if there are, our study reference in FTN95.chm, or PDF, pls. let me know.