Solved

ISAPI DLL, Windows Messages...

Posted on 1997-08-04
8
393 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

14 Experts available now in Live!

Get 1:1 Help Now