How to use RED Redirection Macros

Have I got a Herbert Hoover New Deal version of Clarion?

Let me explain, I can go to the trouble of putting redirection macros in the ClarionProperties.xml and c60ee.ini file for C6, yet the redirection macros dont appear to work in C11 but do in C6. This is also highlighted by the fact that the redirection macro’s appear in
HKLM\Software\Softvelocity\Clarion[ver]

yet the help documentation which is quite frankly disgustingly poor still directs us to use the ClarionProperties.xml file.

WTF is going on? :angry:

Its like I’m caught up in a poorly run criminal enterprise with others things besides Clarion not working!

I have been successfully using redirection macros for a long time.

They work well for me in c11 and c11.1 among many other versions

You might try confirming they are in the right place in clarionProperties.xml by confirming they show in the IDE.tools.options
( I’m away from my machine ATM so I can give you the full path inside of options)

Also since the redirection macros are specific to each build of clarion

You might want to double check which build you’re using to compile

Note I’m unaware of the registry entries


And dont forget this post
Redirection System Macros - Do these macros expand? - THISDIR, WinCommonApplicationData, WinUserApplicationData, REDDIR - questions - ClarionHub

This might be pertinent to the problems I’m see here, but what security software do you have on your computer and what browser do you use, ie are you using the built in windows defender and MS security settings or some third party AV and are you using MS Edge or some other browser?

ok, in one of your images above I see you have a redirection macro call MyOwn associated with 11.0.13244. When you’re compiling with 11.0.13244, does your Clarion110.RED have an entry like
*.* = %MyOwn%
or
*.* = %MyOwn%\SomeSubDirectory

Also which section of the .RED do those lines appear ?
Maybe it’s best if you just show your .RED

Another thing to check, do you have a local Clarion110.RED, which is to say in the same folder as your .CWProj
I’m just wondering if you’re looking at the right .RED when things aren’t working for you.

Nothing appears in the .red file but I wouldnt expect %myown% to appear in the .red file unless I add it, if I have read the docs right, but even when I have added something to the .red file, it doesnt always work.

The problem seems to be with the clarionproperties.xml not always updating if I add a redirection macro through the IDE. Its like something is messing with the clarionproperties.xml thats why I asked about your security.

Earlier tonight when the screensaver desktop kicked in when I was making a cuppa, someone removed the popup window listing the variables which appears in the C6 embed window so I had to copy a C60ee.ini back over the original to get that back.

I’m beginning to think someone has hacked this computer and messes with the file handles or pipes in the system and I have all the MS Windows 10 Pro security switched on and enabled to the max.

The other problem is the MS Security ransomware protection sometimes stops apps writing to files, it sorts of runs the app and then rolls everything back to before the app was run, which could explain the problems I’m seeing with the clarionproperties.xml file not always updating.

So I have cladb.exe, clarion.exe, libmaker.exe, prjserver.exe added to the apps allowed through to the controlled folder ie folders with ransomware protection enabled, but its hit and miss if it all works, thats why I was asking about what security software you use, I think this ransomware protection might still be playing up, but I cant be sure and obviously things get changed on this computer.

Another example, for most of the day, when working in the C6 IDE, when I click the green tick to save and close the app, it would popup the global extension list which is something I havent seen before. That started messing around yesterday, but again hit and miss. So I’m wondering if ASLR is messing up some of the function calls, because all these computers really are are addresses in Longs and data of sorts in variable length Cstrings. They are not anything special.

To my knowledge redirection macros are only used in redirection files (.red)

So how can you say it’s not working if you’re not using it in your clarion110.red

hi Richard,

So I guess then, the question becomes, what makes you think;

If you have declared the macro, but you are not using it, then how do you know if it’s working or not?
Mark was wondering how you are using the macro, and how you are determining that they are not working.

I recommend checking the xml file for settings - if there are items in the registry they are likely the result of old code in the IDE, and as far as I know are not used.

Cheers
Bruce

Because when I have added the redirection symbol macros to the .red file its not worked, even the new clarion built in one’s dont work, hence my other post on the subject.

In a standard .red file there is now a redirection macro called %bin% which doesnt work.
[Common]
*.chm = %BIN%;%ROOT%\Accessory\bin
*.dll = %BIN%

but there is also a .dll file mask using %root% which negates the need for %bin% but creates the illusion %bin% is working

*.dll = %ROOT%\Accessory\bin

In my pics you can see root is listed, but bin is not listed or more mentioned in the help docs but none of the other macro redirections work either.

It only seems to work if I populate the registry, which is nothing like what the docs say.

I havent tested the copy section where %bin% and the other built in macro redirections may work.

So I still haven’t heard details on why you think RedirectionMacros are not working

So I wrote a test.

First I created a RedirectionMacro using the IDE
Tools > Options > Clarion > Clarion for Windows > Versions
Then selected the build that I’m using (in this case Clarion 11.0.13244)
Then selected the Tab[Redirection File]
Then clicked Add
Set Macro = TestRedirMacros
Set Value = D:\tmp\TestRedir
OK

Then I created a hand coded program, with an include of a file extension I don’t think I’ve used before.

  PROGRAM
  MAP
  END
  INCLUDE('TestRedirectionMacros.123'),ONCE
  CODE

I created a local Clarion110.red, with this very abbreviated content

{include %REDDIR%\%REDNAME% }
*.123=%TestRedirMacros%

I compiled before I created the I file TestRedirectionMacros.123
and predictably the compile failed with a message

Error : Error(3): cif$fileopen TestRedirectionMacros.123 The system cannot find the path specified.

I then created the file D:\tmp\TestRedir\TestRedirectionMacros.123
and emptied it out, except for a comment line

I then successfully compiled

I then altered my .red commenting out the *.123 line
compiled again, and it failed with the same error message as above

Conclusion - redirection macros work as expected as tested in Clarion 11.0.13244

I’ll try that here then and see if it works, but do you have all the Windows 10 security features switched on if you are using a Win10 machine with Clarion 11?