返回的可能性(带参数???) [英] Possibilities of Return (with parameters???)

查看:59
本文介绍了返回的可能性(带参数???)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在编写一个文件系统过滤器驱动程序,我在一个例子中找到了

这句话:


if(VALID_FAST_IO_DISPATCH_HANDLER (fastIoDispatch,FastIoRead)){


return(fastIoDispatch-> FastIoRead)(

FileObject,

FileOffset,

长度,

等等,

LockKey,

缓冲区,

IoStatus,

nextDeviceObject);

}

------------------------ --------

我从未见过这种回归。这是做什么的?为什么它b / b
有这么多参数?它可以成为常规吗?


提前致谢。

Hello, I''m writing a file system filter driver and I''ve found in an example
this sentence:

if (VALID_FAST_IO_DISPATCH_HANDLER( fastIoDispatch, FastIoRead )) {

return (fastIoDispatch->FastIoRead)(
FileObject,
FileOffset,
Length,
Wait,
LockKey,
Buffer,
IoStatus,
nextDeviceObject );
}
--------------------------------
I''ve never seen this type of ''return''. What is it doing here? Why does it
have so much parameters? Can it be a routine?

Thanks in advance.

推荐答案

noe< no *** **@mixmail.com>潦草地写道:
noe <no*****@mixmail.com> scribbled the following:
你好,我正在写一个文件系统过滤器驱动程序,我在一个例子中找到了这句话:
if(VALID_FAST_IO_DISPATCH_HANDLER(fastIoDispatch, FastIoRead)){
return(fastIoDispatch-> FastIoRead)(
FileObject,
FileOffset,
长度,
等等,
LockKey,缓冲区,
IoStatus,
nextDeviceObject);
}


----------------- ---------------
我从未见过这种回归。这是做什么的?为什么它有这么多参数?这可以成为常规吗?
提前致谢。
Hello, I''m writing a file system filter driver and I''ve found in an example
this sentence: if (VALID_FAST_IO_DISPATCH_HANDLER( fastIoDispatch, FastIoRead )) { return (fastIoDispatch->FastIoRead)(
FileObject,
FileOffset,
Length,
Wait,
LockKey,
Buffer,
IoStatus,
nextDeviceObject );
}
--------------------------------
I''ve never seen this type of ''return''. What is it doing here? Why does it
have so much parameters? Can it be a routine? Thanks in advance.




这是一个函数调用返回语句。这相当于:


TYPE tmp =(fastIoDispatch-> FastIoRead)(

FileObject,FileOffset,Length,Wait,LockKey,Buffer, IoStatus,

nextDeviceObject);

返回tmp;


其中TYPE是函数的适当返回类型。


调用的函数本身未在此处命名 - 而是由(fastIoDispatch-> FastIoRead)中的指针指向

。假设

需要这么多参数。


-

/ - Joona Palaste(pa *** **@cc.helsinki.fi)-------------芬兰-------- \

\-- http://www.helsinki.fi/~palaste ---------- -----------规则! -------- /

在狗的外面,一本书是男人最好的朋友。无论如何,在狗的内心,它太黑了



- Groucho Marx



It''s a function call in a return statement. It''s equivalent to:

TYPE tmp = (fastIoDispatch->FastIoRead)(
FileObject, FileOffset, Length, Wait, LockKey, Buffer, IoStatus,
nextDeviceObject);
return tmp;

where TYPE is the appropriate return type of the function.

The function itself that is called is not named here - instead it is
pointed to by the pointer in (fastIoDispatch->FastIoRead). It is assumed
that it takes so many parameters.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Outside of a dog, a book is a man''s best friend. Inside a dog, it''s too dark
to read anyway."
- Groucho Marx


2004年5月25日星期二12:21:29 -0400,noe <无***** @ mixmail.com>写道:
On Tue, 25 May 2004 12:21:29 -0400, "noe" <no*****@mixmail.com> wrote:
你好,我正在写一个文件系统过滤器驱动程序,我在一个例子中找到了这句话:
Hello, I''m writing a file system filter driver and I''ve found in an example
this sentence:



[snip]


我已经回复了你在comp.lang.c ++上的相同帖子。请不要

多帖;如果您/必须/发布到多个群组(并且很少有理由这样做),至少是交叉发布将所有团体包括在你的

To:列表中。

谢谢,

-leor


-

Leor Zolman --- BD软件--- www .bdsoft.com

C / C ++,Java,Perl和Unix的现场培训

C ++用户:下载BD Software的免费STL错误消息解密器:
www.bdsoft.com/tools/stlfilt。 html


在''comp.lang.c'',noe中<无***** @ mixmail.com>写道:
In ''comp.lang.c'', "noe" <no*****@mixmail.com> wrote:
你好,我正在写一个文件系统过滤器驱动程序,我在一个例子中找到了这句话:

if(VALID_FAST_IO_DISPATCH_HANDLER(fastIoDispatch,FastIoRead)){

返回(fastIoDispatch-> FastIoRead)(
FileObject,
FileOffset,
Length,
等待,
LockKey,
缓冲区,
IoStatus,
nextDeviceObject);
}

----------- ---------------------
我从未见过这种回归。这是做什么的?为什么它有这么多参数?它是常规吗?
Hello, I''m writing a file system filter driver and I''ve found in an example
this sentence:

if (VALID_FAST_IO_DISPATCH_HANDLER( fastIoDispatch, FastIoRead )) {

return (fastIoDispatch->FastIoRead)(
FileObject,
FileOffset,
Length,
Wait,
LockKey,
Buffer,
IoStatus,
nextDeviceObject );
}
--------------------------------
I''ve never seen this type of ''return''. What is it doing here? Why does it
have so much parameters? Can it be a routine?




是的,''fastIoDispatch-> FastIoRead''是指向函数的指针。


-

-ed-在这里收到我的电子邮件: http:// marreduspam.com/ad672570

C语言常见问题解答: http://www.eskimo.com/~scs/C-faq/top.html

C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib= c99

FAQ de fclc: http://www.isty-info.uvsq.fr/~rumeau/fclc/



Yes, ''fastIoDispatch->FastIoRead'' is a pointer to a function.

--
-ed- get my email here: http://marreduspam.com/ad672570
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib=c99
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/


这篇关于返回的可能性(带参数???)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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