Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

If a plugin modifies its command line and returns 0xFEDCCA98?

May
13,828
211
What if If a plugin modifies its command line and returns 0xFEDCCA98? If that causes an internal to be called, does the internal get the modified command line or the original one?
 
Are you sure? I'm trying to overload CD. My plugin CD (still in testing) starts with this

Code:
INT WINAPI CD ( LPWSTR psz )
{
    Printf(L"psz = %s\r\n", psz);

and ends with this.

Code:
    Printf(L"%s\r\n", psz);
    return 0xFEDCBA98; // disabled; call built-in

The plugin turns "/h" into TCC.EXE's home directory.
When I use the plugin, the internal CD is still getting the "/h" option.

Code:
d:\> which cd
cd is a plugin command (4UTILS)

d:\> cd /h
psz =  /h
psz = d:\tc34
TCC: (Sys) The parameter is incorrect.
 "h"
Usage : CD [/D /N /R /X] [path | - | :folder]
 
Are you sure? I'm trying to overload CD. My plugin CD (still in testing) starts with this

Which is funny, because I've used 0xFEDCBA98 for exactly this purpose: to add features to CD in TCC/LE. It works brilliantly... in TCC/LE. Testing on some antique versions, it looks like this feature worked in TCC v16, broke in TCC v17.

It is still documented in the current SDK, though.
 
I can only go back to v24. This is what I want.

Code:
v:\> cd /?

4UTILS Extensions to built-in CD:

    /H (TCC home), /P (profile), /K (desktop), /F (favorites)

TCC: Display or change the current directory.

CD [/D /N /R /X] [path | - | :folder]
    path:  The directory to change to
    -:     Change to previous directory
    /D(rive) - change drive too /R(eparse point)
    /N(o fuzzy search)      /X exclude

I changed my CD to use the built-in CDD with a new command line. That bypasses the current problem and saves me having to check the special folders to see if I must add "/D" for the built-in CD.
 
Back
Top