win32utils-devel@rubyforge.org
2004-May-20 11:07 UTC
[Win32utils-devel] Latest win32-file commit
All, I''ve committed an alpha version of a win32-file that supports a native open, close and write. I''ve got a couple issues that I was hoping you could help with. First, should we overload these methods? In other words, for the open method, if it''s 1 argument use the default Ruby method, but if it''s 5 arguments (the number of arguments that CreateFile() takes, excluding a security descriptor and a template file) use the native Win32 call. Or should we just give them separate names, e.g. nopen, nwrite, nclose? If we''re going to overload, how do we do it? Rewrite the code using C++? That would be fine with me since we''re assuming VC++ anyway I think. Second, I''m not entirely sure how to handle overlapped IO. If a user passes File::OVERLAPPED | File::NO_BUFFERING, should we automagically pass an overlapped structure to the method? Or should we decree that all write operations are asynchronous? Or perhaps create a separate "write_async" method that calls WriteFileEx()? Please let me know your thoughts. Thanks. Dan