For anyone interested, the attached file will allow one to invoke VC general commands from a shell.
The command is GENCMD and use
GENCMD commands to list all commands available.
You need to add the unit to your uses clause and add the line
somewhere in your program.
Discussion and questions about programming with Ultibo.
3 posts • Page 1 of 1
pjde wrote:For anyone interested, the attached file will allow one to invoke VC general commands from a shell.
Thanks Paul, I've been trying this out and it is an excellent way to make this functionality available.
If you don't mind we'll add it to the Ultibo release under the ultibounits package so it is always available.
Just one small change, the buffer used by TShellCommandGC.DoCommand should be declared locally to the function like this:
Code: Select all
i : integer;
s, l : string;
buffer : array [0 .. 1023] of char;
Result := false;
instead of being declared in the class, that way it is allocated on the stack which makes the class thread safe.
And of course the ShellRegisterCommand() call can be added to the initialization section so it just automatically registers.
Ultibo.org | Make something amazing
Do with it as you wish.
Who is online
Users browsing this forum: mark and 0 guests