WinInet DECLS to Mod - But Wrong

BlitzMax Forums/BlitzMax Programming/WinInet DECLS to Mod - But Wrong

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's how I tried it:
Import "-lwininet"
Extern 
	Function InternetOpen(sAgent:Byte Ptr, lAccessType, sProxyName:Byte Ptr, sProxyBypass:Byte Ptr, lFlags) = "InternetOpenA@20"

End Extern

Local hOpen = InternetOpen("test", 1, "", "", 0)
DebugLog hOpen
DebugLog hOpen
DebugLog hOpen
but this causes an odd crash:
13369348
2009443488
2009443488
Assertion failed: scopeStackTop>0, file C:/Program Files/BlitzMax/mod/brl.mod/appstub.mod/debugger.stdio.c, line 487
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Unhandled Exception: Received Signal
	BlitzMax Console Debugger H=Help
Declare Function InternetOpen Lib "wininet" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long