What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » InternetOpenUrlW - what am I doing wrong?

InternetOpenUrlW - what am I doing wrong?
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: InternetOpenUrlW - what am I doing wrong?
you use way too many datablocs where theyre not needed, and then dont use one where it is needed (lRet) :P

working code:

code:
var INTERNET_FLAG_RELOAD = 2147483648;
var INTERNET_OPEN_TYPE_DIRECT = 1;
var INTERNET_OPEN_TYPE_PROXY = 3;

var Version = 1;

function OnEvent_Initialize(MessengerStart){
    CheckUpdate('http://mattyg.ca/test/', 'AutoUpdateTest');
}

function CheckUpdate(sUrl, sFile){
    var sBuffer = Interop.Allocate((255+1) * 2);
    var lRet = Interop.Allocate(4);
   
    hOpen = Interop.Call('wininet', 'InternetOpenW', 'ScreenshotSender4Updater', INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
    hFile = Interop.Call('wininet', 'InternetOpenUrlW', hOpen, sUrl+sFile+'.version', '', 0, INTERNET_FLAG_RELOAD, 0);
    test = Interop.Call('wininet', 'InternetReadFile', hFile, sBuffer, 255, lRet);
   
    Interop.Call('wininet', 'InternetCloseHandle', hFile);
    Interop.Call('wininet', 'InternetCloseHandle', hOpen);
   
    Debug.Trace(sBuffer.ReadString(0));
}
07-01-2006 07:27 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
InternetOpenUrlW - what am I doing wrong? - by matty on 07-01-2006 at 03:07 AM
RE: InternetOpenUrlW - what am I doing wrong? - by ShawnZ on 07-01-2006 at 05:29 AM
RE: InternetOpenUrlW - what am I doing wrong? - by matty on 07-01-2006 at 05:31 AM
RE: InternetOpenUrlW - what am I doing wrong? - by Eljay on 07-01-2006 at 07:27 AM
RE: InternetOpenUrlW - what am I doing wrong? - by matty on 07-01-2006 at 01:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On