My first time at ISAPI (or IIS for that matter), so I need basic
instructions.
I was able to setup my dll so that it executes. At first I only had it
diplay a custom webpage, no problem there.
Now I am trying to get a reference to the running word application,
but it fails with a message "Operation unavailable"
The code (delphi) is very basic:
<Code>
try
Response. ContentType := 'text/html';
{ Get Fusion }
CoInitialize(nil);
Word := GetActiveOleObject('Word.Application'); // !### ERROR
HERE
Word.Documents.Open('C:\Documents and Settings\Administrator
\Desktop\Demo.doc');
...
except
On E: Exception do
WriteDebug(E.Message);
end;
</Code>
I added the CoInitialize after reading several posts linking to it on
the forums, but I am not entirely sure what the use is.
I want to use the running instance of Word.
Am I forgetting something or is there some permissions settings that I
must change in order to access The application via COM? The websiite
(and the ISAPI extension are set to use the internet user profile on
the machine, is that the issue?
Thanks!
This is not an ISAPI/IIS issue.
What you want to do is not supported, so you will have to take the
time to research, figure it out, and support it on your own. In
particular, please realize that IIS is a Windows Service that runs in
Windows Session 0, but the user may not be running in Windows Session
0 and thus IIS cannot access "running applications" across Windows
Sessions because that would be a security issue.
http://support.microsoft.com/default.aspx?scid=kb;en-us;257757
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
I've actually come to realize this since, but the link you provided is
very informative.
I'll get something working!
Cheers!