Re: Registering Interfaces

From: Alexander Grigoriev (alegr_at_earthlink.net)
Date: 07/21/04


Date: Wed, 21 Jul 2004 08:52:11 -0700

Register the interface without the reference string, but have the
application to append additional string to the interface name. This way the
appended string will still be passed to the driver, but now the application
makes the choice.

"Ben Geib" <BenGeib@discussions.microsoft.com> wrote in message
news:C20B325B-438A-4786-9A87-116AC0214D30@microsoft.com...
> Using different ReferenceStrings allows me to differentiate among channels
in the driver, but I want the application writer to have an easy way to
access a particular channel. Right now I'm calling
SetupDiEnumDeviceInterfaces in a loop and getting the deviceName from the
detail structure. However, I don't see an easy way the application writer
can open a handle and access a particular channel. Thank you for your time.
>
> "Alexander Grigoriev" wrote:
>
> > Use different ReferenceString arguments in IoRegisterDeviceInterface,
with
> > the same GUID.
> >
> > This argument will be passed to IRP_MJ_CREATE handler (in FILE_OBJECT as
> > file name), to distinguish one channel from another.
> >
> > "Ben Geib" <BenGeib@discussions.microsoft.com> wrote in message
> > news:A5A12D05-4E9A-4EFF-A546-C2BE4A16E2E3@microsoft.com...
> > > I am developing a driver for a PCI device that has multiple
communication
> > channels. In an attempt to have each channel opened and used
individually I
> > have tried registering an interface for each channel in the AddDevice
> > routine; that way a different handle may be used for each channel.
However,
> > enumeration of the interfaces in an application does not locate all of
those
> > registered in the driver. Should I even be using multiple interfaces or
> > should I name my device object and subdivide its namespace for each
channel?
> > Thank you for your time.
> >
> >
> >



Relevant Pages

  • Re: IcompleteInterface = interface(IsubInterface1, IsubInterface2, IsubInterface3) not possible ?
    ... When you use the as operator for dynamic binding on an interface, ... function Blue: string; ... > An interface reference is just a pointer to a list of function pointers. ...
    (alt.comp.lang.borland-delphi)
  • Re: 7.0 wishlist?
    ... The "auto-implement" is intended mainly for the odd situation where an existing class you can't edit fits some interface and you're willing to take responsibility for it if it turns out not to actually adhere to the contract, and try using it where that interface type is expected. ... If reference declarations started showing up with the odd asterisk, bang, or other punctuation mark on it, but never primitive declarations, people would probably be able to guess what was going on, on the basis of "what other binary flag might be set on references but not primitives and would be really useful besides can be/cannot be null?" ... the compiler cannot prove by static analysis that the RHS isn't null might be a good idea. ... Object foo, bar; ...
    (comp.lang.java.programmer)
  • Re: Anders Hejlsberg comment on immutable objects
    ... >explicit interface implementation exists is so an interface name can class ... Improper implicit conversions constitute a nasty ... >> With value types, the variable's value is the object, not a reference ... Consider the affects of our different views on a const ...
    (microsoft.public.dotnet.languages.csharp)
  • [RFC PATCH 1/6] Driver Tracing Interface (DTI) Documentation
    ... named 'The Driver Tracing Interface ' after the title of our OLS ... The Driver Tracing Interface introduced here does essentially the same ... DTI is also very useful as a debugging tool for kernel development. ... single DTI channel across multiple 'subsystems' as well as custom ...
    (Linux-Kernel)
  • Re: [OT] My First C# (warning - long post)
    ... or string,. ... public string IBreturn ... interface block with the new return code. ... It is unwieldy to keep referencing substrings of an 8K string ...
    (comp.lang.cobol)