Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to implement OLE server as .DLL
Message
 
 
To
12/06/1998 15:47:07
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00107397
Message ID:
00107940
Views:
29
Brian,

My project that builds a DLL server has a .prg marked as main, but it only contains a comment. You should enclose the server name in " in the createobject call. But DLLs should not create user interface, although my DLL class is based on Form and I display server status with the form BackColor but the server window does not get any of the normal user interactions. What you can do inside your DLL is log messages using TEXTMERGE out to an external file. If you drop the file onto a browser you can just hit the Refresh button to see new messages that appear in the file over time.

>I have discovered how to get the class to operate if I make an EXE server. The class I am trying to instantiate is a "custom" (non-visual) class with no code in any methods (just a stub). The main program of the project I compile into the OLE server is simply a RETURN. I have found out that I must set UDFPARMS to REFERENCE for the methods to work, but I can get it to run on any machine. The problem now is that I really want an inproc DLL server. The DLL now works fine in the development environment, but always crashes when I run the application as an EXE, even on my machine. It causes VFP500.DLL to crash somehow. All the machines have the VFP DLLs installed. The code to instantiate the object is simply:
>
>oReports = CREATEOBJECT(c7Reports.ReportCode)
>
>
>
>There are no messageboxes or anything. No code at all. I just want to instantiate an object. I have unregistered the EXE on all machines, so that's not a problem. The DLL successfully registers with RegSvr32. The error I get in NT usually reads something like this:
>I hope I can get the DLL server to work, because an inproc server is so much better for what I am trying to do. I want to be able to use message boxes for one thing. Thanks for your help.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform