Private Declare Function GetTempFileName _ Lib "kernel32" _ Alias "GetTempFileNameA" _ (ByVal lpszPath As String, _ ByVal lpPrefixString As String, _ ByVal wUnique As Long, _ ByVal lpTempFileName As String) As Long Private Sub Form_Load() Dim lngReturn As Long Dim strBuffer As String Dim strPath As String strBuffer = String$(255, 0) lngReturn = GetTempFileName(strPath, "EM", 0, ByVal strBuffer) MsgBox "You could use this string as a temp filename: " & Left$(strBuffer, lngReturn) End Sub>I read the help on this method and it indicates that the method will create a temp file (probably on the temp drive). But I need to create a unique string which I will pass to VFP stored procedure that will create a table of that name.
>>>SUBSTR(SYS(2015), 3, 10)
>>>
in VFP.