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

using and distributing filer.dll

Status
Not open for further replies.
Sep 17, 2001
673
US
Ramani, I used your listfile code which instantiate filer.dll. However when I try creating an executable and distributing it I get an error that says, "class definition Filer.Fileutil not found". What is the best way/code to use to make sure filer is instantiated on any machine without have to do it manually etc.
 
Unless it's been changed, filer cannot be distributed. It's just for use with VFP.

Indeed, here's the official statement from the help file on filer.dll

"Distribution
Filer.dll and its companion files are for use with Visual FoxPro only. You are not permitted to distribute any of the files with your distributed run-time applications."

Dave Dardinger

 
Well to get what I wanted I ended up using the _utility.vcx classlib and within it is _filer and it automatically prompted the user if they wanted to automatically register the filer.
 
robsutonjr

Whilst Bill Gates decreed that filer.dll should not be distributed, it seems no one also reminded him about ShellExecute().

DECLARE INTEGER ShellExecute ;
[tab]IN SHELL32.dll ;
[tab]INTEGER nWinHandle ,;
[tab]STRING cOperation ,;
[tab]STRING cFileName ,;
[tab]STRING cParameters ,;
[tab]STRING cDirectory ,;
[tab]INTEGER nShowWindow

*!* Retrieve the main VFP window handle (this handle is used by ShellExecute)

DECLARE INTEGER FindWindow ;
[tab]IN WIN32API ;
[tab]STRING cNull ,;
[tab]STRING cWinName

lnResult=ShellExecute(FindWindow(;
[tab]0,;
[tab]_SCREEN.caption),;
[tab][Find],;
[tab][],;
[tab][],;
[tab][],;
[tab]0)

*!* Error messages if the return value is < 32

IF lnResult < 32 && Error messages if the return value is < 32
[tab]DO CASE
[tab]CASE lnResult = 0
[tab][tab]lcText = [The system is out of memory or resources]
[tab]CASE lnResult = 2
[tab][tab]lcText = [Invalid association or URL]
[tab]CASE lnResult = 11
[tab][tab]lcText = [The associated application cannot be opened]
[tab]CASE lnResult = 26
[tab][tab]lcText = [A sharing violation has occured]
[tab]CASE lnResult = 28
[tab][tab]lcText = [The transaction has timed out]
[tab]CASE lnResult = 29
[tab][tab]lcText = [Unable to initialize the application]
[tab]CASE lnResult = 30
[tab][tab]lcText = [The application is already open]
[tab]CASE lnResult = 31
[tab][tab]lcText = [The file type has no associated application]
[tab]OTHERWISE
[tab][tab]lnResult = 999
[tab][tab]lcText = [Failure for reason unknown]
[tab]ENDCASE
[tab]MESSAGEBOX(lcText ,;
[tab][tab]0 + 16 + 0 ,;
[tab][tab][File error])
ENDIF

YOu can also determine the start folder by altering the parameters in ShellExecute()

Chris :)
 
Rob,

The question is whether or not you're 'permitted' to distribute the .dll, not whether or not it's possible. If you want to distribute things you're not legally allowed to distribute is your business. As to why filer is prohibited, I don't know. Probably some legacy legal snafu. Similar perhaps to the .jpg restrictions.

Since as Chris shows, there are pretty easy work-arounds, you might want to be careful what you do. On the other hand, perhaps the filer restrictions have now been removed. I don't have an up-to-date help file and haven't gotten VFP 7 yet; but Christmas is coming!

Dave Dardinger
 
I would love someone to explain in words of one syllable why filer.dll should not be distributed.

FoxDev provided a early FAQ in this forum showing alternatives using other Office Products.

Neither his offering or the use of ShellExecute() could be considered illegal as neither require filer.dll distribution.

I am sure there must be other alternatives as well if it were ever worth anyone's time to work them out.

If you happen to read this thread, Bill, please be good enough to explain yourself!

Chris :)
 
I am still unclear on whether I am using filer.dll when I use _filer which is in _utility.vcx?
 
Well, that's good to know. Since I don't see anything in the distribution notice saying that it only applies to VFP 7, I'll take it to mean that you can do it with 6 too. Glad they got that straightened out.

Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top