Return Values, No Pointers
-
I have a web-device that is running Windows CE 3.0 embedded. I've made a small webserver like application that allows me to type in it's IP address and view the webpages that I have set up on it. I'm using a COM wrapper to wrap the low level C code. I instantiate the COM object with server side JavaScript (because there is no support for ASP), and perform the operations on the machine through the COM object. Finally... Here's the problem: Whenever I call the functions to interact with the machine, the result I always get is 0 (S_OK). Even though I specify one of the parameters as [out, retval]. How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers? Any help would be appreciated. There's a fine line between confidence and arrogance.
-
I have a web-device that is running Windows CE 3.0 embedded. I've made a small webserver like application that allows me to type in it's IP address and view the webpages that I have set up on it. I'm using a COM wrapper to wrap the low level C code. I instantiate the COM object with server side JavaScript (because there is no support for ASP), and perform the operations on the machine through the COM object. Finally... Here's the problem: Whenever I call the functions to interact with the machine, the result I always get is 0 (S_OK). Even though I specify one of the parameters as [out, retval]. How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers? Any help would be appreciated. There's a fine line between confidence and arrogance.
joshkoppang wrote: How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers? Dunno about JavScript, but in ASP you can pass arguments ByRef. Same as in Client side VBScript Nish Nish was here, now Nish has gone; He left his soul, to turn you on; Those who knew Nish, knew him well; Those who didn't, can go to hell. I like to :jig: on the Code Project Sonork ID 100.9786 voidmain www.busterboy.org
-
joshkoppang wrote: How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers? Dunno about JavScript, but in ASP you can pass arguments ByRef. Same as in Client side VBScript Nish Nish was here, now Nish has gone; He left his soul, to turn you on; Those who knew Nish, knew him well; Those who didn't, can go to hell. I like to :jig: on the Code Project Sonork ID 100.9786 voidmain www.busterboy.org
Nish [BusterBoy] wrote: Dunno about JavScript, but in ASP you can pass arguments ByRef. Same as in Client side VBScript How? There's a fine line between confidence and arrogance.
-
I have a web-device that is running Windows CE 3.0 embedded. I've made a small webserver like application that allows me to type in it's IP address and view the webpages that I have set up on it. I'm using a COM wrapper to wrap the low level C code. I instantiate the COM object with server side JavaScript (because there is no support for ASP), and perform the operations on the machine through the COM object. Finally... Here's the problem: Whenever I call the functions to interact with the machine, the result I always get is 0 (S_OK). Even though I specify one of the parameters as [out, retval]. How do I call COM methods, that you usually pass a pointer to, from JavaScript and ASP, that do not have pointers? Any help would be appreciated. There's a fine line between confidence and arrogance.
C++
BSTR bsOutRetval;
HRESULT hr = myCOMObj->SomeMethod(&bsOutRetval);
....
SysFreeString(bsOutRetval);VB
Dim sOutRetval As String
sOutRetval = myCOMObj.SomeMethod();If you don't grab it, I can explain more. Michel
-
C++
BSTR bsOutRetval;
HRESULT hr = myCOMObj->SomeMethod(&bsOutRetval);
....
SysFreeString(bsOutRetval);VB
Dim sOutRetval As String
sOutRetval = myCOMObj.SomeMethod();If you don't grab it, I can explain more. Michel
DAMN, I misread the article. Again! Sorry buddy X|