I have developed an custom Origin C function that wraps the Origin C function GetFilenamesInFolder().
I have done this for two reasons:
1) To modify the ref string containing the list of files generated by GetFilenamesInFolder(). My function changes the separator from "|" to "\r\n". 2) To make the functionality of GetFilenamesInFolder() available to LabTalk.
Can someone take a look at my code below to make sure it is kosher? It does compile and runs when called from LabTalk.
int myGetFilenamesInFolder(string& strFilenameList, string strPath = "", string strFilter = "", int nRecursive = 0, int nDisplayOptions = 0) { int nRetOK = 0;
// GetFilenamesInFolder() puts the list of files found in strFilenameList separated by "|" nRetOK = GetFilenamesInFolder(strFilenameList, strPath, strFilter, bRecursive, uDisplayOptions);
// Replace "|" separator in strFilenameList with "\r\n" strFilenameList.Replace("|", "\r\n");