Dear all,
I create a dll to init GPIO27 interrupt and install a IST in wince. The
IST is to capture the falling edge of GPIO27 in wince.
The following is the DLL program
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID
lpReserved )
{
......
switch( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
RETAILMSG (1, (TEXT(" DLL_PROCESS_ATTACH \r\n")));
//Init GPIO, GPIO27 interrupt, IST subroutine are put here
break;
case DLL_THREAD_ATTACH:
RETAILMSG (1, (TEXT(" DLL_THREAD_ATTACH \r\n")));
break;
case DLL_THREAD_DETACH:
RETAILMSG (1, (TEXT("DLL_THREAD_DETACH \r\n")));
break;
case DLL_PROCESS_DETACH:
RETAILMSG (1, (TEXT(" DLL_PROCESS_DETACH \r\n"))); break;
}//END OF SWITCH
return TRUE;
}
Also in the registry, I modify as below
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\GPIO27INT\]
"Dll"="GPIO27INT.dll"
During boot time, the DLL loaded. Also "DLL_PROCESS_ATTACH" was got. The
interrupt and IST installed properly. Since there are clock pulse on GPIO27
pin already, the IST was operating. However after "DLL_PROCESS_DETACH", the
IST doesnot work.
Are there anything wrong? Thanks for your reply.