Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
4.9 KiB

  1. /* Copyright (c) 1999, Microsoft Corporation, all rights reserved
  2. **
  3. ** autodial.h
  4. ** Autodial remote access external API
  5. ** Public header for external API clients
  6. **
  7. */
  8. #ifndef _MILLEN_AUTODIAL_H_
  9. #define _MILLEN_AUTODIAL_H_
  10. // First two match WinInet
  11. #define RAS_INTERNET_AUTODIAL_FORCE_DIAL 0x00000001
  12. #define RAS_INTERNET_AUTODIAL_UNATTENDED 0x00000002
  13. // #define RAS_INTERNET_AUTODIAL_FAILIFSECURITYCHECK 0x0000004
  14. #define RAS_INTERNET_AUTODIAL_NO_TRAY_ICON 0x00000010
  15. #define RAS_INTERNET_AUTODIAL_NO_REDIAL 0x00000020
  16. #define RAS_INTERNET_AUTODIAL_ALLOW_OFFLINE 0x00000040
  17. #define RAS_INTERNET_AUTODIAL_RECONNECT 0x00000080
  18. #define RAS_INTERNET_AUTODIAL_RESERVED 0x80000000
  19. #define RAS_INTERNET_AUTODIAL_FLAGS_MASK RAS_INTERNET_AUTODIAL_UNATTENDED | \
  20. RAS_INTERNET_AUTODIAL_FORCE_DIAL | \
  21. RAS_INTERNET_AUTODIAL_NO_TRAY_ICON | \
  22. RAS_INTERNET_AUTODIAL_NO_REDIAL | \
  23. RAS_INTERNET_AUTODIAL_ALLOW_OFFLINE | \
  24. RAS_INTERNET_AUTODIAL_RECONNECT | \
  25. RAS_INTERNET_AUTODIAL_RESERVED
  26. DWORD APIENTRY RasInternetDialA( HWND, LPSTR, DWORD, DWORD *, DWORD );
  27. DWORD APIENTRY RasRegisterAutodialCallbackA( DWORD, DWORD, LPVOID, LPHANDLE, DWORD );
  28. DWORD APIENTRY RasUnregisterAutodialCallbackA( HANDLE );
  29. BOOL APIENTRY RasInternetAutodialA( DWORD, HWND );
  30. BOOL APIENTRY RasInternetAutodialHangUpA( DWORD );
  31. DWORD APIENTRY RasInternetHangUpA( DWORD, DWORD );
  32. #define RAS_INTERNET_CONNECTION_MODEM 0x01
  33. #define RAS_INTERNET_CONNECTION_LAN 0x02
  34. #define RAS_INTERNET_CONNECTION_PROXY 0x04
  35. #define RAS_INTERNET_CONNECTION_MODEM_BUSY 0x08 /* no longer used */
  36. #define RAS_INTERNET_RAS_INSTALLED 0x10
  37. #define RAS_INTERNET_CONNECTION_OFFLINE 0x20
  38. #define RAS_INTERNET_CONNECTION_CONFIGURED 0x40
  39. BOOL APIENTRY RasInternetGetConnectedStateExA(
  40. OUT LPDWORD lpdwFlags,
  41. OUT LPSTR lpszConnectionName,
  42. IN DWORD dwBufLen,
  43. IN DWORD dwReserved
  44. );
  45. // Taken from WinInet.h
  46. // Custom dial handler prototype
  47. typedef DWORD (FAR PASCAL * PFNCUSTOMDIALHANDLER) (HWND, LPCSTR, DWORD, LPDWORD);
  48. // Flags for custom dial handler
  49. #define INTERNET_CUSTOMDIAL_CONNECT 0
  50. #define INTERNET_CUSTOMDIAL_UNATTENDED 1
  51. #define INTERNET_CUSTOMDIAL_DISCONNECT 2
  52. #define INTERNET_CUSTOMDIAL_SHOWOFFLINE 4
  53. // Custom dial handler supported functionality flags
  54. #define INTERNET_CUSTOMDIAL_SAFE_FOR_UNATTENDED 1
  55. #define INTERNET_CUSTOMDIAL_WILL_SUPPLY_STATE 2
  56. #define INTERNET_CUSTOMDIAL_CAN_HANGUP 4
  57. // Settings for autodial
  58. //
  59. #define RAS_AUTODIAL_OPT_NONE 0x00000000 // No options
  60. #define RAS_AUTODIAL_OPT_NEVER 0x00000001 // Never Autodial
  61. #define RAS_AUTODIAL_OPT_ALWAYS 0x00000002 // Autodial regardless
  62. #define RAS_AUTODIAL_OPT_DEMAND 0x00000004 // Autodial on demand
  63. #define RAS_AUTODIAL_OPT_NOPROMPT 0x00000010 // Dial without prompting
  64. DWORD WINAPI RnaGetDefaultAutodialConnection(LPBYTE lpBuf, DWORD cb, LPDWORD lpdwOptions);
  65. DWORD WINAPI RnaSetDefaultAutodialConnection(LPSTR szEntry, DWORD dwOptions);
  66. // Auto disconnect managment
  67. typedef struct tagAutoDisInfo {
  68. DWORD dwSize;
  69. BOOL fIdleDisPromptDisabled;
  70. BOOL fDisconnectOnExit;
  71. DWORD dwIdleTimeoutSec; // Auto disconnect time, 0 = disabled
  72. } AUTODISINFO, *PAUTODISINFO, FAR* LPAUTODISINFO;
  73. DWORD NEAR PASCAL RnaGetAutoDisconnectInfoA (
  74. LPSTR lpszPhonebook,
  75. LPSTR szEntry,
  76. LPAUTODISINFO lpadi);
  77. DWORD NEAR PASCAL RnaSetAutoDisconnectInfoA (
  78. LPSTR lpszPhonebook,
  79. LPSTR szEntry,
  80. LPAUTODISINFO lpadi);
  81. #ifdef UNICODE
  82. #define RasInternetDial RasInternetDialW
  83. #define RasRegisterAutodialCallback RasRegisterAutodialCallbackW
  84. #define RasUnregisterAutodialCallback RasUnregisterAutodialCallbackW
  85. #define RasInternetAutodial RasInternetAutodialW
  86. #define RasInternetAutodialHangUp RasInternetAutodialHangUpW
  87. #define RasInternetHangUp RasInternetUpW
  88. #define RasInternetGetConnectedStateEx RasInternetGetConnectedStateExW
  89. #else
  90. #define RasInternetDial RasInternetDialA
  91. #define RasRegisterAutodialCallback RasRegisterAutodialCallbackA
  92. #define RasUnregisterAutodialCallback RasUnregisterAutodialCallbackA
  93. #define RasInternetAutodial RasInternetAutodialA
  94. #define RasInternetAutodialHangUp RasInternetAutodialHangUpA
  95. #define RasInternetHangUp RasInternetHangUpA
  96. #define RasInternetGetConnectedStateEx RasInternetGetConnectedStateExA
  97. #endif
  98. #endif // _AUTODIAL_H_