Linking Software to Device or Vice Versa


  1. Posts : 142
    10.0.19045, build 19045
       #1

    Linking Software to Device or Vice Versa


    General Question:
    This is applicable across the board.
    I use Windows Fax and Scan as an example since I'm currently troubleshooting it.
    ===================================================

    Let's say I have software (in this case Windows Fax and Scan).
    Let's also say I have a scanner.

    When the OS is installed, Windows Fax and Scan is also installed, or if 3rd party software one installs that software.
    An exe is place on the system as well as maybe some needed DLLs, Service(s), and registry entries..

    Now lets say I install a new scanner.
    The device driver for the scanner is also likely to install a DLL, registry entries, Services maybe or maybe not.

    Now i look into properties for Windows Fax and Scan (or whatever software, and find only the WFS.exe file.
    No environment variables are listed.

    How does Windows Fax and Scan know to find the specific device driver (DLL (assumed) and the Main Export function for that DLL) for my scanner?

    Conversely, if the scanner is installed last, how does the install software know to link to, or allow Windows Fax and Scan to execute that scanner?
      My Computer


  2. Posts : 43,043
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    1. If there are multiple scanners connected and active, the program you use for scanning will present a dialogue from which you select the scanner you wish to use.

    2. If you are asking how the driver for a particular device is categorised and identified as a scanner, see e.g.
    drivers - How does Windows categorize devices in "Device Manager"? - Super User

    (Warning- technical).
      My Computers


  3. Posts : 142
    10.0.19045, build 19045
    Thread Starter
       #3

    dalchina:

    Thanks that answer part of my questions.
    From my reading Windows sets up a one or two GB address space for devices. That space is protected and only the kernal can get to it. That's great, but the device need to be loaded into that memory and also accessed. What I'm trying to understand from a block diagram (macro) basis, is how Window at startup (if at startup), is determining whether the device is online, finding the DLL for those devices that are online and then loading those DLL's into that protected memory. Since everything (or most everything) is based off of handles to objects, somewhere along the line there has to be a file or structure which keeps a list of those handles.

    I did find one API CreateIOCompletionPort which might be on interest and part of this process, but still looking.

    Said maybe more simple: When one executes (runs) a software program, and selects print, a dialog (normally a windows dialog) is brought up. They then select a printer(s) to print to. But the printer (DLL) is already loaded, or needs to be loaded and my guess is that DLL file name resides in the table which is part of the structure for the list windows shows to the user. So what is that structure and how and when (e.g. startup?) does windows load that structure. Hope that's clear.
      My Computer


  4. Posts : 43,043
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    You're asking about how the O/S handles memory..at least that's implicit in your question.

    That's highly complex, and in my view, outside the scope of this forum.

    This is a search for understanding of the way the O/S works. rather than seeking a solution for a problem, it seems.
      My Computers


  5. Posts : 142
    10.0.19045, build 19045
    Thread Starter
       #5

    how the O/S handles memory
    No. not memory. The process stream on a macro basis for loading and accessing device drivers.
    While this IMHO goes hand in hand with trying to resolve my scanner issue, it is "behind the scenes" of
    the standard PnP or replacing a device driver.
    Thought it might be a bit much this forum.
    The link you provided did help though.

    Will leave thread open a bit longer.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:10.
Find Us




Windows 10 Forums