|
From: mirage2k2 on 8 May 2008 20:13 I have always performed I/O between user mode and kernel mode via traditional IOCTRL. I have seen examples where named pipes have been used. My understanding is that using named pipes is possible but non-standard and should be avoided. Any comments. mirage
From: Kerem G�mr�kc� on 8 May 2008 22:00 Hi Mirage, afaik this is possible with calls that are (afaik officially) undocumented and part. documented kernel calls. You can open e.g a Userland Pipe with ZwCreateFile or even create pipes with ZwCreateNamedPipeFile/NtCreateNamedPipeFile (both in ntdll.dll) but i higly recommend (as others will do so i hope) that you should stay at IOCTRL's and other standard Read/Write Operations that are well documented,...and standartized! You will never know, what happens to undocumented calls after next OS release, Service Packs, etc,...i wont use functions like these,... >I have always performed I/O between user mode and kernel mode via >traditional > IOCTRL. Still stay on them. Try not to use any undocumented stuff,... Regards Kerem -- ----------------------- Beste Gr�sse / Best regards / Votre bien devoue Kerem G�mr�kc� Microsoft Live Space: http://kerem-g.spaces.live.com/ Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "This reply is provided as is, without warranty express or implied." "mirage2k2" <mirage2k2(a)discussions.microsoft.com> schrieb im Newsbeitrag news:18A478BD-1DA6-478A-9B7B-A0C1029D207F(a)microsoft.com... >I have always performed I/O between user mode and kernel mode via >traditional > IOCTRL. I have seen examples where named pipes have been used. My > understanding is that using named pipes is possible but non-standard and > should be avoided. Any comments. > > mirage
From: Maxim S. Shatskih on 9 May 2008 02:54 Actually, pipes in Windows are badly implemented and I should avoid them. For instance, GetFileType on a pipe _hangs_ if there is a pending read request, which, BTW, causes the DLL load to hang sometimes, since the C runtime startup in the DLL calls GetFileType on all known handles while setting up the file descriptor table for open/fopen. The complexity of ZwCreateFile for named pipe, together with lots of different flags which influence the pipe's behaviour, makes the good old IOCTL way by far more simple. Performance also should be better with IOCTLs, since the pipe way is just more code between user and kernel components (the whole NPFS). -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim(a)storagecraft.com http://www.storagecraft.com "mirage2k2" <mirage2k2(a)discussions.microsoft.com> wrote in message news:18A478BD-1DA6-478A-9B7B-A0C1029D207F(a)microsoft.com... > I have always performed I/O between user mode and kernel mode via traditional > IOCTRL. I have seen examples where named pipes have been used. My > understanding is that using named pipes is possible but non-standard and > should be avoided. Any comments. > > mirage
From: Tim Roberts on 9 May 2008 22:51 mirage2k2 <mirage2k2(a)discussions.microsoft.com> wrote: > >I have always performed I/O between user mode and kernel mode via traditional >IOCTRL. I have seen examples where named pipes have been used. My >understanding is that using named pipes is possible but non-standard and >should be avoided. Any comments. I agree with Maxim. I actually implemented a user/kernel pair that used named pipes, and in the end I tore it out and implemented an ioctl scheme. Too many special cases to handle. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Kerem G�mr�kc� on 9 May 2008 23:29
Hi Tim, >Too many special cases to handle. Can you tell some special cases that must be taken care of, please,... I did not use any kernel pipe stuff for inter driver communication yet. So what do we have to take care of or what special cases can someone expect,...? Regards Kerem -- ----------------------- Beste Gr�sse / Best regards / Votre bien devoue Kerem G�mr�kc� Microsoft Live Space: http://kerem-g.spaces.live.com/ Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "This reply is provided as is, without warranty express or implied." "Tim Roberts" <timr(a)probo.com> schrieb im Newsbeitrag news:2t6a24lpvicge63ripcjerbu9pjr3igssp(a)4ax.com... > mirage2k2 <mirage2k2(a)discussions.microsoft.com> wrote: > > > >I have always performed I/O between user mode and kernel mode via traditional > >IOCTRL. I have seen examples where named pipes have been used. My > >understanding is that using named pipes is possible but non-standard and > >should be avoided. Any comments. > > I agree with Maxim. I actually implemented a user/kernel pair that used > named pipes, and in the end I tore it out and implemented an ioctl scheme. > Too many special cases to handle. > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. |