Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a .dll for VB
Message
From
30/08/2000 14:44:36
 
 
To
30/08/2000 13:57:52
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00410896
Message ID:
00410935
Views:
17
>Ok, I was asked to build a dll that can be accessed from a VB program. I built a custom class that has the required code. I marked it as olepublic. I put the class in a project and then built a dll (I chose single threaded). It built a dll file. I wanted to test it from VFP so I ran a program that does a set library to that dll, additive and I get an 'Invalid dll' error.
>
>Did I do something wrong? How will this work being called from VB. It should be called with parameters. I put the code in the Init of the custom class.
>

You don't do SET LIBRARY at all; the OLEPUBLIC class should be registered on the PC. Ensure tha the class library that contains the OLEPUBLIC class is not included in the application, and use the ProgID of the class assigned to the in-process server to instance it:

oMyObj = CREATEOBJ('MyOLEPublic.Class', parm1, parm2, parm3)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform