我注意到之类的语句:sal缓冲注释中的额外下划线(_)是什么?
__in HMODULE Module,
__in PSTR ImportedModuleName,
__in PSTR ImportedProcName,
__in PVOID AlternateProc,
__out_opt PVOID *OldProc
这些语句中,我看到了两个_再字(中)。
好,一边看着sal.h我注意到了过时的注释下:
// sal.h
_in : The function will only read from the buffer. The
caller must provide the buffer and initialize it. Cannot be used with _deref.
那么只有一个下划线。我想知道为什么我在网上看到的所有源代码都有两个下划线(_ _in)?像我上面的陈述。
下划线表示它是一个用于防止名称冲突的保留标识符。尽管如此,我不知道'in'/'out'是什么意思。 – Pubby
可能的重复[为什么人们在C++中使用__(双下划线)](http://stackoverflow.com/questions/224397/why-do-people-use-double-underscore-so-much-in- c) – markus