A question regarding DIR.DL3

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
User avatar
Lanzecki
User
Posts: 19
Joined: Fri 2015-09-18 16:37

A question regarding DIR.DL3

Post by Lanzecki »

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
User avatar
Lanzecki
User
Posts: 19
Joined: Fri 2015-09-18 16:37

Re: A question regarding DIR.DL3

Post by Lanzecki »

Bump :)
User avatar
Henrik
VLSI Staff
Posts: 1294
Joined: Tue 2010-06-22 14:10

Re: A question regarding DIR.DL3

Post by Henrik »

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! :-)]
Good signatures never die. They just fade away.
User avatar
Lanzecki
User
Posts: 19
Joined: Fri 2015-09-18 16:37

Re: A question regarding DIR.DL3

Post by Lanzecki »

Many thanks, Henrik.

It's obvious now you have written it, but using CD never occurred to me!
Post Reply