NDISUIO_QUERY_BINDING

From: Johns (johnysmart_at_yahoo.com)
Date: 01/23/05


Date: Sun, 23 Jan 2005 12:02:25 +0530

Hi All,
I am using NDISUIO to query/set the OID values. Inorder to do this, as in
the documentation, I got the handle to the device using CreateFile.
       g_hAdapter = CreateFile(NDISUIO_DEVICE_NAME, GENERIC_READ |
GENERIC_WRITE,
       FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
       NULL););
This returns me a handle. Now I use this handle to make the
IOCTL_NDISUIO_QUERY_BINDING call as shown below:
CHAR Buf[1024];
DWORD dwReturnedBytes;
PNDISUIO_QUERY_BINDING pQueryBinding;

pQueryBinding = (PNDISUIO_QUERY_BINDING)Buf;
 bQueryBinding = DeviceIoControl(g_hAdapter, IOCTL_NDISUIO_QUERY_BINDING,
pQueryBinding,
         sizeof(NDISUIO_QUERY_BINDING),NULL, 1024,
         &dwReturnedBytes, NULL);
I print out all the members of the pQueryBinding and are as follows:
pQueryBinding->BindingIndex: 0
pQueryBinding->DeviceNameLength: 24
pQueryBinding->DeviceDescrLength : 24
pQueryBinding->DeviceNameOffset: 20
pQueryBinding->DeviceDescrOffset : 44

But how do i get the device name from this?
Printing out Buf value did not give me anything

Could any one help me on this??

Johns



Relevant Pages

  • NDIS_QUERY_BINDING
    ... Inorder to do this, as in ... the documentation, I got the handle to the device using CreateFile. ... PNDISUIO_QUERY_BINDING pQueryBinding; ...
    (microsoft.public.development.device.drivers)
  • NDISUIO_QUERY_BINDING
    ... Inorder to do this, as in ... the documentation, I got the handle to the device using CreateFile. ... PNDISUIO_QUERY_BINDING pQueryBinding; ...
    (microsoft.public.windowsce.embedded)
  • NDISUIO_QUERY_BINDING
    ... Inorder to do this, as in ... the documentation, I got the handle to the device using CreateFile. ... pQueryBinding = Buf; ...
    (microsoft.public.win32.programmer.networks)
  • NDISUIO_QUERY_BINDING
    ... Inorder to do this, as in ... the documentation, I got the handle to the device using CreateFile. ... pQueryBinding = Buf; ...
    (microsoft.public.win2000.networking)