Constantin K
May 3rd, 1999, 06:47 AM
Hello!
I have two applications, let it be called AppServer and AppClient. They use the same dll.
How should I write function in the dll so when AppClient execute it, the function can access data of the AppServer, for example tell AppServer to do something or just ask it for current status?
It's possible to declare shared variables in dll so there is no problem to put in shared memory the handle (HWND) and instance of AppServer, but I cannot store there pointers to variables and functions of AppServer because the AppServer moves to another part of memory when AppClient execute the function and pointers became invalid.
I suppose that there is a way get CWinApp* from hInstance or maybe I'm wrong or I should to pass global pointers or I even don't know.
Thanks! Constantin Kuznetsov Jr.
I have two applications, let it be called AppServer and AppClient. They use the same dll.
How should I write function in the dll so when AppClient execute it, the function can access data of the AppServer, for example tell AppServer to do something or just ask it for current status?
It's possible to declare shared variables in dll so there is no problem to put in shared memory the handle (HWND) and instance of AppServer, but I cannot store there pointers to variables and functions of AppServer because the AppServer moves to another part of memory when AppClient execute the function and pointers became invalid.
I suppose that there is a way get CWinApp* from hInstance or maybe I'm wrong or I should to pass global pointers or I even don't know.
Thanks! Constantin Kuznetsov Jr.