Upender
Tue Jan 02 16:41:43 CST 2007
You have to use a separate worker dll which will call MessageBoxW on behalf
of kernel mode driver. The reason is the following: function prototype for
MessageBoxW is different from the function prototype which CeCallUserProc is
going to call.
Internally CeCallUserProc does the following:
a) Loads the worker dll passed into the CeCallUserProc function
b) Gets the entry point to the function in the worker dll whose name is
given in CeCallUserProc. This entry point should have the following format:
typedef BOOL (*PFN_UIENTRYPOINT)
(
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
PDWORD pBytesReturned
);
c) Once the function call returns from the worker dll, CeCallUserProc copies
the results back to the caller in the [out] arguments.
So for your specific question you would need to write a dll (foo.dll let us
say) which exports one function of type PFN_UIENTRYPOINT listed above. In
that function implementation, it can call MessageBoxW and return the
response back to the caller in the lpOutBuffer.
Sue wrote a blog entry with a brief description on this API. You can find
that article here:
http://blogs.msdn.com/ce_base/archive/2006/11/09/CE6-Drivers_3A00_-What-you-need-to-know.aspx
--
Upender R. Sandadi [MS]
upenders@online.microsoft.com.removeonlinewordinemail
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no
rights.
_____________________________________________________________
"abc" <embsite@163.com> wrote in message
news:1167558981.672520.111380@48g2000cwx.googlegroups.com...
> How to passed arguments to CeCallUserProcUse when call MessageBox
> function of coredll.dll?
>
> because display message box only, I should create dll application and
> display message, it seem simple?
>