Winapi Windows 10 1903-LongPathAware不工作?
下面是我使用的清单。对于操作系统版本信息,它可以正常工作,但在我的系统上,它不支持长路径。我可以选择我的长路径x:\whatever\whatever\etc,该路径在CreateFile Unicode构建中找不到,只需在\\?\前面加上前缀,即可正常工作。DWORD注册表值LongPathsEnabled在Computer\HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem设置为1,并已重新启动系统 我做错了什么。我想是在舱单上吧Winapi Windows 10 1903-LongPathAware不工作?,winapi,filesystems,Winapi,Filesystems,下面是我使用的清单。对于操作系统版本信息,它可以正常工作,但在我的系统上,它不支持长路径。我可以选择我的长路径x:\whatever\whatever\etc,该路径在CreateFile Unicode构建中找不到,只需在\\?\前面加上前缀,即可正常工作。DWORD注册表值LongPathsEnabled在Computer\HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem设置为1,并已重新启动系统 我做错了什
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--The ID below indicates application support for Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="https://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
</assembly>
请尝试使用以下XML:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
问题是清单上的内容。有效的舱单是:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
我只是在我的原始清单中替换了那个部分,这样它就可以合并到同一个文件中。不要问我为什么会有这么多错误的信息,即使是在微软网站上。说到那个网站,我发现这么多有用的链接现在都死了,为什么微软会把旧的知识库放在那里呢 你能用如何调用CreateFile的示例代码来修改你的问题吗?你也启用了enable Win32 long paths组策略吗?我没有启用组策略,因为MS文档说你可以选择使用它来控制注册表值,如果你自己设置的话。此注册表项还可以通过组策略在“计算机配置”>“管理模板”>“系统”>“文件系统”>“启用NTFS长路径”中进行控制。CreateFile看起来像:h=CreateFileFileFileFileName、access、share、NULL、action、flags、NULL;我在“计算机配置”>“管理模板”>“系统”>“文件系统”>“启用NTFS长路径”重新启动时启用了组策略,但没有任何区别。除非我把\\?\放在它前面,否则它仍然不能工作。我已经复制了它,上面的xml对我有效,我将与相关工程师确认,这是文档问题还是使用问题,或者其他问题。这不是我已经有的吗?除了使用https而不是http?我把它放在正确的地方了吗?您好,@df234987我们已经确认了这个问题HTTPS和http,微软的工程师正在处理这个问题。@riQQ,检查下面的文档,它已经被更新为http:这实际上与我的答案相同。目前,我们正在等待相关内部人员的回复。看起来不是这样,您有我最初拥有的ws2:和xmlns:ws2=项目。我知道你曾经有过,但后来改变了?但可能只是https和http的问题