I think you are using a very old version of PFC's? Try using FindFirstFileW() instead of ...A().
Here are the external function declarations I see in our version of pfc;s: pfc_n_cst_fileserv_unicode:
// Win 32 calls
Function ulong GetDriveTypeW (string drive) library "KERNEL32.DLL"
Function boolean CreateDirectoryW (ref string directoryname, ref os_securityattributes secattr) library "KERNEL32.DLL"
Function boolean RemoveDirectoryW (ref string directoryname) library "KERNEL32.DLL"
Function ulong GetCurrentDirectoryW (ulong textlen, ref string dirtext) library "KERNEL32.DLL"
Function boolean SetCurrentDirectoryW (ref string directoryname ) library "KERNEL32.DLL"
Function ulong GetFileAttributesW (ref string filename) library "KERNEL32.DLL"
Function boolean SetFileAttributesW (ref string filename, ulong attrib) library "KERNEL32.DLL"
Function boolean MoveFileW (ref string oldfile, ref string newfile) library "KERNEL32.DLL"
Function long FindFirstFileW (ref string filename, ref os_finddata findfiledata) library "KERNEL32.DLL"
Function boolean FindNextFileW (long handle, ref os_finddata findfiledata) library "KERNEL32.DLL"
Function boolean FindClose (long handle) library "KERNEL32.DLL"
Function boolean GetDiskFreeSpaceW (string drive, ref long sectpercluster, ref long bytespersect, ref long freeclusters, ref long totalclusters) library "KERNEL32.DLL"
Function long GetLastError() library "KERNEL32.DLL"
// Win32 calls for file date and time
Function long OpenFile (ref string filename, ref os_fileopeninfo of_struct, ulong action) LIBRARY "KERNEL32.DLL"
Function boolean CloseHandle (long file_hand) LIBRARY "KERNEL32.DLL"
Function boolean GetFileTime(long hFile, ref os_filedatetime lpCreationTime, ref os_filedatetime lpLastAccessTime, ref os_filedatetime lpLastWriteTime ) library "KERNEL32.DLL"
Function boolean FileTimeToSystemTime(ref os_filedatetime lpFileTime, ref os_systemtime lpSystemTime) library "KERNEL32.DLL"
Function boolean FileTimeToLocalFileTime(ref os_filedatetime lpFileTime, ref os_filedatetime lpLocalFileTime) library "KERNEL32.DLL"
Function boolean SetFileTime(long hFile, os_filedatetime lpCreationTime, os_filedatetime lpLastAccessTime, os_filedatetime lpLastWriteTime ) library "KERNEL32.DLL"
Function boolean SystemTimeToFileTime(os_systemtime lpSystemTime, ref os_filedatetime lpFileTime) library "KERNEL32.DLL"
Function boolean LocalFileTimeToFileTime(ref os_filedatetime lpLocalFileTime, ref os_filedatetime lpFileTime) library "KERNEL32.DLL"
Public:
Function boolean MoveFile(REF String lpExistingFileName, REF String lpNewFileName) LIBRARY "KERNEL32.DLL" ALIAS FOR "MoveFileW"
Private:
FUNCTION unsignedLong GetLongPathName(REF String lpszShortPath, REF String lpszLongPath, Long cchBuffer) LIBRARY 'kernel32.dll' ALIAS FOR 'GetLongPathNameW'
FUNCTION unsignedLong GetShortPathName(REF String lpszLongPath, REF String lpszShortPath, Long cchBuffer) LIBRARY 'kernel32.dll' ALIAS FOR 'GetShortPathNameW'
Function unsignedInteger GetSystemDirectory(REF String lpBuffer, unsignedInteger uSize) LIBRARY "KERNEL32.DLL" ALIAS FOR "GetSystemDirectoryW"
Function unsignedInteger GetTempFileName(REF String lpPathName, REF String lpPrefixString, unsignedInteger uUnique, REF String lpTempFileName) LIBRARY "KERNEL32.DLL" ALIAS FOR "GetTempFileNameW"
Function unsignedLong GetTempPath(unsignedLong nBufferLength, REF String lpBuffer) LIBRARY "KERNEL32.DLL" ALIAS FOR "GetTempPathW"
Function unsignedInteger GetWindowsDirectory(REF String lpBuffer, unsignedInteger uSize) LIBRARY "kernel32.dll" ALIAS FOR "GetWindowsDirectoryW"
This is the code that worked:
pfc_n_cst_filesrvunicode lnv_file
if NOT IsValid(lnv_file) then
li_rc = f_SetFileSrv( lnv_File, TRUE)
end if
li_rc = lnv_file.of_GetLastWriteDateTime( 'C:\Users\Public\PBApps\Material_Dropdown.txt',dt_test, tm_test)