NetDUN Class (Dial-Up Networking) | ||
Version
beta www.capesoft.com Updated 07 June 2011 |
||
EntryNameString(NetDUN_MaxEntryName) | This is the name of the Dial-up Entry |
StateStr | This is the string description of the State ulong property. |
ErrorStr string(50) | This is the string description of the Error ulong property |
IP string(32) | The IP address assigned to this connection |
ServerIP string(32) | The IP address of the server (i.e. the machine that you dialed into) |
Name string(NetDUN_MaxDeviceName) | Device Name |
Type string(NetDUN_MaxDeviceType) | Device Type |
Handle Ulong | Connection handle (windows handle) |
State Ulong | The state of the connection. If connected this is set to 8192 |
Error Ulong | The error value. 0 = no error. |
Size Ulong | Size of structure. |
EntryName String(NetDUN_MaxEntryName) | This is the name of the Dial-up Entry |
PhoneNumber String(256) | The phone number that will be dialed. You need to specify this number before dialing the connection. |
CountryCode uLong | This is the country code of the phone number. |
AreaCode string(10) | This is the area code of the phone number. |
LocalPhoneNumber string(128) | This is the local number of the phone number. |
UserName string(NetDUN_UNLEN) | UserName for login. (Note you may need to provide this before dialing). |
Password string(NetDUN_PWLEN) | Password for login. (Note you may need to provide this before dialing, specially in Win2K). |
Domain string(NetDUN_DNLEN) | Domain for login (blank if unused). (Note you may need to provide this before dialing). |
Size Ulong | Size of structure. |
DeviceType String(NetDUN_MaxDeviceType) | This is the Type of the Device. |
DeviceName String(NetDUN_MaxDeviceName) | This is the Name of the Device. |
ConnectionsQ &NetDUNConnectionsQType | This queue holds all the information for the current connections. Look at the NetDUN Data Structures for a description of the NetDUNConnectionsQType. |
ControlTemplateINIFile String(255) | This property is only used in the Control template. It stores the INI file that will be used to store the Outside line. It defaults to '\.netdemo.ini'. You can change this in your object's Init() method after the parent call. |
DevicesQ &NetDUNDevicesQType | This queue holds the information about the various Dial-up devices on the machine. This is normally a list of the modem drivers that have been installed. Look at the NetDUN Data Structures for a description of the NetDUNDevicesQType. |
DunEntriesQ &NetDUNDunEntriesQType | This queue holds all the information about the Dial-up connections. These are the entries in what used to be known as the Phone Book. This is the same list that Windows Explorer shows in the "Dial-Up Networking" special folder. Look at the NetDUN Data Structures for a description of the NetDUNDunEntriesQType. |
Error Long | Contains the error value of the last transaction. 0 = no error. You can use the InterpretError() method for converting the error code into an error string. |
ErrorString String(255) | Contains the last error string that was reported. It only changes the next time an error occurs. |
SuppressErrorMsg Byte | Set this to 1 to disable error messages, otherwise leave it as 0. |
UseThisThread long | (Advanced Optional Property). This property allows you to manually specify which thread must receive the messages that the NetTalk DLL posts to the NetTalk objects. Set this property before calling the Init() method. Defaults to 0 (no action). |
ConnectionsChanged(long p_AliveConnections)) (Notification Method) |
This method is called when a new dial-up connection is established.
p_AliveConnections is the number of connections that are "alive" i.e.
established. This number may be different to records (self.ConnectionsQ) as
there may be some connections that are not yet connected as well as some connections
that are in a disconnecting state. Warning, this function is called a good number of times. Basically whenever some state changes with the connection this method is called. |
Dial(), ulong |
Call this method to dial the currently loaded record in the
self.DunEntries queue. (This means you need to do a get
(self.DunEntriesQ, x) where x is the index of the DUN entry that you
want to dial. Important: Having chosen a Dial-Up Networking Entry (and have loaded it in self.DunEntriesQ) you need to specify the following fields in self.DunEntriesQ: self.DunEntriesQ.PhoneNumber and in some cases (specially if you are using Win2K) you will need to specify: self.DunEntriesQ.UserName self.DunEntriesQ.Password self.DunEntriesQ.Domain (if used). |
DeleteDunEntry() |
Call this method to delete a DUN entry in windows. This deletes the currently loaded record in the self.DunEntries queue. (This means you need to do a get (self.DunEntriesQ, x) where x is the index of the DUN entry that you want to dial. |
EditDunEntry() |
Call this method to edit a DUN entry in windows. This method loads the Windows Dialup Window. This edits the currently loaded record in the self.DunEntries queue. (This means you need to do a get (self.DunEntriesQ, x) where x is the index of the DUN entry that you want to dial. |
ErrorTrap
(string p_errorStr,
string p_functionName) |
This function is called when an error occurs. |
GetConnections() |
Call this method to get the list of current connections. The connections are placed in self.connectionQ |
GetDunEntries() |
Call this method to get a list of the Dial-up entries. They are returned in self.DunEntriesQ |
GetDevices() |
Call this method to get a list of the Devices. They are returned in self.DevicesQ. |
HangUp() |
Call this function to hangup the connection currently loaded in the self.ConnectionsQ. This means you need to do a get (self.ConnectionsQ, x) where x is the index of the connection queue record that you want to hangup. |
Init() |
Initialises the object. This is done for you by the template. |
InterpretError(),string |
Returns the a description of the self.error error code. |
Kill() |
Kills the object. This is done for you by the NetTalk template. |
NewDunEntry() |
Call this method to create a new DUN entry in windows. This method loads the Windows Dialup Window. |
Prime() |
Internal method. |
RenameDunEntry
(string p_NewName) |
Call this method to rename a DUN entry in windows. This renames the currently loaded record in the self.DunEntries queue. (This means you need to do a get (self.DunEntriesQ, x) where x is the index of the DUN entry that you want to dial. You need to specify the new name in the method parameters. |
TakeEvent() |
Internal Method |