Hi Jan,
I used the “int GetAddressLptPortInTheMemory(int myPort)” function as described in
http://www.janaxelson.com/jansfaq.htmin a Cbuilder5 project running in Windows 98 and it works fine there.
Now I would like to apply the same code in the same CBuilder 5 application but running in Windows XP.
But:
int portAddresses[]={0,0,0,0,0};
BOOL rtn=0;
DWORD cbLen=0;
rtn = myProcPointer
(0,
(LPCVOID *) 0x408,
portAddresses,
8,
NULL) ;
==>> rtn results in 0 in Windows XP
I read in the same article:
Q: If a logic 1 is written to the Control Port, bit 0, (Strobe), the PC clears all of the port bits once every five seconds for about a minute.
A: Some versions of Windows XP look for devices by periodically writing to the port. A registry key can disable this behavior.
The following registry setting disables the port writes:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]"DisableWarmPoll"=dword:00000001
The following registry setting enables the port writes:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]"DisableWarmPoll"=dword:00000000
Indeed RegEdit tells me”: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]"DisableWarmPoll"=dword:00000001
My question: if I change this to
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]"DisableWarmPoll"=dword:00000000
I might misinterpret that text but do you mean with that, that the “int GetAddressLptPortInTheMemory(int myPort)” function workes fine then?
I’m willing to change the regsitry ONLY when I’m sure that it is necessary and safe.
Vriendelijke groeten / Bien cordialement / Best regards, Henny Barten