From another question I recently posted, it seems that Classic ASP might not be able to deal with events that an activeX object might throw.
Can anybody verify this or if it can, how do I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, if you are speaking about COM events.
But, Depending on what you mean by the word “event” the answer is “Maybe.”
See Create COM/ActiveXObject in C#, use from JScript, with simple event
It’s possible to create a COM class / ActiveX thing, instantiate it in JScript/Classic ASP, and have the COM class invoke a callback that is defined in the ASP page. This is not done via COM events, but it may satisfy your requirement.
The ASP code might look like:
This works only if the COM class being created exposes a property that can be set, and then invokes the “Default method” on that property. Like this:
…where FireEvent is like this:
Obviously if you have a COM class that cannot be changed, and it uses COM events, then this approach will not apply.