I am trying to link a user space library into a windows kernel driver. It has a reference to __iob_func which is part of “libcmt.lib” (user space library).
I don’t have access to this function in winddk. So, I am planning to define a stub for __iob_func which will try to emulate the same functionality as done in user space library.
Does anyone know what __iob_func do? I found the declaration of the function in the header files. But I am not sure what functionality it exactly does.
__iob_func()returns a pointer to the array ofFILEdescriptors that holdsstdin,stdout,stderrand anyFILEobjects opened through the C runtime library. See the MSVC runtime library source_file.c.If your user-space library code actually tries to do much with the C runtime, you’ll probably run into a lot of headaches linking it into your kernel driver. Good luck.