OSDGetFileName

This function allows getting the name of user-selected file with its extension, but without its path.

OSDRET OSDGetFileName(HANDLE hDialog, char* buf, int* size);

Parameters

  • hDialog - Dialog window descriptor.
  • buf - Points at the text buffer used to save file name.
  • size - Specifies text buffer size when the function is called and saved name length when the function quits its work.
  • Returned value - Returns operation result of OSDRET type.

Notes

OSDGetFileTitle() and OSDGetFileExt() functions are also used to work with file names.

Sample

OSDGetFileName(hDialog, szFileBuff, &nSize);