我一直在编写一个需要在文件中扩展环境字符串的应用程序。
为此,我可以使用标准的 Windows API 函数 ExpandEnvironmentStrings:http: //msdn.microsoft.com/en-us/library/ms724265 (VS.85).aspx
不过,我确实对该功能有一些问题。第一的:
The size of the lpSrc and lpDst buffers is limited to 32K.
下一个:Note that this function does not support all the features that Cmd.exe supports. For example, it does not support %variableName:str1=str2% or %variableName:~offset,length%.
我想实现 cmd.exe 允许的这些额外功能,但我不确定它们到底是什么。:~offset,length 有点明显......子字符串。但不确定第一个是什么。
有任何想法吗?
比利3