From: Sada on
Hi

I'm building wireless lan adapter control application using NdisProt.
when I set value, some of OIDs work but others does not.
I think using DeviceIoControl is incorrect but I can't find the solution.

success OIDs are:
OID_802_11_AUTHENTICATION_MODE
OID_802_11_DISASSOCIATE
OID_802_11_INFRASTRUCTURE_MODE

fail OIDs are:
OID_802_11_ADD_WEP
-> success? or ERROR_INVALID_PARAMETER 87L depend on the device.
OID_802_11_SSID
-> returns ERROR_INVALID_USER_BUFFER 1784L

code for set oid value:

PNDISPROT_SET_OID pSetOid;
char Buf[ENOUGH_SIZE]
PVOID pInData; // pointer to NDIS_802_11_SSID, WEP or etc..
DWORD nData; // sizeof pInData
DWORD nCount;

pSetOid = (PNDISPROT_SET_OID)Buf;
pSetOid->Oid = ulOid;
if(pInData != NULL && nData != 0) {
::memcpy((void *)pSetOid->Data, pInData, nData);
}
bResult = ::DeviceIoControl(hDev, IOCTL_NDISPROT_SET_OID_VALUE,
pSetOid,
ENOUGH_SIZE,
NULL, 0,
&nCount, NULL);

Thanks

 | 
Pages: 1
Next: WDM Screen Capture Driver