September 08, 2003

Arggggggggggggggggg!

I AM SICK OF UNICODE_STRING POINTERS AND THE LACK OF USEFUL STRING FUNCTIONS IN KERNEL - MODE RUNTIME LIBRARIES.!!

Enough said. You can now go back to your regularly scheduled program.

Posted by SilverStr at September 8, 2003 09:27 PM
Comments

Tell us how you really feel!

Is the availability of useful libs any better in the linux kernel?

Posted by: Arcterex at September 8, 2003 10:48 PM

The kernels differ considerably when you deal with the internal APIs. In Linux using things like kmalloc/kfree and printk are quite easy, as you use raw chunks of data, with the system throwing around simple pointers.

In Windows kernel though, most of the time the data being thrown around is in a UNICODE_STRING format which is actually a pointer to a struct holding a Buffer and a Length field.

But thats survivable, its easy to deal with. I am tired of rolling my frigging routines that really should be available in the kernel. Simple things like strtok and strpbrk. In the Windows kernel, you use their API which typically start Rtl*. As an example, to copy memory you would use the RtlCopyMemory function. But here is the trick. All they did was map a #define of RtlCopyMemory to memcpy! (You can actually see this if you have a copy of ntddk.h hanging around) But calling memcpy is against the rules. *sigh*

What happened to the good ol' days where a byte was a byte, not a word. When a char* was your friend and life was grand. When you knew that pointer math always worked the way you wanted it, not only SOMETIMES when its a wide char pointer and not an ansi one. *sigh* I can't really bitch... its my burden to bare. I just hate wasting time writing perfectly good routines that have existed for eons in the world of C. (Don't get me going on the bit shifting crap I had to do just to get an inet_ntoa function in the kernel)

Time to check in my code and go to bed.

Posted by: SilverStr at September 9, 2003 12:30 AM