PC Review


Reply
Thread Tools Rate Thread

Connection Manager Call how?

 
 
David Hanson
Guest
Posts: n/a
 
      16th Nov 2003
Hey All,

So far I have put this wrapper together in VB.NET but am having trouble
trying to call the CConnMgrEstablishConnection method. Could someone show me
an example of how to do this?

Really need help on this one so hope you can help.

Dave Hanson



Imports System.Runtime.InteropServices
Public Class ConnMan
Private Const LocateDll As String = "Coredll.dll"

Public Structure CONNMGR_CONNECTIONINFO
Public cbSize As System.UInt32 'ToDo: Unsigned Integers not
supported
Public dwParams As System.UInt32 'ToDo: Unsigned Integers not
supported
Public dwFlags As System.UInt32 'ToDo: Unsigned Integers not
supported
Public dwPriority As System.UInt32 'ToDo: Unsigned Integers not
supported
Public bExclusive As System.UInt32 'ToDo: Unsigned Integers not
supported
Public bDisabled As System.UInt32 'ToDo: Unsigned Integers not
supported
Public guidDestNet() As Byte
Public hWnd As Integer
Public uMsg As System.UInt32 'ToDo: Unsigned Integers not supported
Public lParam As Integer
Public ulMaxCost As System.UInt64 'ToDo: Unsigned Integers not
supported
Public ulMinRcvBw As System.UInt64 'ToDo: Unsigned Integers not
supported
Public ulMaxConnLatency As System.UInt64 'ToDo: Unsigned Integers
not supported
End Structure 'CONNMGR_CONNECTIONINFO

Public CONNMGR_STATUS_UNKNOWN As Long = &H0
Public CONNMGR_STATUS_CONNECTED As Long = &H10
Public CONNMGR_STATUS_DISCONNECTED As Long = &H20
Public CONNMGR_STATUS_CONNECTIONFAILED As Long = &H21
Public CONNMGR_STATUS_CONNECTIONCANCELED As Long = &H22
Public CONNMGR_STATUS_CONNECTIONDISABLED As Long = &H23
Public CONNMGR_STATUS_NOPATHTODESTINATION As Long = &H24
Public CONNMGR_STATUS_WAITINGFORPATH As Long = &H25
Public CONNMGR_STATUS_WAITINGFORPHONE As Long = &H26
Public CONNMGR_STATUS_WAITINGCONNECTION As Long = &H40
Public CONNMGR_STATUS_WAITINGFORRESOURCE As Long = &H41
Public CONNMGR_STATUS_WAITINGFORNETWORK As Long = &H42
Public CONNMGR_STATUS_WAITINGDISCONNECTION As Long = &H80
Public CONNMGR_STATUS_WAITINGCONNECTIONABORT As Long = &H81

<DllImport(LocateDll)> _
Public Shared Function ConnMgrConnectionStatus(ByVal hConnection As
Long, ByRef pdwSatus As Long) As Long

End Function

<DllImport(LocateDll)> _
Public Shared Sub ConnMgrEnumDestinations(ByVal nIndex As Integer, ByRef
pDestInfo As CONNMGR_CONNECTIONINFO)

End Sub

<DllImport(LocateDll)> _
Public Shared Function CConnMgrEstablishConnection(ByRef pConnInfo As
CONNMGR_CONNECTIONINFO, ByRef hConnection As Long) As Long
End Function

<DllImport(LocateDll)> _
Public Shared Function ConnMgrEstablishConnectionSync(ByVal pConnInfo As
IntPtr, ByRef phConnection As IntPtr, ByVal dwTimeout As Integer, ByRef
pdwStatus As IntPtr) As IntPtr

End Function
<DllImport(LocateDll)> _
Public Shared Function ConnMgrMapURL(ByVal pwszURL As String, ByRef
pguid As Guid, ByRef pdwIndex As IntPtr) As IntPtr

End Function

End Class


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft goes after Cisco call manager ccie reports Microsoft Dot NET 0 18th Nov 2010 05:38 PM
How do is enable CommPilot Call Manager? JAAZ Microsoft Outlook Discussion 2 27th Jan 2008 10:17 PM
Changing connection type w/o using Connection Manager =?Utf-8?B?TWFyY28=?= Windows Vista Networking 0 22nd Jul 2007 01:56 PM
No Connection - Remote Access Connection Manager doesn't start... Ali6236 Windows XP Help 1 5th Feb 2005 12:06 PM
import connection from client connection manager Mauro Windows XP Work Remotely 1 17th Jun 2004 01:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:15 PM.