什么是__in和WSAAPI? [英] what is __in and WSAAPI?

查看:814
本文介绍了什么是__in和WSAAPI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在msdn中看到一个套接字的定义如下:

I saw in the definition of a socket in msdn the following:

SOCKET WSAAPI socket(
  __in  int af,
  __in  int type,
  __in  int protocol
);

前缀__in是什么意思?

What is the prefix "__in" mean?

和什么是WSAAPI?

and what is WSAAPI ?

推荐答案

)指定每个参数的预期用途,以便可以机械检查对该函数的调用。

__in (and friends) specify the intended use of each parameter, so that calls to that function may be mechanically checked.

请参阅 http://msdn.microsoft.com/en-us/library/aa383701(v = vs.85).aspx 如何激活检查。

http://msdn.microsoft.com/en-us/library/ms235402.aspx 介绍了现代的替代方案。

http://msdn.microsoft.com/en-us/library/ms235402.aspx describes the modern alternative.

WSAAPI 扩展为用于套接字库函数的调用约定。这可以确保调用函数的代码正确生成,即使调用代码设置为使用不同的调用约定构建。

WSAAPI expands to the calling convention used for the socket library functions. This ensures that the code for calls to the functions are generated correctly, even if the calling code is set to build with a different calling convention.

这篇关于什么是__in和WSAAPI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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