This is probably for Henrik as I think he wrote this!
How do you set the directory to be enumerated before calling DIR with RunLibraryFunction? The command line version is obvious, but when wanting the playlist via the DLL call, it is set to use currentDirectory in the DLLENTRY. I have tried SetDirectory, but that seems to have no effect.
Thanks,
John
A question regarding DIR.DL3
Re: A question regarding DIR.DL3
Hello John,
For the shell environment I recommend you run CD before running DIR. Then, of course, you have to CD your way back to wher you were. You can do that either by calling CD, or by just directly backuping / restoring the contents of currentDirectory.
By the way, we have added a simplified Shell calling convention for VSOS 3.25. So instead of you calling e.g. res = RunLibraryFunction("CD", ENTRY_MAIN, (int)"S:SYS/"), you can now just say res = RunProgram("CD", "S:SYS/"); . It's just syntactic macro sugar, but makes the code slightly easier to read.
Kind regards,
- Henrik
[EDIT 2015-12-08: What a coincidence: you bumped the thread while I was doing the research for writing my answer! ]
For the shell environment I recommend you run CD before running DIR. Then, of course, you have to CD your way back to wher you were. You can do that either by calling CD, or by just directly backuping / restoring the contents of currentDirectory.
By the way, we have added a simplified Shell calling convention for VSOS 3.25. So instead of you calling e.g. res = RunLibraryFunction("CD", ENTRY_MAIN, (int)"S:SYS/"), you can now just say res = RunProgram("CD", "S:SYS/"); . It's just syntactic macro sugar, but makes the code slightly easier to read.
Kind regards,
- Henrik
[EDIT 2015-12-08: What a coincidence: you bumped the thread while I was doing the research for writing my answer! ]
Good signatures never die. They just fade away.
Re: A question regarding DIR.DL3
Many thanks, Henrik.
It's obvious now you have written it, but using CD never occurred to me!
It's obvious now you have written it, but using CD never occurred to me!