Bug in MSDN: TDI_EVENT_RECEIVE_DATAGRAM & it’s handler

If you ever wanted to handle TDI_EVENT_RECEIVE_DATAGRAM (http://msdn2.microsoft.com/en-us/library/ms801156.aspx) event handler in TDI, you would notice that it’s declaration is a bit strange(http://msdn2.microsoft.com/en-us/library/ms801622.aspx): NTSTATUS ClientEventReceive( IN PVOID TdiEventContext, IN CONNECTION_CONTEXT ConnectionContext, IN ULONG ReceiveFlags, IN ULONG BytesIndicated, IN ULONG BytesAvailable, OUT ULONG *BytesTaken, IN PVOID Tsdu, OUT PIRP *IoRequestPacket ); Guess what? It’s declaration is the …

Continue reading ‘Bug in MSDN: TDI_EVENT_RECEIVE_DATAGRAM & it’s handler’ »

Undefeatable files & folders in Windows XP SP2 – a bug in SHFileOperationW

Recently I was surprised with one interesting behavior of my Windows XP box. I was playing with long name files and noticed that major part of my shell extensions do not work with files, whose path is longer then 260 symbols. I also noticed, that Windows Shell does not allow me to create long file …

Continue reading ‘Undefeatable files & folders in Windows XP SP2 – a bug in SHFileOperationW’ »

The magics of FILE_FLAG_BACKUP_SEMANTICS flag or contradiction in the MSDN library

MSDN: “The FILE_FLAG_BACKUP_SEMANTICS flag specified in the call to CreateFile gives the backup application process permission to read the access-control settings of the file or directory. With this permission, the backup application process can then call GetKernelObjectSecurity and SetKernelObjectSecurity to read and than reset the access-control settings.”. However there is another (undocumented) behavour of FILE_FLAG_BACKUP_SEMANTICS …

Continue reading ‘The magics of FILE_FLAG_BACKUP_SEMANTICS flag or contradiction in the MSDN library’ »