📄 wpw_w32_file_95.html
字号:
<HTML>
<HR><A NAME=WIN32_file_name_pipe>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: Problem with name pipe.</H4><PRE>
Kees Verruijt <kees@redwood.nl> wrote:
>I tried the WaitForSingleObject call but that returns immediately,
>even when there is nothing in the pipe. Next I tried PeekNamedPipe
>which can be used for anonymous pipes as well according to the
>online ref, and use the message argument to count the number of
>unread bytes.
I've not tried exactly what you're trying to do. But I've done it
using sockets.
You don't say exactly what you're calling the WaitForSingleObject
function with. It should be an event handle that was passed either to
ReadFile or WriteFile in the OVERLAPPED structure. The ReadFile and
WriteFile functions will return immediately, however the request may
be satisfied or not, you have to check the results of the function.
Then you call WaiitForSingleObject with the event handle and a
timeout. The function will wait until there is data enough to satisfy
the request.
David
bradley@erinet.com
</PRE>
<HR><A NAME=WIN32_file_RamDisk>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: Writing a ramdisk problem in WinNT</H4><PRE>
In article <3u5p0f$nj@news.sietec.de>
neu@d243f884.sietec.de "Joachim Neu" writes:
>I want to implement an driver for an additional drive in Windows NT.
>Has anybody sample sources for e.g. a ramdrive driver for Windows NT ?
>Or knows a good book about driver development for Windows NT ?
The NT DDK includes a ramdisk as one of the sample drivers. This is
supplied as a part of the Level II MSDN program, and is essential if
you're into such things as driver development. Don't even THINK about
developing a driver without the DDK!
Chris
--
--------------------------------------------------------------------------
| Chris Marriott, Warrington, UK | Author of SkyMap v2 shareware |
| chris@chrism.demon.co.uk | astronomy program for Windows. |
| For more info, see http://www.winternet.com/~jasc/skymap.html |
| Author member of Association of Shareware Professionals (ASP) |
--------------------------------------------------------------------------
</PRE>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -