Problem in Opening a Connection Endpoint on Vista...

My code to open the Transport Address executed successfully. But I am facing a problem while opening a Connection Endpoint on Vista.

I am creating a UNICODE_STRING data structure from a unicode string L"\Device\Tcp"
and then creating an OBJECT_ATTRIBUTES data structure TdiDriverNameAttributes from a UNICODE_STRING.

Then I initialize the Extended Attributes data structure members as follows.
RtlCopyMemory(&ExtendedAttributesInformation->EaName,
TdiConnectionContext, TDI_CONNECTION_CONTEXT_LENGTH);

ExtendedAttributesInformation->EaNameLength = (sizeof (TdiConnectionContext) - 1)
ExtendedAttributesInformation->EaValueLength = (sizeof (TdiConnectionContext) - 1).

My call to ZwCreateFile completes with STATUS_INVALID_PARAMETER.

ZwCreateFile(&hConnection,
FILE_READ_EA | FILE_WRITE_EA,
&TdiDriverNameAttributes,
&IoStatusBlock,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
0,
ExtendedAttributesInformation,
EASize
);

May I know the reason for failure? The same code is working fine on 2K & XP OS.
Only on vista I came across this behavior.

Thanks.

SBU: TDI - Opening TCP connection endpoint problem on Vista…

Hi All,

Any clue regarding this?

Thanks in advance…

B