Click or drag to resize

SetDefaultDir Function (String)

X#
Change the setting that determines the location of the error log file.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SetDefaultDir(
	cPathSpec AS STRING
) AS STRING
Request Example View Source

Parameters

cPathSpec
Type: String
The disk drive and directory where you want the application to create and search for the error log file.
If you specify both a drive and directory, a colon must be included after the drive letter.
The initial default for SetDefaultDir() is the current directory.

Return Value

Type: String
Remarks
By default — that is, if you do not place a DefaultDir entry in the X# section of WIN.INI and do not call SetDefaultDir() — the location of the error log file is determined as follows: The SetDefault() location, if one has been set Otherwise, the current Windows directory If you set the DefaultDir entry to a value other than its initial default (DefaultDir=), this setting determines the location of the error log file for this, and all other X# applications. If you call SetDefaultDir(), it overrides the DefaultDir entry for the current application, using the specified location.
Examples
This example uses SetDefaultDir() to change the set and query the current default drive and directory:
X#
1Function Start()
2    SetDefaultDir("c:\errfiles")
3    ...
See Also