HANDLE作为返回类型 [英] HANDLE as return type

查看:138
本文介绍了HANDLE作为返回类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。 HANDLE可以作为函数的返回类型吗?如果是这样,由于没有HANDLE功能(无效)这样的东西,它是如何实现的?谢谢。

Hi. Can HANDLE be a return type for function? If so, how it can be achieved since there is no such thing as "HANDLE function (void)" ? Thanks.

推荐答案

也许你应该在这里阅读: http:/ /en.wikibooks.org/wiki/Windows_Programming/Handles_and_Data_Types [ ^ ]



如果你想看这里,实际上定义了一大堆句柄类型:http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v = vs.85%29.aspx [ ^ ] 注意:在列表中向下滚动,单词以H开头。



干杯!
Maybe you should read here: http://en.wikibooks.org/wiki/Windows_Programming/Handles_and_Data_Types[^]

There are actually a whole bunch of handle types defined if you care to look here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx[^] Note: Scroll down in the list to where the words start with an H.

Cheers!


引用:

嗨。可以把HANDLE作为函数的返回类型吗?

Hi. Can HANDLE be a return type for function?



是的。








Yes.



Quote:

如果是这样,那么如何实现它,因为没有HANDLE function(void)这样的东西?

If so, how it can be achieved since there is no such thing as "HANDLE function (void)" ?



这是假的。例如,Windows API的函数 CreateFile 返回 HANDLE


这篇关于HANDLE作为返回类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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