双反斜杠不起作用? [英] Double backslash not work?

查看:93
本文介绍了双反斜杠不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么某些Windows XP安装程序不评估其中带有双反斜杠的路径吗?

does anybody have idea why some windows XP installation would not evaluate path with double backslash in them?

在某些XP上发现错误(相同的内部版本,补丁,未知的更多详细信息).在大多数情况下,一切正常,在某些PC上,以下功能不起作用:

Error is found on some XP (same build, patches, unknown more details). In most everything works, on some PCs following doesn't work:

使用RegEnumKeyEx之类的功能查询路径(注册表或文件夹),如果路径包含两个反斜杠(例如C:\\test\hello.txt),则fopen失败.

Querying path (registry or folder) with functions like RegEnumKeyEx, fopen fails if path contains two backslashes, for example C:\\test\hello.txt.

strPath = "\SOFTWARE\Microsoft\Windows\Currentversion\run"    // works

strPath = "\SOFTWARE\Microsoft\Windows\Currentversion\\run"   // doesn't work

是否存在一些可能会影响它的策略选项或设置?

Is there some policy option or setting which can affect it?

欢迎您的帮助, RM

Any help welcome, RM

推荐答案

可能完全不相关,但使用C/C ++(以及其他语言)- "c:\\\\test\hello.txt"可以,但是"c:\test\hello.txt"不能(因为\t被解析为制表符,因此您得到的名称实际上并不存在).

Possibly completely unrelated, but in C/C++ (and other languages too) - "c:\\\\test\hello.txt" is okay, but "c:\test\hello.txt" is not (because \t is parsed as a tab character, so you get a name that doesn't really exist).

两个反斜杠不存在时故障是否会发生,并且在反斜杠行之有效吗?

Is there a chance the failure happens when the two backslashes don't exist, and things work when they do?

这篇关于双反斜杠不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆