473,320 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

get return value from ActiveX S_OK in javascript

Joe
I have a javascript that calls a method of an activex control. I want to get
the return value, S_OK or S_FALSE.

I tried var r = document.Form1.PCtl.Download('h')
document.write(r) // to see the value

but r is coming out as undefined.
Nov 18 '05 #1
2 2513
Hi,

If i remember right, you cant get Com HRESULT value from scripts. if
HRESULT isn't 0 (S_OK) you will get exception that you can catch using
try...catch.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Joe
The method does return S_FALSE sometimes and doesn't throw an exception.
"Natty Gur" <na***@dao2com.com> wrote in message
news:Oc**************@TK2MSFTNGP11.phx.gbl...
Hi,

If i remember right, you cant get Com HRESULT value from scripts. if
HRESULT isn't 0 (S_OK) you will get exception that you can catch using
try...catch.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
12
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
18
by: DartmanX | last post by:
Is there a simple way to determine if someone using Internet Explorer has completely disabled ActiveX controls? Jason
2
by: klingus | last post by:
I am running into problems obtaining the return value of a method I have in a COM+ DLL. I have the following code snippet: STDMETHOD(add)(long num1, long num2, long* result); STDMETHODIMP...
1
by: techie | last post by:
I have an unmanaged VC++ application calls a COM object which will be implemented in C#. The VC++ call is: BOOL res; VERIFY( importFilt->Import(&res) == S_OK ); My C# method is:
5
by: Edwin Knoppert | last post by:
If these are ActiveX based, that would not make my day. We have the strong believe trying never to force a user to enable ActiveX. (Like stupid updates from mcafee enforce to the use of activex...
4
by: marcosnogood | last post by:
Hello, I need to dynamically load an activex object because what object to load is based on certain conditions. Also I need to wait for the object to have initialized before moving on. What I...
4
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
How would I do, in both ends, to get a return value from a C++ dll called from C# app?
6
by: =?Utf-8?B?Um9i?= | last post by:
Hi, If I call my own DLL from Javascript, a HRESULT is returned. Javascript cannot cast this to an integer. Is there any other way of typecasting this returnvalue to integer, wihout using the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.