什么是标签:APIWinHTTP和_Out_的任何职能的文档的含义是什么? [英] What is the meaning of _In_ and _Out_ in documentation of any function?
问题描述
正如你所知道每一个人,当我们想了解的任何功能 Win32 API的一些信息
,由文档,你会看到大多数的类似如下的功能:
As you know everyone, when we want to know some info about any function in win32 api
, by the documentation, you will see most of the functions like the following:
BOOL WINAPI GetClientRect(
_In_ HWND hWnd,
_Out_ LPRECT lpRect
);
另外一个
HWND WINAPI CreateWindow(
_In_opt_ LPCTSTR lpClassName,
_In_opt_ LPCTSTR lpWindowName,
_In_ DWORD dwStyle,
_In_ int x,
_In_ int y,
_In_ int nWidth,
_In_ int nHeight,
_In_opt_ HWND hWndParent,
_In_opt_ HMENU hMenu,
_In_opt_ HINSTANCE hInstance,
_In_opt_ LPVOID lpParam
);
我的问题是:结果
是什么意思或_在_ , _out _
, _In_opt _
意思>, _Inout _
等。
My Question is:
What is the meaning or meant by _In_
, _Out_
, _In_opt_
, _Inout_
and so on.
推荐答案
的转换别人的评论变成一个答案 - 因此这是社区维基的
由于乔纳森·波特 <一个href=\"http://stackoverflow.com/questions/24816367/what-is-the-meaning-of-in-and-out-in-documentation-of-any-function#comment38523901_24816367\">observed:
-
在
表示前面的参数由您提供的, -
退出
意味着它是由函数返回的, -
选择
表示可选的(可以是0 - 一个空指针或处理)
in
means the parameter is supplied by you,out
means it's returned by the function,opt
means optional (can be 0 — a null pointer or handle)
他们是自动化的语言提示(和为贵,我猜)。
They are hints for automation languages (and for you, I guess).
和 user1793036 <一个href=\"http://stackoverflow.com/questions/24816367/what-is-the-meaning-of-in-and-out-in-documentation-of-any-function#comment38523931_24816367\">observed:
他们是简单的 #define语句
即扩大到没什么,只是帮助文档的功能参数:调用者是否必须提供有效的PARAMS(标签:APIWinHTTP
)的功能工作;不管呼叫者可以选择性地提供缺省值( _In_opt _
);该功能是否会在PARAMS填补回报率( _out _
),还是参数都在传递的价值观和接收值了( _Inout _
)。
They are simple
#defines
that expand to nothing, just to help document the function parameters: whether the caller must provide valid params (_In_
) for the function to work; whether the caller can optionally provide default values (_In_opt_
); whether the function will fill in the params on return (_Out_
), or whether parameter both passes values in and receives values out (_Inout_
).
和克里斯 <一个href=\"http://stackoverflow.com/questions/24816367/what-is-the-meaning-of-in-and-out-in-documentation-of-any-function#comment38523950_24816367\">observed该文件可用:
- 文档这些可从MSDN。
- The documentation for these is available from MSDN.
这篇关于什么是标签:APIWinHTTP和_Out_的任何职能的文档的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!