DTOS()

ServerName

This property stores the name of the program used to start the current application. This can be handy for determining the pathing needed to reach other components.

Usage

cServerName = appObject.ServerName
When starting your COM server as either a DLL or an EXE, its HOME() and SYS(2004) values might not give you the information you need. For an EXE, those functions often point at the Windows System directory. For a DLL, they point to the same settings as the application in which the DLL is running, since they share the same space. To know the location of the file that was started, and hence more easily find local resources it might need, such as an INI file or a resource file, test ServerName. This returns a full path and filename of the file that started the current application object.

Example

? _VFP.ServerName  && in development, returns the path to VFP 

See Also

Application, Server, _VFP


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net