Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent foxyprevier to copy libhpdf from start direct
Message
From
09/12/2011 12:18:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
How to prevent foxyprevier to copy libhpdf from start direct
Miscellaneous
Thread ID:
01530740
Message ID:
01530740
Views:
133
application start in and exe file directories are different, start in is for every user.

c:\myapp\main\myapp.exe
c:\myapp\main\libhpdf.dll

Every user uses program so that default is separate directory:

c:\myapp\user1
c:\myapp\user2
..
c:\myapp\usern

FoxyPreviewer copies libhpdf.dll to every usern directory polluting subtree with duplicate files.
How to fix this so that c:\myapp\main\libhpdf.dll file is always used and not copied.

Code which makes this copy in FoxyPreviewer is:

lcPDFFile = "libhpdf.dll"
IF FILE(lcPDFFile) AND EMPTY(SYS(2000,lcPDFFile))
* File is an embedded resource
lcTestPath = lcClassPath + lcPDFFile && FULLPATH("libhpdf.dll")
IF PR_PathFileExists(lcTestPath + CHR(0)) = 0
STRTOFILE(FILETOSTR(lcPDFFile), lcClassPath + lcPDFFile)
ENDIF

IF NOT FILE(lcClassPath + lcPDFFile)
STRTOFILE(FILETOSTR(lcPDFFile), ADDBS(HOME()) + lcPDFFile)
SET PATH TO (HOME()) ADDITIVE
ENDIF
ENDIF
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform