Hi all ..
Look this code below:
*********************************************
ShowOKButton True
Declare "Function ConnMgrMapURL Lib ""Cellcore.dll"" (ByVal URL as string,
byRef Guid() as Long, byVal Index as Long) as Integer"
Declare "Function ConnMgrEstablishConnectionSync lib ""cellcore.dll"" (byRef
ConnectionInfo() as long, byRef Connection as long, byVal Timeout as long,
byRef Status as long) as Integer"
Const S_OK = 0
Const CONNMGR_PARAM_GUIDDESTNET = &h1
Const CONNMGR_FLAG_PROXY_HTTP = &h1
Const CONNMGR_PRIORITY_USERINTERACTIVE = &h08000
Const CONNMGR_STATUS_CONNECTED = &H10
'This is a CONNMGR_CONNECTIONINFO structure. See MSDN for details
Dim ConnectionInfo(15)
For i=0 To 15
ConnectionInfo(i)=CLng(0)
Next
ConnectionInfo(0)=CLng(16*4) 'cbSize
ConnectionInfo(1)=CLng(CONNMGR_PARAM_GUIDDESTNET) 'dwParams
ConnectionInfo(2)=CLng(CONNMGR_FLAG_PROXY_HTTP) 'dwFlags
ConnectionInfo(3)=CLng(CONNMGR_PRIORITY_USERINTERACTIVE) 'dwPriority
'This is a destination netword GUID
Dim Guid(3)
i=CLng(0)
res=ConnMgrMapURL("http://www.google.com.br/", Guid, i)
If res<>S_OK Then
MsgBox "Error in ConnMapURL " & res
End If
MsgBox guid(0) & vbCrLf & guid(1) & vbCrLf & guid(2) & vbCrLf & guid(3)
'Copy the result of ConnMgrMapUrl into the structure
For i=0 To 3
ConnectionInfo(6+i)=CLng(guid(i))
Next
Connection=CLng(0)
timeout=CLng(60000) '60 seconds
status=CLng(0)
res=ConnMgrEstablishConnectionSync(ConnectionInfo, Connection, timeout, status)
MsgBox "res:" & res & vbCrLf & "Connection:" & connection & vbCrLf & "Status:
" & Hex(status)
***********************************
The return in last msgbox is: Res: 87, Connection : 0, Status : 0
I dont undestood how to do to connect. This code is an tecnote do nsbasic/ce..
Whoo could help me ?
Thanks all ...
--
You received this message because you are subscribed to the Google Groups
"nsb-ce" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nsb-ce?hl=en.