| View previous topic :: View next topic |
| Author |
Message |
bornsoft Contributor

Joined: 19 Feb 2009 Posts: 113 Location: Germany
|
Posted: Sun Feb 28, 2010 3:31 am Post subject: Is this a bug in the debug-mode of the IDE? |
|
|
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 |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sun Feb 28, 2010 1:55 pm Post subject: |
|
|
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 |
|
 |
bornsoft Contributor

Joined: 19 Feb 2009 Posts: 113 Location: Germany
|
Posted: Sun Feb 28, 2010 2:23 pm Post subject: |
|
|
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
But anyway, it's the same behaviour with or without NIL. |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sun Feb 28, 2010 3:08 pm Post subject: |
|
|
I assumed VDS needed to know there was a void param, not the function. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sun Feb 28, 2010 10:41 pm Post subject: |
|
|
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 |
|
 |
bornsoft Contributor

Joined: 19 Feb 2009 Posts: 113 Location: Germany
|
Posted: Mon Mar 01, 2010 3:23 am Post subject: |
|
|
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 |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Mar 01, 2010 4:49 am Post subject: |
|
|
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Mar 05, 2010 2:38 am Post subject: Re: Is this a bug in the debug-mode of the IDE? |
|
|
| 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. 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 |
|
 |
|
|
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
|
|