SaxComm8 and svcit.ocx

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Valiz

    SaxComm8 and svcit.ocx

    Hi,
    I am writing a VB6 application that communicates with an embedded
    microcontroller through serial com port 17 and using SaxComm8.
    The microcontroller needs to be updated every 2-3 seconds and so I had
    to make a service out of a VB6 app using svcit.ocx
    (ServiceMillCon trol) that does the required updates.
    Now, I'd like to be able to retrieve information (send and receive)
    from the microcontroller through another VB6 application which
    displays the status and other information of/from the microcontroller .
    Is there a way to communicate with a service?
    Any help would be greatly appreciated.
    Thanks in advance.
    Valiz.
  • J French

    #2
    Re: SaxComm8 and svcit.ocx

    On 11 Mar 2004 16:27:57 -0800, deva8601@uidaho .edu (Valiz) wrote:
    [color=blue]
    >Hi,
    >I am writing a VB6 application that communicates with an embedded
    >microcontrolle r through serial com port 17 and using SaxComm8.
    >The microcontroller needs to be updated every 2-3 seconds and so I had
    >to make a service out of a VB6 app using svcit.ocx
    >(ServiceMillCo ntrol) that does the required updates.
    >Now, I'd like to be able to retrieve information (send and receive)
    >from the microcontroller through another VB6 application which
    >displays the status and other information of/from the microcontroller .
    >Is there a way to communicate with a service?
    >Any help would be greatly appreciated.[/color]

    You could use SendMessage with WM_COPYDATA
    - that involves subclassing to receive the data
    - RegisterWindowM essage to get a unique Win Message
    - SendMessage with HWND_BROADCAST

    A cheap and cheerful method is to find the handle of a Textbox in the
    target App
    - and use WM_SETTEXT to push text into it

    Comment

    • J French

      #3
      Re: SaxComm8 and svcit.ocx

      On 11 Mar 2004 16:27:57 -0800, deva8601@uidaho .edu (Valiz) wrote:
      [color=blue]
      >Hi,
      >I am writing a VB6 application that communicates with an embedded
      >microcontrolle r through serial com port 17 and using SaxComm8.
      >The microcontroller needs to be updated every 2-3 seconds and so I had
      >to make a service out of a VB6 app using svcit.ocx
      >(ServiceMillCo ntrol) that does the required updates.
      >Now, I'd like to be able to retrieve information (send and receive)
      >from the microcontroller through another VB6 application which
      >displays the status and other information of/from the microcontroller .
      >Is there a way to communicate with a service?
      >Any help would be greatly appreciated.[/color]

      I've just had another thought
      - use an AX EXE for the communication

      They are very good 'brokers' for Inter App communication
      Data in the .BAS modules can be 'shared'

      Comment

      • Valiz

        #4
        Re: SaxComm8 and svcit.ocx

        There is another situation I am facing. The VB6 application that I
        made into service using svcit.ocx does not fire Shutdown() event
        (where I do some uninitializing stuff like sending some commands to
        the microcontroller ) before the system reboots. This service takes
        about 5 minutes to start. Going through the event log I found that
        after the system boots up, the service tries to start and generates an
        error with id7022 "the service hung on starting" and then it starts
        after 5 minutes.
        Any ideas or reasons why this would happen?
        Thanks,
        Valiz.
        erewhon@nowhere .com (J French) wrote in message news:<4051865c. 12828081@news.b tclick.com>...[color=blue]
        > On 11 Mar 2004 16:27:57 -0800, deva8601@uidaho .edu (Valiz) wrote:
        >[color=green]
        > >Hi,
        > >I am writing a VB6 application that communicates with an embedded
        > >microcontrolle r through serial com port 17 and using SaxComm8.
        > >The microcontroller needs to be updated every 2-3 seconds and so I had
        > >to make a service out of a VB6 app using svcit.ocx
        > >(ServiceMillCo ntrol) that does the required updates.
        > >Now, I'd like to be able to retrieve information (send and receive)
        > >from the microcontroller through another VB6 application which
        > >displays the status and other information of/from the microcontroller .
        > >Is there a way to communicate with a service?
        > >Any help would be greatly appreciated.[/color]
        >
        > I've just had another thought
        > - use an AX EXE for the communication
        >
        > They are very good 'brokers' for Inter App communication
        > Data in the .BAS modules can be 'shared'[/color]

        Comment

        • J French

          #5
          Re: SaxComm8 and svcit.ocx

          On 12 Mar 2004 12:35:25 -0800, deva8601@uidaho .edu (Valiz) wrote:
          [color=blue]
          >There is another situation I am facing. The VB6 application that I
          >made into service using svcit.ocx does not fire Shutdown() event
          >(where I do some uninitializing stuff like sending some commands to
          >the microcontroller ) before the system reboots. This service takes
          >about 5 minutes to start. Going through the event log I found that
          >after the system boots up, the service tries to start and generates an
          >error with id7022 "the service hung on starting" and then it starts
          >after 5 minutes.
          >Any ideas or reasons why this would happen?[/color]

          The fact that it starts after 5 minututes is peculiar

          My guess is that the svcit.ocx has somehow set your App up as a
          scheduled task

          - unfortunately I'm not familiar with this area

          Comment

          Working...