Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   VB6: Slashes in the macro disappeared (https://www.kinook.com/Forum/showthread.php?t=2033)

ASolovey 08-30-2006 10:48 AM

VB6: Slashes in the macro disappeared
 
Hi,

I had VB5x. There is a macro in my globals:


RC_OPTS
options for resource compiler to make version info in C++ native projects
-1
/dFILE_VERSION_BIN=%FILE_VERSION_BIN% /dPRODUCT_VERSION_BIN=%PRODUCT_VERSION_BIN% /dFILE_VERSION=\"%FILE_VERSION_BIN%\" /dPRODUCT_NAME=\""%PRODUCT_NAME%"\" /dPRODUCT_VERSION=\"%PRODUCT_VERSION_BIN%\"


This macro assembles command line for resource compiler from few other macros.

This is how result looked like in VB5x:

/dFILE_VERSION_BIN=2,4,0,6 /dPRODUCT_VERSION_BIN=2,4,0,6 /dFILE_VERSION=\"2,4,0,6\" /dPRODUCT_NAME=\""My Project"\" /dPRODUCT_VERSION=\"2,4,0,6\"

Everything was OK. Notice, that slashes were preserved.
Now I has installed VB6.

With the same globals it produces this:
/dFILE_VERSION_BIN=2,4,0,6 /dPRODUCT_VERSION_BIN=2,4,0,6 /dFILE_VERSION="2,4,0,6" /dPRODUCT_NAME=""My Project""

You can see that VB6 differently handles things like this:
/dPRODUCT_NAME=\""My Project"\",
specifically - \"". Slashes have disappeared.

Is it a bug? Side effect? Feature?

What should I specifiy in the macro in order to have the result look like this: \""My Project"\" (including slashes)?

Alex.

kinook 08-30-2006 12:50 PM

There is a bug when loading v5 global macro values containing the string \" in v6 -- it incorrectly strips the backslash character (it's related to logic needed when converting v3 macros, but it incorrectly processes v4/5 macros in this way too). If you have the original v5 .macros file or have not modified global macros in v6 yet, you can exit VBP and change the 2nd line



in the .macros file to



Otherwise, just add the backslashes back in to the macro value in v6 to correct the problem.


All times are GMT -5. The time now is 05:50 AM.


Copyright © 1999-2023 Kinook Software, Inc.