Hi,
I wrote a touchpad driver on wince 5.0. I have problem in loading the
driver. I get the below message on loading the dll.

DEVICE!CreateDevice: illegal entry point combination in driver DLL
'touchpad.dll'

Could anyone help me to resolve this problem.

Thanks,
Shiju

Re: Problem loading driver in wince 5 by Geoff

Geoff
Fri Dec 22 15:25:41 CST 2006

show us your sources file and your def file.

Re: Problem loading driver in wince 5 by Shiju

Shiju
Fri Dec 22 15:53:55 CST 2006

Hi,
Here is my dll entry point in the driver code.

BOOL WINAPI
DllEntry(
HANDLE hDllHandle,
DWORD dwReason,
LPVOID lpReserved
)
{
switch (dwReason) {
case DLL_PROCESS_ATTACH:
DEBUGREGISTER((HINSTANCE)hDllHandle);
DEBUGMSG(ZONE_INIT, (_T("%s: Attach\r\n"), pszFname));
DisableThreadLibraryCalls((HMODULE) hDllHandle);
break;

case DLL_PROCESS_DETACH:
DEBUGMSG(ZONE_INIT, (_T("%s: Detach\r\n"), pszFname));
break;

default:
break;
}
return TRUE ;
}

And below is my .def file,

LIBRARY TOUCHPAD

EXPORTS
DllEntry
TPD_Init
TPD_Deinit

Thanks,
Shiju

Geoff wrote:
> show us your sources file and your def file.

Re: Problem loading driver in wince 5 by Bruce

Bruce
Fri Dec 22 16:38:36 CST 2006

Are you writing a stream interface driver? If so, you need **ALL** of the
other stream interface entry points, that is XXX_*

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Shiju" <mshiju@gmail.com> wrote in message
news:%23NoQuOhJHHA.5000@TK2MSFTNGP03.phx.gbl...
> Hi,
> Here is my dll entry point in the driver code.
>
> BOOL WINAPI
> DllEntry(
> HANDLE hDllHandle,
> DWORD dwReason,
> LPVOID lpReserved
> )
> {
> switch (dwReason) {
> case DLL_PROCESS_ATTACH:
> DEBUGREGISTER((HINSTANCE)hDllHandle);
> DEBUGMSG(ZONE_INIT, (_T("%s: Attach\r\n"), pszFname));
> DisableThreadLibraryCalls((HMODULE) hDllHandle);
> break;
>
> case DLL_PROCESS_DETACH:
> DEBUGMSG(ZONE_INIT, (_T("%s: Detach\r\n"), pszFname));
> break;
>
> default:
> break;
> }
> return TRUE ;
> }
>
> And below is my .def file,
>
> LIBRARY TOUCHPAD
>
> EXPORTS
> DllEntry
> TPD_Init
> TPD_Deinit
>
> Thanks,
> Shiju
>
> Geoff wrote:
>> show us your sources file and your def file.



Re: Problem loading driver in wince 5 by Shiju

Shiju
Fri Dec 22 16:47:03 CST 2006

Hi,
This is not a stream interface driver. This is a touchpad (pointing
device) device connected to the i2c lines. All I intend to do is to read
packets from the i2c lines and call mouse_event().

Thanks & Regards,
Shiju
Bruce Eitman [eMVP] wrote:
> Are you writing a stream interface driver? If so, you need **ALL** of the
> other stream interface entry points, that is XXX_*
>

Re: Problem loading driver in wince 5 by Geoff

Geoff
Fri Dec 22 17:00:54 CST 2006

I really wanted to see your 'sources' file, note that the sources file
controls the build, as opposed to the source for containing the C code.

Touch drivers are not streams drivers. They implement a different API set.

See the documentation here:
Developing a Device Driver > Windows CE Drivers > Touch Screen Drivers >
Touch Screen Driver Reference

If you link to the stock tchmdd.lib then you need to implement the PDD
interface - that is the ddsi functions in your code.

If you want to supply the entire driver then you need to implement the
Touch MDD interface:

TouchPanelpDetach
TouchPanelpAttach
TouchPanelpISR
TouchPanelGetDeviceCaps
TouchPanelSetMode
TouchPanelPowerHandler
TouchPanelEnable
TouchPanelDisable
TouchPanelReadCalibrationPoint
TouchPanelReadCalibrationAbort




Examine one of the samples in the platform tree for guidance.

Geoff
--

Re: Problem loading driver in wince 5 by Shiju

Shiju
Fri Dec 22 17:15:31 CST 2006

Hi,
Below is my sources file.

INCLUDES=..\inc;$(INCLUDES)


TARGETNAME = TOUCHPAD
TARGETDEFNAME = TOUCHPAD
RELEASETYPE=PLATFORM
TARGETTYPE=DYNLINK
DLLENTRY=DllEntry

DEFFILE=$(TARGETDEFNAME).def

TARGETLIBS= \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
$(_TARGETPLATROOT)\lib\$(_CPUDEPPATH)\cspddk.lib \

SOURCES= \
touchpad.cpp

This is not a touchscreen driver. This a touchpad device and functions
similar to a mouse. This is connected to i2c lines.

Thanks,
Shiju
Geoff wrote:
> I really wanted to see your 'sources' file, note that the sources file
> controls the build, as opposed to the source for containing the C code.
>
> Touch drivers are not streams drivers. They implement a different API set.
>
> See the documentation here:
> Developing a Device Driver > Windows CE Drivers > Touch Screen Drivers >
> Touch Screen Driver Reference
>
> If you link to the stock tchmdd.lib then you need to implement the PDD
> interface - that is the ddsi functions in your code.
>
> If you want to supply the entire driver then you need to implement the
> Touch MDD interface:
>
> TouchPanelpDetach
> TouchPanelpAttach
> TouchPanelpISR
> TouchPanelGetDeviceCaps
> TouchPanelSetMode
> TouchPanelPowerHandler
> TouchPanelEnable
> TouchPanelDisable
> TouchPanelReadCalibrationPoint
> TouchPanelReadCalibrationAbort
>
>
>
>
> Examine one of the samples in the platform tree for guidance.
>
> Geoff
> --

Re: Problem loading driver in wince 5 by Geoff

Geoff
Tue Dec 26 12:20:48 CST 2006


Like Bruce said, you need to implement the correct entry points. You
don't need them all though, look at devload.c in the private tree:

"Make sure that the driver has an init and deinit routine. If it is
named,it must have open and close, plus at least one of the I/O routines
(read, write ioctl, and/or seek). If a named driver has a pre-close
routine, it must also have a pre-deinit routine."

Geoff
--

RE: Problem loading driver in wince 5 by Bill

Bill
Wed Mar 21 01:36:03 CDT 2007

well, focusing your .reg file. There is a "Prefix" name in .reg file.

The value of "Prefix" + "_" + export routine name in your .def file == The
real name of implement in your source code.

for example:

mytest.reg:

[HLM\Drivers\mytest]
"Prefix"="MT"
....

mytest.def:
LIBRARY mytesting

EXPORTS
Init
Deinit
......

mytest.c:

extern "C" DWORD MT_Init(...) ///HERE, The name must be MT_Init, not Init.
{
.....
}

So, The entry name in .def file isn't consist with the routine name in the
implement.
which lead to the problem.




"Shiju" wrote:

> Hi,
> I wrote a touchpad driver on wince 5.0. I have problem in loading the
> driver. I get the below message on loading the dll.
>
> DEVICE!CreateDevice: illegal entry point combination in driver DLL
> 'touchpad.dll'
>
> Could anyone help me to resolve this problem.
>
> Thanks,
> Shiju
>