Solved

ISAPI DLL, Windows Messages...

Posted on 1997-08-04
8
392 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
Comment Utility
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
Comment Utility
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
Comment Utility
I used shared memory in the implementation of WebApp (http://www.hyperact.com/webapp.html).

Worked great, very fast.
0
 

Author Comment

by:edye
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 1

Accepted Solution

by:
ygolan earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now