Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an Object from a JAVA DLL 2

Status
Not open for further replies.

rosenfed

Technical User
May 22, 2001
3
AR
I need to instanciate an objet that is on a DLL. Under VB I use REFERENCES to include this DLL into the program. Is there any way to do the same under Visual FoxPro?
 
Hi my friend
Start by register you DLL using the command
Code:
! REGSVR32.EXE <DLL Path>\<DLL Name>.dll
If the registeration is completed OK you suppose to get a message like
DIIRegisterServer in <DLL Path>\<DLL Name>.dll succeeded
Then you will be able to instantiate you COM object in VFP using
Code:
OMyObject=CREATEOBJECT(&quot;<DLL Name>&quot;)


Walid Magd
Engwam@Hotmail.com
 
No, VFP6 does not expose COM interfaces/Type libraries, nor does it support early binding or strong typing.

As per Walid's comments, you can still use the COM object via late binding:

oMyObject = CreateObject(&quot;MyDll.MyClass&quot;)
oMyObject.MyMethod

VFP7 addresses several of these issues:
Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top