RE: RegisterDevice failed !!!
From: Zhangxiaorou (Zhangxiaorou_at_discussions.microsoft.com)
Date: 12/15/04
- Next message: bytekeeper: "Re: Soft Reset using power button"
- Previous message: wolmFromAustria: "Re: Where To Get It?"
- In reply to: Greenhorn: "RE: RegisterDevice failed !!!"
- Next in thread: Paul G. Tobey [eMVP]: "Re: RegisterDevice failed !!!"
- Reply: Paul G. Tobey [eMVP]: "Re: RegisterDevice failed !!!"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Dec 2004 07:11:02 -0800
In project.reg I have add some key and value as below
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\CTR]
"Prefix"="CTR"
"Dll"="CardDriver.dll"
"Order"=dword:1
And in my source code declare the init function as
DWORD
CTR_Init(
PVOID Context
)
{
RETAILMSG(1,(_T("CTR_Init")));
DEBUGMSG(1,(_T("CTR_Init")));
}
But I can’t receive the message “CTR_Init”, what’s wrong with it ?
Thanks for your help.
Zhangxiaorou
"Greenhorn" wrote:
> Make sure that you set up the registry correctly. If you didn't set the
> Prefix in the registry to match the XXX_INIT function declaration then it
> can't find your init function.
>
> "Zhangxiaorou" wrote:
>
> > Hi all,
> > I want to add a new driver to my CE platform, what I have done as follow:
> > 1.Add a empty dll project to my workspace (PB4.2, CEPC);
> > 2.In the dll project, I have implemented some functions :"Dllmain", "_Init",
> > "_Deinit", "_Open", "_Close", "_Seek", "_PowerUp", "_PowerDown", "_Read",
> > "_Write", "_IOControl";
> > 3.Modify project.reg to load the driver;
> > 4.Build the dll and platform and download to CEPC.
> >
> > when the CE platform load the driver, the driver failed at the
> > "RegisterDevice" step with message "0x83fd5aa8: DEVICE!StartOneDriver
> > RegisterDevice(CTR, 1, CardDriver.dll, 0x802ee5c) failed" .
> > I found that the "dllmain" function has been called, but the function
> > "_Init" hasn’t.
> >
> > I’m a beginner in CE driver develop, any comment is very appreciated.
> >
- Next message: bytekeeper: "Re: Soft Reset using power button"
- Previous message: wolmFromAustria: "Re: Where To Get It?"
- In reply to: Greenhorn: "RE: RegisterDevice failed !!!"
- Next in thread: Paul G. Tobey [eMVP]: "Re: RegisterDevice failed !!!"
- Reply: Paul G. Tobey [eMVP]: "Re: RegisterDevice failed !!!"
- Messages sorted by: [ date ] [ thread ]