edye
asked on
ISAPI DLL, Windows Messages...
How do you send a Windows message (and which message do you use) from a Delphi 3.0 C/S created ISAPI DLL to another running D3C/S application running on NTS4.0 IIS3.0
ASKER
Here is why the above solutions do not work or are not suitable:
- The "other" application is not an ISAPI DLL
Message Keys:
- I defined my own message keys and sent messages using the Win API - SendMessage using a WM_CopyData windows message. This worked FINE between my test client and message server. However as soon as the client became an ISAPI DLL the messages do not get through to my server. Hence my question. Perhaps if you have some sample code of an ISAPI DLL "communicating" with a non ISAPI DLL regular desktop app??
DDE:
- DDE is too slow. The "Server" would be the desktop app that would receive messages from a number of DLL's showing the activity of the various DLL functions. ie. Ad placed, Ad searched for etc.
- Remember I am designing an web based DLL here so speed is of the greates importance as well as little overhead. Windows messages provide that, DDE certainly does not.
Big ISAPI:
See DDE above. The server is to be accessed by multiple DLL's
- The "other" application is not an ISAPI DLL
Message Keys:
- I defined my own message keys and sent messages using the Win API - SendMessage using a WM_CopyData windows message. This worked FINE between my test client and message server. However as soon as the client became an ISAPI DLL the messages do not get through to my server. Hence my question. Perhaps if you have some sample code of an ISAPI DLL "communicating" with a non ISAPI DLL regular desktop app??
DDE:
- DDE is too slow. The "Server" would be the desktop app that would receive messages from a number of DLL's showing the activity of the various DLL functions. ie. Ad placed, Ad searched for etc.
- Remember I am designing an web based DLL here so speed is of the greates importance as well as little overhead. Windows messages provide that, DDE certainly does not.
Big ISAPI:
See DDE above. The server is to be accessed by multiple DLL's
I used shared memory in the implementation of WebApp (http://www.hyperact.com/webapp.html).
Worked great, very fast.
Worked great, very fast.
ASKER
Would you have some sample code for me showing me the shared memory access??? I had a look at HyperAct but did not come across anything that could point me in the right direction.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the pointer to a shared memory implementation. The reason that you are using this method instead of ordinary messages is:
1) It can't be done with regular windows messages?
2) This is a more efficient way of doing what I want to do??
TIA
1) It can't be done with regular windows messages?
2) This is a more efficient way of doing what I want to do??
TIA
The reason I am doing it this way is because it is very efficient (probably the most efficient way), and also since ISAPI DLLs do not usually have a message loop associated with them. While it is possible to create a message loop for each the ISAPI thread, I saw no good reasons to create this overhead.
ASKER
Yaniv,
The points are yours. Not an A grade as shared memory is not what I really wanted to do, but it'll work. Thanks for the pointer....
--Donovan
The points are yours. Not an A grade as shared memory is not what I really wanted to do, but it'll work. Thanks for the pointer....
--Donovan
from an ISAPI.DLL to an other application ??
If the other application isn't an ISAPI.DLL, what my opinion is, then you can use different mechanism:
- define message-keys, which both application should know to communicate via the message-queue
- use DDE, meaning that one application is the server the other the client.
- why do you not use the ISAPI.DLL alone, implement all what the other application should do and you'll be faster and have not so many troubles.