TCP Connection

Trying to make TCP connection in kernel using sample got from this group.
But I always get error as STATUS_EA_LIST_INCONSISTENT.

Here is code snippet:
TdiNameLength = TDI_CONNECTION_CONTEXT_LENGTH;
TdiName = TdiConnectionContext;
RtlInitUnicodeString(&uName, L"\Device\Tcp");
dEaLength = sizeof (FILE_FULL_EA_INFORMATION) + TdiNameLength;
pEaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool,
dEaLength);

pEaInfo->NextEntryOffset = 0;
pEaInfo->Flags = 0;
pEaInfo->EaNameLength = TdiNameLength;
pEaInfo->EaValueLength = 0;
RtlCopyMemory(pEaInfo->EaName, TdiName, pEaInfo->EaNameLength + 1);

OBJECT_ATTRIBUTES ObjectAttrib; // local
object attribute
IO_STATUS_BLOCK IoStatusBlock; // local
io status return

InitializeObjectAttributes( &ObjectAttrib, // return
object attribute
&uName, // resource name
OBJ_CASE_INSENSITIVE, // attributes
NULL, // root directory
NULL ); // security descriptor
dStatus = ZwCreateFile (
phTransport, // return file handle
GENERIC_READ | GENERIC_WRITE, // desired access
&ObjectAttrib, // local object attribute
&IoStatusBlock, // local io status
0L, // initial allocation size
FILE_ATTRIBUTE_NORMAL, // file attributes
FILE_SHARE_READ | FILE_SHARE_WRITE, // share access
FILE_OPEN_IF, // create disposition
0L, // create options
pEaInfo, // eabuffer
dEaLength ); // ealength
if ( NT_SUCCESS ( dStatus ) ) // check
for valid return
{
dStatus = ObReferenceObjectByHandle ( //
reference file object
*phTransport, // handle to open file
GENERIC_READ | GENERIC_WRITE, // access mode
NULL, // object type
KernelMode, // access mode
(PVOID *)ppTransportObject, // pointer to
object
NULL ); // handle information
if ( !NT_SUCCESS ( dStatus ) )
{
ZwClose ( *phTransport ); // close
handle
}
}

ExFreePool ( pEaInfo ); // free
buffer