[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

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
0
edye
Asked:
edye
  • 4
  • 3
1 Solution
 
buemohCommented:
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
 
edyeAuthor Commented:
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
 
ygolanCommented:
I used shared memory in the implementation of WebApp (http://www.hyperact.com/webapp.html).

Worked great, very fast.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
edyeAuthor Commented:
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
 
ygolanCommented:
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
 
edyeAuthor Commented:
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
 
ygolanCommented:
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
 
edyeAuthor Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now