From: Rolf K. <rol...@ci...> - 2004-03-25 08:44:13
|
Hi Derrick Swinarsky, DJ Derrick (5453) @ IS wrote: >Well... I didn't even see the pipes VIs and I have an application that needs the >same functionality. I don't mind helping out with these, but need to know what >is/isn't working... I have downloaded all the VIs and in the pipes directory under >cvs as well as the dll. I do not have Visual C++ so I won't be much help with the >dll (though I do have cygwin if it can make the dlls?). Not sure about cygwin use here. As I have Visual C available at my workplace I haven't felt much compelling reasons to go through the hassle of installing and getting cygwin to work. As to the dll: There are certainly several things to consider. First the currently available C code is really only a very rough draft of what the DLL should be in the end. Also the main important function with the system exe + std IO + std err pipes is not yet filled in, eventhough I have the code from both the Turtoise CVS function and the MSDN example here to draw from. Named pipes will only work on NT based Windows systems. So the simple Open function will fail on Win 9x/Me systems. Little we can do about this as Win9x just doesn't know about named pipes at all. Last but not least is it very likely that the Win32 API ReadFile() function will not behave as desired on pipe handles as in default mode it just seems to block for as long as necessary to get the requested data. For this we have to investigate a little into this. Possible solutions in order of preference: 1) Using overlapped read mode (this is the MSDN term for in principle asynchronous file IO) in ReadFile() might give us enough functionality in order to investigate both the error status of the pipe and the number of available bytes in the buffer, to abort the overlapped read mode immediately and retrieve the available data or return with an according error. 2) Creating a seperate thread to monitor the pipe handle(s). This is ugly but was the route Ian and his friends appearently decided to go in the Turtoise CVS solution. Problem is I have also a life besides of the computer programming and that is currently interfering heavily, so things on the pipe source code do not go as fast as I would like it myself. Rolf Kalbermatter CIT Engineering Nederland BV tel: +31 (070) 415 9190 Treubstraat 7H fax: +31 (070) 415 9191 2288 EG Rijswijk http://www.citengineering.com Netherlands mailto:rol...@ci... |