Monday, September 29, 2008

Possible "File" entry:

"\\.\PIPE\Pipe%VarName%In"

In this example, %VarName% is a placeholder and is replaced by the value of the VarName environment variable at runtime. If "VarName" equals "Val00" at runtime, then the SAPVtio constructs the "\\.\PIPE\PipeVal00In" string as the file name and uses it to open the pipe.

SAPVtio treats expressions surrounded by percentage signs as environment variables with two exceptions. When the expression is %pid%, SAPVtio embeds the running process ID, and does not treat the expression as an environment variable. The placeholder expression %tid% is expanded to the current running thread ID. Consequently, if the "File" entry is "\\.\PIPE\Pipe%JustName%In%pid%" and the process ID is "100" at runtime and the "JustName" environment variable equals "TheValue", the pipe name used (as a result of the runtime expansion) will be "\\.\PIPE\PipeTheValueIn100".

In short: All expressions between % signs are placeholders to be expanded at runtime. If the expression is %pid%, it is replaced by the process ID. %tid% is replaced by the thread ID. All other placeholders are treated as environment variables and are replaced with their values.

0 comments: