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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placement of DLL files

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
0
0
US
I'm in the process of creating my first VFP DLL. In a network enviornment I believe that since the DLL needs to be available to anyone who runs my application that it needs to reside in the root directory of my application. I heard that DLL's need to be registered on the system they are running on. The documentation isn't very clear about how these two issues can be addressed. Question: Can the DLL's be placed in the program directory without being 'registered'? If not, how should I approach this.

Steve
 
No, it cannot be placed and used without registering.
Usually EXE file with all required modules is packaged into the setup program that does installation, include registering of all required DLL files. Take a look to the VFP setup wizard.

Well, for a single DLL you can register it right from the VFP APP. You can check if DLL is registered by trying to create object from it. If you get error (catch it by ON ERROR and check for special error), then it is not registered, so we run RegSVR32.EXE applicatio from the system directory to register that DLL. Well, if it is not even on disk, we get its copy from the network file server where all modules required for application are located. After registering - it will go ok. There are also other ways to register DLL in the system (call DLL's registering function using DECLARE-DLL, or write registry keys into registry manually - tremendous and dangerous).


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Actually you can place the required vfp runtime dlls in the working directory of the program. I admit this doesn't usually mean that a DLL can be used. More often than not you have to register a dll - but this is simply so that a piece of software can locate the library. With the runtime dlls in the working directory the vfp executable finds then - try it - or just trust me :)

(having said all that, I'd use the setup wizard if I was distributing an application to a stand alone PC)

Ian
 
The subject was about the creating VFP DLL. VFP DLL require to be registered for use, because VFP DLL can contain only COM objects, that could not be used in other application without registering.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top