How to use multiple adapters with NDISPROT at the same time ?

Discussion in 'Windows Vista Drivers' started by Skybuck Flying, May 22, 2006.

  1. Hello,

    My PC's have two network cards/chips and I would like to be able to use them
    at the same time.

    I am not sure if this is possible. When I look at the usage code for
    NDISPROT I think the only way might be as follows in pseudo code:

    DriverHandle1 = OpenDriver
    DriverHandle2 = OpenDriver

    BindAdapter1 to DriverHandle1
    BindAdapter2 to DriverHandle2

    Use ReadFile/WriteFile on DriverHandle1 for receiving/sending frames.
    Use ReadFile/WriteFile on DriverHandle2 for receiving/sending frames.

    // unbind not necessary/possible i think ?

    CloseDriver(DriverHandle1)
    CloseDriver(DriverHandle2)

    The question is... will this work ?

    Bye,
    Skybuck.
     
    Skybuck Flying, May 22, 2006
    #1
    1. Advertisements

  2. You can pass the interface GUID as additional reference string in
    CreateFile to NDISPROT.
     
    Maxim S. Shatskih, May 22, 2006
    #2
    1. Advertisements

  3. Yes, this will work. Initially, after OpenHandle a handle is not associated
    with any specific adapter. The call to OpenNdisDevice modifies the handle so
    it references the specific adapter that was named when you made the call.
    From then on, the handle is associated with that one specific adapter.

    You can make two OpenHandle calls and make a call to OpenNdisDevice on each
    (with different device names, of course) and eahc handle will reference a
    different adapter.

    Good luck,

    Thomas F. Divine
     
    Thomas F. Divine [DDK MVP], May 22, 2006
    #3
  4. Ok, I have tested it, so far it works just fine ;)
    Thank you and may the force be with you too lol.

    Bye,
    Skybuck.
     
    Skybuck Flying, May 22, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.