NdisRegisterDeviceEx error 0xC000000D - "STATUS_INVALID_PARAMETER"

I am calling NdisRegisterDeviceEx in my miniport driver in order to create an I/O target for user space I/O operations not performed via the TCP/IP stack. NdisRegisterDeviceEx is returning STATUS_INVALID_PARAMETER. Here is a code snippet:

NDIS_DEVICE_OBJECT_ATTRIBUTES ndo;

//
// Create user I/O device object.
//
for (index = 0; index <= IRP_MJ_MAXIMUM_FUNCTION; index++) {
Adapter->DeviceMajorFunctionTable[index] = NULL;
}

Adapter->DeviceMajorFunctionTable[IRP_MJ_CREATE] = ClassCreateClose;
Adapter->DeviceMajorFunctionTable[IRP_MJ_CLOSE] = ClassCreateClose;
Adapter->DeviceMajorFunctionTable[IRP_MJ_READ] = ClassRead;
Adapter->DeviceMajorFunctionTable[IRP_MJ_WRITE] = ClassWrite;
Adapter->DeviceMajorFunctionTable[IRP_MJ_DEVICE_CONTROL] = ClassDeviceControlDispatch;

ndo.Header.Type = NDIS_OBJECT_TYPE_DEVICE_OBJECT_ATTRIBUTES;
ndo.Header.Revision = NDIS_DEVICE_OBJECT_ATTRIBUTES_REVISION_1;
ndo.Header.Size = NDIS_SIZEOF_DEVICE_OBJECT_ATTRIBUTES_REVISION_1;

NdisInitUnicodeString(
&Adapter->devName,
HSP2GV3_UIO_DEVICE // defined as L"\Device\xxxName"
);

NdisInitUnicodeString(
&Adapter->devLinkName,
HSP2GV3_UIO_SYMLINK // defined as L"\DosDevices\xxxLinkName"
);

NdisInitUnicodeString(
&Adapter->sddlDevString,
HSP2GV3_UIO_SDDL // defined as L"A;;GA;;;SA"
);

ndo.DeviceName = &Adapter->devName;
ndo.SymbolicName = &Adapter->devLinkName;
ndo.MajorFunctions = Adapter->DeviceMajorFunctionTable;
ndo.ExtensionSize = sizeof(MP_ADAPTER);
ndo.DefaultSDDLString = &Adapter->sddlDevString;
ndo.DeviceClassGuid = (LPCGUID)NULL;

Status = NdisRegisterDeviceEx(
MiniportAdapterHandle, // handle provided by NDIS calling MiniportInitializeEx
&ndo,
&Adapter->pUserIoDo,
&Adapter->hDevice
);

Can anyone see what I’m doing wrong?

I use the follow that is different from you and it works fine:

DeviceObjectAttributes.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; // type implicit from the context

You may also try just to see if it works:
DeviceObjectAttributes.DefaultSDDLString = NULL;

Larry C

Thanks Larry! I made both changes and the call succeeds now. Much thanks for the help!