forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is this a bug in the debug-mode of the IDE?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
bornsoft
Contributor
Contributor


Joined: 19 Feb 2009
Posts: 113
Location: Germany

PostPosted: Sun Feb 28, 2010 3:31 am    Post subject: Is this a bug in the debug-mode of the IDE? Reply with quote

Hi,

please try this. first run it normal and then in debug-mode.
there is always error 87 returned.

Try other api-calls - in debug-mode is always error 87.

Edit: Sorry, I forgot: This occurs in VDS 6 on WinXP SP3.

Code:

#DEFINE Command,GetLastError

    loadlib wininet.dll
    #  This should work correct
    %x = @lib(WININET,InternetCheckConnectionA,bool:,STR:http://www.google.de,int:1,int:0)
 GetLastError
    freelib wininet.dll

    loadlib wininet.dll
    #  And this should produce error 2250
    %x = @lib(WININET,InternetCheckConnectionA,bool:,str:http://www.google.de,int:A,int:0)
 GetLastError
    freelib wininet.dll
    exit


:GetLastError
    loadlib kernel32
    info Error code:  @lib(KERNEL32,GetLastError,int:)@tab()
    %x = @LIB(KERNEL32,SetLastError,nil:,int:0)
    exit



Last edited by bornsoft on Mon Mar 01, 2010 11:20 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Feb 28, 2010 1:55 pm    Post subject: Reply with quote

Didn't debug, but don't you need the NIL param in GetLastError?
Code:
@lib(KERNEL32,GetLastError,int:,nil:)

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
bornsoft
Contributor
Contributor


Joined: 19 Feb 2009
Posts: 113
Location: Germany

PostPosted: Sun Feb 28, 2010 2:23 pm    Post subject: Reply with quote

hmm, don't know, but the function doesn't expect anything, so why should I need to tell it that there is nothing coming on Wink

But anyway, it's the same behaviour with or without NIL.
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Feb 28, 2010 3:08 pm    Post subject: Reply with quote

I assumed VDS needed to know there was a void param, not the function.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Feb 28, 2010 10:41 pm    Post subject: Reply with quote

bornsoft, when I run your code above I get Error code: 0 then Error code: 2250
Isn't that what is supposed to happen?

I don't get error 87 either compiled or in the IDE

BTW - This is on Win 7 x64 and VDS 6


Last edited by Aslan on Mon Mar 01, 2010 4:47 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
bornsoft
Contributor
Contributor


Joined: 19 Feb 2009
Posts: 113
Location: Germany

PostPosted: Mon Mar 01, 2010 3:23 am    Post subject: Reply with quote

this is strange. I dit set up my system 2 weeks ago, it is pretty clean. (XP SP3) No idea, what could cause this error.

Thanks for testing anyway Aslan.
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Mar 01, 2010 4:49 am    Post subject: Reply with quote

bornsoft,
What version of VDS are you using.

I edited my last post to include that I tested your code with VDS 6
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Mar 05, 2010 2:38 am    Post subject: Re: Is this a bug in the debug-mode of the IDE? Reply with quote

bornsoft wrote:
Code:

#DEFINE Command,GetLastError

    loadlib wininet.dll
    #  This should work correct
    %x = @lib(WININET,InternetCheckConnectionA,bool:,STR:http://www.google.de,int:1,int:0)
 GetLastError
    freelib wininet.dll

    loadlib wininet.dll
    #  And this should produce error 2250
    %x = @lib(WININET,InternetCheckConnectionA,bool:,str:http://www.google.de,int:A,int:0)
 GetLastError
    freelib wininet.dll
    exit


:GetLastError
    loadlib kernel32.dll
    info Error code:  @lib(kernel32,GetLastError,int:,NIL:)@tab()
    %x = @LIB(KERNEL32,SetLastError,nil:,int:0)
    exit



Hmmm I corrected the GetLastError command but this is not a good idea. You should not purposely try to make a Win32 API fail. There are very few reasons to do this and in this case I would not. Wink Especially with VDS. Maybe with a more robust language like C, C++ or Delphi but not VDS.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group