Oxygen Basic
Information => Open Forum => Topic started by: bugmagnet on April 17, 2013, 10:40:12 PM
-
I'd like to reimplement the following JScript in OxygenBASIC
var oHTTP = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
function URL( url ) {
var o = oHTTP.open("URL",url,false);
var s = oHTTP.send();
return oHTTP.ResponseText;
}
The SAPI examples aren't immediately obvious to me :(
Where do I begin?
Kind regards,
bugmagnet
-
Hi Bruce, Welcome to our forum.
I'm not familiar with WinHttp, but I see it offers C/C++ APIs and COM APIs. I would opt for the C/C++ approach and try to get hold of some examples written in compilable Basic or C. Then it is a relatively simple matter to port them to OxygenBasic. This is where we can assist. It would be very useful to have some web stuff to include in the examples.
Charles
PS: MSDN overviews
http://msdn.microsoft.com/en-gb/library/windows/desktop/aa382925(v=vs.85).aspx
http://msdn.microsoft.com/en-gb/library/windows/desktop/aa383158(v=vs.85).aspx
-
Hi Bruce, Welcome to our forum.
Thank you. It's nice to be here.
I'm not familiar with WinHttp, but I see it offers C/C++ APIs and COM APIs. I would opt for the C/C++ approach and try to get hold of some examples written in compilable Basic or C. Then it is a relatively simple matter to port them to OxygenBasic. ...
Okay, I shall pursue that angle (which I hadn't thought of). In the interim, if I wanted to talk COM to Scripting.FileSystemObject or InternetExplorer.Application how would I approach it in Oxygen Basic?
Kind regards,
bugmagnet
-
It's outside my scope, unfortunately. I can only suggest trawling the web and windows SDK. Anything coded in C and/or low-level COM is do-able in Oxygen. Developing COM servers for web browsers can be problematic due to security restrictions, though.