Get path to a system folder

Namespace: ASCOM.Astrometry.NOVAS
Assembly: ASCOM.Astrometry (in ASCOM.Astrometry.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public static bool SHGetSpecialFolderPath(
	IntPtr hwndOwner,
	StringBuilder lpszPath,
	int nFolder,
	bool fCreate
)
Visual Basic
Public Shared Function SHGetSpecialFolderPath ( _
	hwndOwner As IntPtr, _
	<OutAttribute> lpszPath As StringBuilder, _
	nFolder As Integer, _
	fCreate As Boolean _
) As Boolean
Visual C++
public:
static bool SHGetSpecialFolderPath(
	IntPtr hwndOwner, 
	[OutAttribute] StringBuilder^ lpszPath, 
	int nFolder, 
	bool fCreate
)

Parameters

hwndOwner
Type: System..::..IntPtr
SUpply null / nothing to use "current user"
lpszPath
Type: System.Text..::..StringBuilder
returned string folder path
nFolder
Type: System..::..Int32
Folder Number from CSIDL enumeration e.g. CSIDL_PROGRAM_FILES_COMMONX86 = 44 = 0x2c
fCreate
Type: System..::..Boolean
Indicates whether the folder should be created if it does not already exist. If this value is nonzero, the folder is created. If this value is zero, the folder is not created

Return Value

TRUE if successful; otherwise, FALSE.

Remarks