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.

78 lines
3.3 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright (c) 1994-1998 Microsoft Corporation
  4. //*********************************************************************
  5. //
  6. // RNACALL.H - header file for RNA functions
  7. //
  8. // HISTORY:
  9. //
  10. // 1/20/95 jeremys Created (mostly cloned from RNA UI code)
  11. // 96/01/31 markdu Renamed CONNENTDLG to OLDCONNENTDLG to avoid
  12. // conflicts with RNAP.H.
  13. // 96/02/23 markdu Replaced RNAValidateEntryName with
  14. // RASValidateEntryName
  15. // 96/02/24 markdu Re-wrote the definition of ENUM_MODEM to
  16. // use RASEnumDevices() instead of RNAEnumDevices().
  17. // Also removed RNAGetDeviceInfo().
  18. // 96/02/24 markdu Re-wrote the definition of ENUM_CONNECTOID to
  19. // use RASEnumEntries() instead of RNAEnumConnEntries().
  20. // 96/02/26 markdu Replaced all remaining internal RNA APIs.
  21. // Also copied two structures (tagPhoneNum and tapIPData)
  22. // from rnap.h and tagIAddr from rnaphint.h for internal use only.
  23. // 96/03/07 markdu Extend ENUM_MODEM class
  24. // 96/03/08 markdu Added ENUM_MODEM::VerifyDeviceNameAndType
  25. // 96/03/09 markdu Moved all function prototypes here from wizard.h
  26. // 96/03/09 markdu Added LPRASENTRY parameter to CreateConnectoid()
  27. // 96/03/09 markdu Moved all references to 'need terminal window after
  28. // dial' into RASENTRY.dwfOptions.
  29. // Also no longer need GetConnectoidPhoneNumber function.
  30. // 96/03/10 markdu Moved all references to modem name into RASENTRY.
  31. // 96/03/10 markdu Moved all references to phone number into RASENTRY.
  32. // Moved tagPhoneNum to inetapi.h
  33. // 96/03/11 markdu Moved code to set username and password out of
  34. // CreateConnectoid into SetConnectoidUsername so it can be reused.
  35. // 96/03/13 markdu Change ValidateConncectoidName to take LPCSTR.
  36. // 96/03/16 markdu Added ReInit member function to re-enumerate modems.
  37. // 96/03/25 markdu Removed GetIPInfo and SetIPInfo.
  38. // 96/04/04 markdu Added phonebook name param to CreateConnectoid,
  39. // ValidateConnectoidName, and SetConnectoidUsername.
  40. // 96/05/16 markdu NASH BUG 21810 Added function for IP address validation.
  41. //
  42. #ifndef _RNACALL_H_
  43. #define _RNACALL_H_
  44. // function pointer typedefs for RNA apis from rnaph.dll and rasapi32.dll
  45. typedef DWORD (WINAPI * RASENUMDEVICES) (LPRASDEVINFO, LPDWORD, LPDWORD);
  46. typedef DWORD (WINAPI * RASENUMENTRIES) (LPSTR,LPSTR,LPRASENTRYNAME,LPDWORD,LPDWORD);
  47. class ENUM_MODEM
  48. {
  49. private:
  50. DWORD m_dwError;
  51. DWORD m_dwNumEntries;
  52. DWORD m_dwIndex;
  53. LPRASDEVINFO m_lpData;
  54. public:
  55. ENUM_MODEM();
  56. ~ENUM_MODEM();
  57. DWORD ReInit();
  58. CHAR * Next();
  59. CHAR * GetDeviceTypeFromName(LPSTR szDeviceName);
  60. CHAR * GetDeviceNameFromType(LPSTR szDeviceType);
  61. BOOL VerifyDeviceNameAndType(LPSTR szDeviceName, LPSTR szDeviceType);
  62. DWORD GetNumDevices() { return m_dwNumEntries; }
  63. DWORD GetError() { return m_dwError; }
  64. void ResetIndex() { m_dwIndex = 0; }
  65. };
  66. // function prototypes
  67. BOOL InitRNA(HWND hWnd);
  68. VOID DeInitRNA();
  69. DWORD EnsureRNALoaded(VOID);
  70. #endif // _RNACALL_H_