Solved

ISAPI DLL, Windows Messages...

Posted on 1997-08-04
8
394 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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…

809 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