Windows的FindFirstFile()函数中的错误?

Meh*_*dad 4 file-io winapi file wildcard

为什么FindFirstFile使用模式调用*.*匹配一个名称Windows

编辑:我想我也可以猜到发生了什么,但是有没有关于原因的文件?

Chr*_*lor 5

在博客文章'如何通配符在MS-DOS中工作?' Raymond Chen描述了如何实现原始DOS通配符匹配.在帖子的最后,他指出了如何*.*处理Win32通配符匹配算法中的特殊情况.

帖子引用

For example, if your pattern ends in .*, the .* is ignored. Without this rule, the pattern *.* would match only files that contained a dot, which would break probably 90% of all the batch files on the planet, as well as everybody's muscle memory, since everybody running Windows NT 3.1 grew up in a world where *.* meant all files.