Solved

ISAPI DLL, Windows Messages...

Posted on 1997-08-04
8
396 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:edye
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:buemoh
ID: 1340435
First, let us declare what you mean with:

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.

0
 

Author Comment

by:edye
ID: 1340436
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
0
 
LVL 1

Expert Comment

by:ygolan
ID: 1340437
I used shared memory in the implementation of WebApp (http://www.hyperact.com/webapp.html).

Worked great, very fast.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:edye
ID: 1340438
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.
0
 
LVL 1

Accepted Solution

by:
ygolan earned 100 total points
ID: 1340439
You can find sample code that implements shared memory in the \Delphi\Demos\IPCDEMOS\IPCTHRD.PAS, search for "sharedmem".

Don't ask me why did they hide it there...
0
 

Author Comment

by:edye
ID: 1340440
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
0
 
LVL 1

Expert Comment

by:ygolan
ID: 1340441
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.
0
 

Author Comment

by:edye
ID: 1340442
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 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