Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeSite Logging From Delphi ISAPI

I have CodeSite Express, bundled with Delphi XE Enterprise. Right now I'm developing an ISAPI application in XE (I trace and debug using attach to process in XE - works fine) and I'd like to get some CodeSite messages out of my ISAPI application.

In Advanced Techniques in the included CodeSite help, I found this:

"Logging From Services

Service applications run in a separate window station from that of the desktop. However, by default, the CodeSite Dispatcher runs in the desktop window station. As a result, the default message transport mechanism used to transfer CodeSite messages to the Dispatcher, the wm_CopyData window message, is blocked by Windows. Microsoft Windows does not allow window messages to cross window station boundaries..... Therefore, if we wish to send CodeSite messages from a service application to the Dispatcher, we need to connect to the Dispatcher using the TCP protocol instead of CopyData."

Question:

Am I corrent in assuming that the same rules are applicable to ISAPI applications? That I have to use TCP to get CodeSite messages out of ISAPI apps?

like image 967
Vector Avatar asked Jan 19 '23 18:01

Vector


2 Answers

Given the fact that the ISAPI is loaded from IIS and IIS is running as a service, yes.

like image 126
Uwe Raabe Avatar answered Jan 24 '23 20:01

Uwe Raabe


In the default configuration, yes. But there's more. I'm not sure about newer versions, but in IIS 6, when you select isolation level high, your ISAPI dll is run from a dllhost.exe process over COM+. With the Components Services administration tool (formerly known as DCOM config) you can change the 'activation' configuration to use the currently logged on user, and the dllhost.exe instance will run in the active window station. (You can even start dllhost.exe as a host application to the Delphi debugger, with the /ProcessID:{} parameter and a guid of the COM+ entry)

What I've seen so far in IIS 7, is that w3wp.exe now loads and runs ISAPI dll's, but I'm not sure if something like the above applies. You may check if application pool settings have a similar activation setting.

like image 32
Stijn Sanders Avatar answered Jan 24 '23 21:01

Stijn Sanders