Re: COM correct choice for my application?

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 01/07/05

  • Next message: Alexander Nickolov: "Re: Java Beans, VB.NET, ActiveX Bridge and a student's headache :("
    Date: Fri, 7 Jan 2005 10:31:35 -0800
    
    

    I supose you need three pieces here. A device driver communicates
    with your hardware. An NT service exposes the programmatic
    functionality (COM object is a perfect choice). And finally, a
    tray icon application that starts when the user logs in provides
    the user with GUI control to your service. Alternatively, you
    can also have configuration application as a control panel applet
    or an MMC plug-in. For the COM NT service, you'll probably
    want to choose ATL as it offer specific support for hosting COM
    objects in an NT service. Depending on your hardware's needs,
    you may not need a driver and have all that code in the service
    instead. Then your service must start automatically at boot time.
    OTOH, if you have a separate driver, your API may also be
    bundled in a DLL that talks to the driver. A service is only needed
    if you accumulate and cache data not specific to any client (say
    statistics), and this can be done by the driver if you have one.
    However, if you don't have a driver, you do need a service as it
    does not terminate with the last client. I outlined some ideas
    here, analyze your needs and pick the right approach for your
    particular case.

    -- 
    =====================================
    Alexander Nickolov
    Microsoft MVP [VC], MCSD
    email: agnickolov@mvps.org
    MVP VC FAQ: http://www.mvps.org/vcfaq
    =====================================
    "David Johansson" <DavidJohansson@discussions.microsoft.com> wrote in 
    message news:DE9AB224-2C55-47A4-87E4-7B7878C5B1FA@microsoft.com...
    > Hi,
    >
    > I am trying to develop a simple application, but I am unsure of which
    > "technology" to use. From what I have read on the web, COM could be it, 
    > and
    > that's why I post this question. If I explain the desired functionality,
    > maybe you could help me decide if COM is the correct way to go and how to
    > high-level design my application.
    >
    > The situation:
    > I am developing a custom piece of hardware that connects to the computer 
    > via
    > IR. I now want to expose an interface to this hardware in Windows at 
    > runtime,
    > i.e. a set of functions that any application could call without having 
    > access
    > to my code at compile-time (just the interface I have defined).
    >
    > My requirements:
    > * My solution should allow any "standard" Windows programming language
    > (i.e., java, c/c++/c#, vb, delphi, etc..) to start up my hardware 
    > interface
    > or get a handle to an existing interface (i.e. singleton behaviour) and
    > execute methods on it, as well as listen to its events (hardware
    > connected/disconnected etc)
    > * This should be possible without me writing custom interfaces for each
    > language
    > * My solution should expose an icon in the System Tray, which when 
    > selected
    > displays a small set of menus in Windows, so that the user can monitor the
    > applications accessing the hardware
    >
    > In many ways, to me this looks just like a scaled-down version of what any
    > Microsoft Office application is capable of. For example, I can easily 
    > start
    > an instance of Word which is running in a window on my computer, and then
    > write programs that interface with this document, e.g., adding words to 
    > the
    > active document.
    >
    > How should I structure my application? Is a COM .exe server the correct 
    > way
    > to go given my requirements, or is there a more appropriate or 
    > "up-to-date"
    > way? How are Microsoft Office applications constructed in this aspect?
    >
    > Thanks in advance / regards,
    > David Johansson
    > Sweden 
    

  • Next message: Alexander Nickolov: "Re: Java Beans, VB.NET, ActiveX Bridge and a student's headache :("

    Relevant Pages

    • Re: staging: me4000 and relation to other data acquisition devices
      ... The me4000's user interface is not "set in stone" and needs to be fixed ... Which supports this hardware, and many more, with a generic device ... have a desire to maintain support of their RT support), ... but feel that merging the me4000 driver without thinking about the ...
      (Linux-Kernel)
    • Re: Low-level serial communication with USB2SERIAL converter
      ... >> Use the higher level interface that the driver provides you. ... >> functionality are you looking for that requires direct register access. ...
      (comp.os.linux.development.apps)
    • Re: [PATCH 2.6.19-rc1 V9] drivers: add LCD support
      ... If the driver exposes sensible information, ... interface to userspace, is of course a requirement to get into mainline ... a new device, a framebuffer one. ... the hardware), create less maintanieable code (as it mixs hardware io ...
      (Linux-Kernel)
    • Re: avoiding glTranslatef*
      ... into display lists? ... interface, and you can still render with a single display list command. ... just a graphics hardware driver exposed to ...
      (comp.graphics.api.opengl)
    • Re: Complete XP-Pro using XP-Embedded ?
      ... One is functionality seen from user (non driver level), and second if from kernel (hardware level). ... Like you would provide new drivers in XPP. ...
      (microsoft.public.windowsxp.embedded)