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!

Foxpro and dll's 1

Status
Not open for further replies.

tbubbs

Programmer
Mar 30, 2001
26
CA
I was wondering if anyone would know how to return the path of where a foxpro dll is located on a system. What I am trying to do is return the information about the dll and where it is located on a machine and the version number that it is currently at.
Any ideas? s-)
Thanks in advance,
T
 
You know, of course, that the Window's Explorer has a find file capability. And you can generally find where in the associated dlls a given capability is found. I'm guessing shlwapi.dll is where to look. OTOH, there are probably easier ways to do it. The Filer.dll would probably work, but it can't be distributed, so you'd only be able to use it yourself. --Dave
 
Hi my friend,
If by DLL you mean COM-Based DLLs not API standard DLLs
You can use the function AGETFILEVERSION() to return most of the information you need about this object provided that it was registered b4.
For example
Code:
? AGETFILEVERSION(ArrayName, "filer.dll")
Will return 0 if the COM object filer.dll is not registered.
After you issue the FOX command
Code:
RUN regsvr32.exe "c:\program files\microsoft visual studio 7\vfp7\tools\filer\filer.dll"
Try
Code:
? AGETFILEVERSION(ArrayName, "filer.dll")
This time it will return 15 and ..
? ArrayName[2] will give the company name Microsoft Corporation
? ArrayName[4] will give the version number 6.0.8015.0
etc....
Read the help for more info
Thanks Walid Magd
Engwam@Hotmail.com
 
Hi,
I am trying to use the function AGetFileVersion. My question is will it return information about a dll that is not within the foxpro directory. I have some dll's that may be placed in the system 32 folder or the winsys folder (only possibilities... users may place them elsewhere) So, to use the agetfile version function, I believe that I first need to know the path to these dll's and then use that path to get the information that I need. The thing is I can not have it hard coded because it may be different for each user.
Thanks again,
T
 
Well Tbubbs
Again it depends on which type of dll you talking about.
If it is COM-Based DLL which you can use by issuing
CreateObject() and use the interface of this object (Methods, Events,Properties), you don't need to wory where are they located, all you have to worry about is are they registered or not, if not you can tell you installation program it register them for you and any ways you can register all of them again if you shipp a new versions with your application. This function can't tell you where arre they located it is not search object.
Thanks
Walid Magd
Engwam@Hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top