Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
cdrozdowski111
Posted - 02/14/2013 : 1:20:47 PM Hello,
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");
return nRetOK; }
2 L A T E S T R E P L I E S (Newest First)
cdrozdowski111
Posted - 02/15/2013 : 8:53:53 PM Thank you.
Penn
Posted - 02/15/2013 : 8:14:23 PM Hi,
I have tried your code, it works after compiling done, in LabTalk like