G
Guest
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 exception method which is described everywhere ?
Please note that I am unfamiliar with javascript, I am used to C/C++.
My Javascript call looks like :
var result;
result = Testfunc1();
The function is called OK, but the returnvalue cannot be converted.
It is printed as "undefined".
I just need 0 or 1 to be returned (or 2 other values, one for OK, and one
for ERROR)
So I tried the following :
result = (Testfunc1() & 255) ;
But this always returns 0 for some reason....
It seems unlogical and not neat, to throw exceptions when really nothing
serious happenned, just to convert the returnvalue. Also the clientcode will
be poluted with a lot of extra (rather poorly structured) lines.
So If I could just get the low-byte of the HRESULT, this would be enough for
me.
Please Help !
Greetings,
Rob.
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 exception method which is described everywhere ?
Please note that I am unfamiliar with javascript, I am used to C/C++.
My Javascript call looks like :
var result;
result = Testfunc1();
The function is called OK, but the returnvalue cannot be converted.
It is printed as "undefined".
I just need 0 or 1 to be returned (or 2 other values, one for OK, and one
for ERROR)
So I tried the following :
result = (Testfunc1() & 255) ;
But this always returns 0 for some reason....
It seems unlogical and not neat, to throw exceptions when really nothing
serious happenned, just to convert the returnvalue. Also the clientcode will
be poluted with a lot of extra (rather poorly structured) lines.
So If I could just get the low-byte of the HRESULT, this would be enough for
me.
Please Help !
Greetings,
Rob.