|
of_getaltfilename
|
|
Full name
|
pfc_n_cst_filesrvunicode.of_getaltfilename
|
Access
|
public
|
Extend of
|
string
|
Return value
|
string
|
Prototype
|
public function string of_getaltfilename(string)
|
Name
|
Datatype
|
lstr_FindData
|
os_finddata
|
lul_Handle
|
ULong
|
public function string of_getaltfilename (string as_longfilename);//////////////////////////////////////////////////////////////////////////////
// Public Function: of_GetAltFilename
// Arguments: as_LongFileName The long file name for which the alternate (short) file
// name is desired; an absolute path may be specified
// or it will be relative to the current working directory.
// Returns: String
// The alternate file name (without the path), returns an empty string if an error occurrs.
// Description: Get the alternate file name name for a Win32 long file.
//////////////////////////////////////////////////////////////////////////////
// Rev. History: Version
// 5.0 Initial version
// 5.0.03 Changed long variables to Ulong for NT4.0 compatibility
//////////////////////////////////////////////////////////////////////////////
// Copyright © 1996-1999 Sybase, Inc. and its subsidiaries. All rights reserved. Any distribution of the
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
ULong lul_Handle
os_finddata lstr_FindData
// Find the long file name
lul_Handle = FindFirstFileW(as_LongFileName, lstr_FindData)
If lul_Handle <= 0 Then Return ""
FindClose(lul_Handle)
Return lstr_FindData.ch_alternatefilename
end function