Javascript COM callback

N

natalia

Hi,

I am working on a project that requires my web client to talk to a COM
object and receive a callback from the COM object. The COM object has
the following code in the .idl file:

library FDUMPSVRLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");

[
uuid(D7039B9C-E87B-11D2-BAA4-006097AFDB73),
helpstring("_IDumpExEvents Interface")
]
dispinterface _IDumpExEvents
{
properties:
methods:
[id(1), helpstring("method OnCreateStatusChange")]
HRESULT OnCreateStatusChange([in] long pct);
[id(2), helpstring("method OnCopyStatusChange")]
HRESULT OnCopyStatusChange([in] long pct);
};
}

I am having difficulty receiving a callback in my web client.

Here is my web client code:

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function OnCreateStatusChange(abc) {
window.alert("made it");
}

function button1_onclick() {
try
{
var anob = new ActiveXObject("Test.TestEx.1");
dumpname = anob.Testing(0, 1,"C:\\");
window.alert(dumpname);
}
catch (err)
{
window.alert("got an error");
window.alert(err.number);
window.alert(err.description);
}


}

//-->
</SCRIPT>
</HEAD>
<BODY>

<P><INPUT id=button1 type=button value=Button name=button1
LANGUAGE=javascript onclick="return button1_onclick()"></P>

</BODY>
</HTML>

I would appreciate any suggestions on what I am missing in my web
client code to receive a callback from COM or whether or not it is
possible to accomplish.

Thanks so much!
Natalia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,161
Latest member
GertrudeMa
Top