home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Contrib / Dialer / Dialer.txt < prev   
Text File  |  2003-03-18  |  3KB  |  121 lines

  1. DIALER PLUGIN
  2. -------------
  3.  
  4. Written by Amir Szekely aka KiCHiK
  5. Readme by Joost Verburg
  6.  
  7. The Dialer plugin for NSIS provides five functions related to internet connections.
  8.  
  9. To download files from the internet, use the NSISdl plugin.
  10.  
  11. USAGE
  12. -----
  13.  
  14. Example of usage:
  15.  
  16. ClearErrors           ;Clear the error flag
  17. Dialer::FunctionName  ;Call Dialer function
  18. IfErrors "" +3        ;Check for errors
  19.   MessageBox MB_OK "Function not available"
  20.   Quit
  21. Pop $R0               ;Get the return value from the stack
  22. MessageBox MB_OK $R0  ;Display the return value
  23.  
  24. EXAMPLE FUNCTION
  25. ----------------
  26.  
  27. ; ConnectInternet (uses Dialer plugin)
  28. ; Written by Joost Verburg 
  29. ;
  30. ; This function attempts to make a connection to the internet if there is no
  31. ; connection available. If you are not sure that a system using the installer
  32. ; has an active internet connection, call this function before downloading
  33. ; files with NSISdl.
  34. ; The function requires Internet Explorer 3, but asks to connect manually if
  35. ; IE3 is not installed.
  36.  
  37. Function ConnectInternet
  38.  
  39.   Push $R0
  40.     
  41.     ClearErrors
  42.     Dialer::AttemptConnect
  43.     IfErrors noie3
  44.     
  45.     Pop $R0
  46.     StrCmp $R0 "online" connected
  47.       MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
  48.       Quit ;Remove to make error not fatal
  49.     
  50.     noie3:
  51.   
  52.     ; IE3 not installed
  53.     MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
  54.     
  55.     connected:
  56.   
  57.   Pop $R0
  58.   
  59. FunctionEnd
  60.  
  61. FUNCTIONS
  62. ---------
  63.  
  64. If a function is not available on the system, the error flag will be set.
  65.  
  66. * AttemptConnect
  67.  
  68.   Attempts to make a connection to the Internet if the system is not connected.
  69.   
  70.   online - already connected / connection successful
  71.   offline - connection failed
  72.   
  73.   Requires Internet Explorer 3 or later
  74.  
  75. * AutodialOnline
  76.  
  77.   Causes the modem to automatically dial the default Internet connection if the system
  78.   is not connected to the internet. If the system is not set up to automatically
  79.   connect, it will prompt the user.
  80.   
  81.   Return values:
  82.   
  83.   online - already connected / connection successful
  84.   offline - connection failed
  85.   
  86.   Requires Internet Explorer 4 or later
  87.  
  88. * AutodialUnattended
  89.  
  90.   Causes the modem to automatically dial the default Internet connection if the system
  91.   is not connected to the internet. The user will not be prompted.
  92.   
  93.   Return values:
  94.   
  95.   online - already connected / connection successful
  96.   offline - connection failed
  97.   
  98.   Requires Internet Explorer 4 or later
  99.  
  100. * AutodialHangup
  101.  
  102.   Disconnects an automatic dial-up connection.
  103.   
  104.   Return values:
  105.  
  106.   success - disconnection successful
  107.   failure - disconnection failed
  108.   
  109.   Requires Internet Explorer 4 or later
  110.  
  111. * GetConnectedState
  112.  
  113.   Checks whether the system is connected to the internet.
  114.   
  115.   Return values:
  116.  
  117.   online - system is online
  118.   offline - system is offline
  119.   
  120.   Requires Internet Explorer 4 or later