Click to See Complete Forum and Search --> : Calling functions of a running EXE?
PhilipG
Jun 9th, 2002, 01:49 AM
I've written a "server" of sorts that does the bulk work of the processing. The app is written in VC++ and IS a GUI app.
What I'd like to do is leave some "hooks" in the EXE to allow "clients" to access the functions. The client will be running on the same PC that the server would.
My question is, how would I:
(a) define a function that can be called from another process?
(b) how would I call it from a dll?
Thanks for any assistance!
Phil
PhilipG
Jun 9th, 2002, 01:52 AM
BTW, the running EXE will need to return data....so i don't think a messaging system of sorts would do the trick.
Thanks!
Phil
PhilipG
Jun 10th, 2002, 11:54 PM
Originally posted by parksie
Probably the easiest way is to use a pipe, I think.
Your clients wouldn't call the functions directly, they just send a request for a certain action to the server and they get the data back. And, wonderfully enough, you can extend it easily to using TCP/IP across a network so you've got a *real* server ;)
And why can't you just put the functions that the client needs into a DLL?
Actually, I think i'm going to go ahead and build in the sockets. Pipes or shared memory would deffinatly do the trick and thanks for the suggestion.
the reason I can't just dll this is because the server is pretty complex. It logs data off of four serial ports and parses the data, which ends up being recorded as rate information. Without being able to tell the server to release a port handle and building rather advanced serial code into the dll, I'm really stuck with a client\server relationship.
Thanks!
P
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.