Solved

Quick question  (service and communication)

Posted on 2002-04-29
3
126 Views
Last Modified: 2010-05-02
I am currently writing an application design.

The idea is that we have a service running (which is implemented using the SRVAny tool) which does it's thing. Now we also have this administration program (totally different) which needs to interact with the service (or vice versa).Both programs do not have to be run at the same time, still the communication has to be established whenever the administration program starts up.

What is the best way to communicate with each other? Can an ActiveX server application run as a service (using SRVAny and InstSrv), or would a normal windows application be sufficient (probably using FindWindow)?

I'd rather go for the ActiveX server application since that does give me the freedom I need.

i guess the question is: Can I use ActiveX executables as a service and communicate (using events) with an normal windows application?

CJ
0
Comment
Question by:CJ_S
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
Comment Utility
I think that you will have problems using an ActiveX exe as a service. You may be better off using an activex exe or dll instantiated in a normal exe that you run as a service, you can then instantiate this in your admin program and use it to share information between them.
0
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
I'm only guessing, but I think you'll be OK with an Active-X EXE.  Basically, if you are using SRVANY, then it's actually the SRVANY program that is running as a service, it just then relays the commands to the Active-X EXE.  Otherwise, your Active-X EXE is just an ordinary VB Active-X EXE.  I can't see why you couldn't have other public methods available to be called from other windows programs.

My first thought would be to set the instancing so that any calls to instantiate the Active-X would use the existing one that was started up by SRVANY.
0
 
LVL 22

Author Comment

by:CJ_S
Comment Utility
Sorry for the long delay.

Eventually I kind of got it to work. The application is started in memory and works like a charm. however, there is a follow up to this. I will post it in a couple of minutes (new thread).

CJ
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now