Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Middleware, Windows NT, Visual Basic and C

Status
Not open for further replies.

williamlove

Programmer
Dec 7, 2007
8
US
I need to describe a system that I no longer remember very well and I could use some help inserting some plausible names where my memory and knowledge fail. This is like a design problem. If my verb tense is confusing let me say this is a solution that was done but the details are gone so I am creating a plausible scenario as if we were designing it today.

Its 1997 or so. A Windows NT 4 box has a vision system written in C that evaluates widgets going by on a conveyor. (I’ll call this NT box the Vision system). The vision system’s C program has APIs that are accessible from Visual Basic. A programmer will write a Visual Basic program to read about a half dozen floats from the C program’s API and then make these available to DDE clients (other NT 4 boxes). In other words this Visual Basic program will be a DDE server and its data originates from the C program.

My question is can you describe in moderate detail any plausible scenario in which values stored in a C program (which is designed with the proper APIs) would be accessed by a Visual Basic Program back in 1997? I need to know the names of the middleware and messaging components that could have been used (just chose the most plausible ones).
 
Assuming some unknown service written in C of that era there are probably several ways to implement an API callable from a VB program. Since a separate API "wrapper" or "binding" for VB clients could have been written in C, and we're beyond Win9x with NT 4, the possibiities are pretty broad.

A few that come to mind are Named Pipes, Mailslots, RPC, IP sockets, file mapping, and window messages. COM and DDE are possible but far less likely when plain C is involved rather than C++. Even MSMQ was available as early as NT 4 SP3.

And there is probably no end to possible 3rd party mediation services (e.g. CORBA support) and who can say what else?

But I'm not sure any of that helps answer even part of your question.
 
I appreciate your help. I will speak as if its 1997 and we're designing this now.
I'd like to use COM or DCOM. The Vision System, written in Visual C++ (I said C earlier) must be modified to make it a COM server. Can you tell me what (if anything) I need to obtain to extend Visual C++ to do that? And will outline how this programming task is done? I.e. a brief set of directions about what to figure out and do?

Then I will need to address how another NT box will be programmed in Visual Basic to read some data values on a periodic basis from the COM server. Again, if you give me directions as if I was a capable assistant but ignorant of the steps...tell me what to get and an outline of what to do and I'll figure out how.

Thanks again!
 
I have found a lot of articles like that but the reason I asked here was to try to get clarity. For example in that first article you gave me, I don't know what an out of process com server is, or if it applies to my case. It would help me a lot if you know the anwwers to those questions if you would just tell me. I'm just talking about a brief outline about the same length as your first post. Thanks.
 
Pretty fundamental concept there, are you sure you joined the right site? This one is for professional practitioners and not hobbyists and lay people.

You might try reading the VB6 documentation. Some titles of interest may include:

In-Process and Out-of-Process Components

Creating ActiveX Components

Creating an ActiveX EXE Component

If you can't get it from that... well this stuff is presented in intro classes that run 4 to 5 eight-hour days. Sort of hard to cover it in a few paragraphs. Can you hire a programmer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top