Use coredll.lib in kernel
- From: "Platman42" <m.zhengzh@xxxxxxxxx>
- Date: 9 Jan 2007 14:02:29 -0800
Dear all,
I am writing a dll driver, which will be loaded by the application into
kernel by using LoadKenrnelLibrary(). In this dll driver, I need to
access registry to get PCI bus address, translate it into virtual
address. This address actually corresponds to a register. After I get
this virtual address, I will use READ_REGISTER_UCHAR to read this
register.
1. This is a normal way if we code it in the user mode. However, it's
difficult in my case because I need to load this dll into kernel. If I
link my code with coredll.lib, I can compile and build it. But
LoadKernelLibrary() will fail.
2. I am using Windows CE 4.2. I heard that 6.0 will have kernel
coredll.lib version, which can be loaded into kernel. Can I do
something in 4.2 to also load kernel version coredll.lib?
3. I also heard that somebody used SC_LoadLibrary() in dll to load
coredll.lib, then use GetProcAddress() to access those functions. Does
4.2 have this function? Does it need some special library? I tried it,
but SC_LoadLibrary() gave me "unresolved external symbol" errors.
4. Also, some posts mentioned NKRegOpenKeyEx() can be used in kernel.
But it needs to link to nk.lib. I am building this dll in eMVC, not
platform builder. And I don't have intention to build this dll into the
image. So, if I want to use NKRegOpenKeyEx(), how can I link it to
nk.lib? It seems that I need lots of other libraries, such as hal.lib,
kitleth.lib etc. Even I linked several those libraries in my project, I
still got "unresolved external symbol" errors for some functions I
don't want to use. They are actually pointing to some functions in the
libraries I linked.
Can somebody give me a hint how to do this?
Thank you very much
Platman42
.
- Prev by Date: Re: platform builder 4.2 debugger cannot connect to target
- Next by Date: Re: Use coredll.lib in kernel
- Previous by thread: Re: Use coredll.lib in kernel
- Next by thread: platform builder 4.2 debugger cannot connect to target
- Index(es):
Relevant Pages
|
Loading