Memory Corruption, Compiler Bug, Or Not?

While tracking down some memory corruption issues, I noticed in one function that a parameter on the stack was always getting set to the value 2, even though it was a pointer. I could see it turn red in the memory view window as its value changed. I thought I had identified a compiler bug….


Windows CE and the Serial Carrier Detect Signal

The Windows CE serial port based networking components have an historical affinity for the RS232 Carrier Detect (CD) signal. A key feature of Windows CE 1.0 was automatic synchronization of email and contacts when docked (ActiveSync). The device needed to detect when it was docked, and it needed to wake up when docked. Since this…


PCMCIA Problems on Windows CE Devices.

I wrote the first PCMCIA driver for Windows CE in 1995. At the time, CE had not been ported to the PC, so we had to rely on reference platforms and prototypes to debug. Some problems were not software related. The first Windows CE reference platform was called PeRP (Pegasus Reference Platform, Pegasus was the…


Windows CE IRDA Architecture

The IrDA related Windows CE components are Irdastk.dll, Ircomm.dll and an IrDA NDIS miniport driver – typically Irsir.dll is used. For platforms with DMA based IrDA hardware, a platform specific IrDA NDIS miniport driver will be used.   Protocol Driver The irdastk.dll component implements the IrDA protocol. It provides support for AF_IRDA Winsock sockets. It…


Configuring TAPI line devices in Windows CE

In Windows CE, TAPI listens for device plug and play notifications. When it gets notified of a new device, it looks in the device driver’s key and subkeys for a REG_SZ value named Tsp. If it is found, it specifies the dll name of a TSP (TAPI Service Provider, for instance, unimodem.dll) to be associated…


TAPI Resource Cleanup

TAPI maintains its resources in a hierarchy and will perform automatic cleanup based on the hierarchy of objects. The top of the TAPI resource hierarchy is the HLINEAPP which represents a TAPI client application instance. It is returned from lineInitialize and lineInitializeEx. If the application calls lineShutdown with its HLINEAPP, then all TAPI resources associated…


TAPI Call Handle Confusion

TAPI call handles (HCALLs) consume memory and should be closed with lineDeallocateCall when no longer needed. If an application has a TAPI line device opened (HLINE), then TAPI will allocate call handles on its behalf in order to indicate call status messages to the application. Such an application needs to be aware of this and…


Pageable Device Drivers

During the Windows Mobile 5.0 timeframe, we changed most of the networking components to be pageable device drivers. This caused boot times to decrease by a significant amount since there was now more than 2MB extra free RAM.   A device driver can safely be made pageable if:    1. it does not need to do…


About David Kanz

I’m David Kanz. I’ve worked at Microsoft since October 19, 1987 – Yes, Black Monday. I initially worked on OS/2 Lan Manager. When the Windows For Workgroups team asked me to join them in 1993, they tried to entice me by talking about Thomas Fenwick’s tiny kernel for handheld devices. I was sold. This was…