[Mono-dev] DriveInfo implementation
Javier Martín
lordhabbit at gmail.com
Wed Dec 5 15:28:14 EST 2007
Ok, this last nut of wisdom from Robert has really fueled me up. It's
quite nice to be back from class and find such good news lying on my
mailbox. So, I'm starting with the Windows version first. Since this
will be the first time I delve into the depths of the runtime's
support code, I've written a small checklist with what I'll do where
so that any accidental receiver of this list can spot the probable
mistakes that my usually astounding lack of judgment is certain to
cause x_x
--ON WINDOWS--
1.- DriveInfo.cs - create a "external" method with the appropiate
MethodImplAttribute flagging it as an internal call.
2.- icall-def.h - define the new internal call, possibly MONOIO_34,
and route it to a new function
3.- icall.c - implement the said function, calling only ANSI C and
Win32 APIs. Be careful not to dereference NULLs, corrupt memory, etc,
since mommy GC & daddy runtime are not here to help
4.- build and check everything is sane. Compare to M$'s results
--ON LINUX--
5.- some file in io-layer, possibly io.c - implement POSIX-based
substitutes to the missing Win32 functions/structs/etc I've used
6.- $thatLastFile.h - expose the Win32 prototypes I've used
7.- build and check everything is sane. Compare to both mono-win and
MS-win results
--HAPPY ENDING--
Seems easy at first, but I suppose it's neither a piece-of-cake nor an
impossible mission. Well, tomorrow is a holiday here in Spain, so I
can hack the whole day.
Habbit
More information about the Mono-devel-list
mailing list