Re: illegal entry point in driver while booting OS by Luca
Luca
Wed Feb 06 03:03:19 PST 2008
I think you should take a look to the docs for 'stream interface drivers':
you must use a 'three letters' string for "Prefix" in
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\DIPSWITCH]
If you set, for example, "Prefix"="DIP" then you must export DIP_Init,
DIP_Deinit, etc
--
Luca Calligaris
www.eurotech.it
"kracks" <kirthikaiitm@gmail.com> ha scritto nel messaggio
news:05aa9ce4-9b16-4f52-bab4-5ca02455e8e8@q21g2000hsa.googlegroups.com...
On Feb 5, 11:03 pm, "Luca Calligaris"
<anonym...@discussions.microsoft.com> wrote:
> It looks like the registry entry for dipswitch.dll have no 'Prefix' value
> and/or you are not exporting all the required stream interface driver
> entry
> points: post your .reg and .def files for dipswitch
>
> --
>
> Luca Calligariswww.eurotech.it
>
> "kracks" <kirthikai...@gmail.com> ha scritto nel
> messaggionews:a5ff0cfa-78f9-468b-9a2d-2c6fbf779b81@n20g2000hsh.googlegroups.com...
>
>
>
> > Hi,
> > While booting wince 5.0 in which i have a driver named dipswitch.dll
> > i am getting the following error messaged while booting OS.
>
> > DIPSWITCH: DLL_PROCESS_ATTACH
> > DIPSWITCH : DLL_PROCESS_ATTACH
> > DEVICE!CreateDevice: illegal entry point combination in driver DLL
> > 'dipswitch.dll'
> > DIPSWITCH: DLL_PROCESS_DETACH
> > CreateDevice: creation of type '<unnamed>', index -1, lib
> > 'dipswitch.dll' returning 0x00000000, error code 1
> > DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1,
> > dll dipswitch.dll, context 0x802e7dc
>
> > Please suggest me regarding this issue.
>
> > Regards,
> > Kirthika- Hide quoted text -
>
> - Show quoted text -
Hi,
My .def file is
LIBRARY DIPSWITCH
EXPORTS
DIPSWITCH_Init
DIPSWITCH_Deinit
DIPSWITCH_Open
DIPSWITCH_Close
DIPSWITCH_Read
DIPSWITCH_Write
DIPSWITCH_Seek
DIPSWITCH_IOControl
DIPSWITCH_PowerDown
DIPSWITCH_PowerUp
My Source File is
TARGETNAME=dipswitch
RELEASETYPE=PLATFORM
TARGETTYPE=DYNLINK
TARGETLIBS= \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
DEFFILE=DipSwitch.def
PREPROCESSDEFFILE=1
DLLENTRY=DllEntry
SOURCES=DIPSWitch.c
My platform.reg is
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\DIPSWITCH]
"Prefix"="DIPSWITCH"
"Dll"="dipswitch.dll"
"Order"=dword:1
My platform.bib is
dipswitch.dll $(_FLATRELEASEDIR)\dipswitch.dll NK
SH
My Source code :
Dll Entry Function
PUBLIC BOOL WINAPI DllEntry(HANDLE hInstDll, DWORD dwReason, LPVOID
lpvReserved)
{
switch ( dwReason )
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls((HMODULE) hInstDll);
break;
}
return (TRUE);
}
My Init Routine with thread creating
DWORD DIPSWITCH_Init(DWORD dwContext)
{
RETAILMSG(1, (TEXT("::: DIPSWITCH_Init\r\n")));
AllocateIOP();
gThreadDIPSWITCH = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)
ThreadDIPSWITCH, 0, 0, NULL);
return TRUE;
}
Please suggest.
Regards,
Kiruthika