Source code of Windows XP (NT5)
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.

47 lines
1.3 KiB

  1. // jmazner pinched from inetcfg\rnacall.h class ENUM_MODEM
  2. #ifndef __ENUMODEM_H_
  3. #define __ENUMODEM_H_
  4. #include "obcomglb.h"
  5. class CEnumModem
  6. {
  7. private:
  8. DWORD m_dwError;
  9. DWORD m_dwNumEntries;
  10. DWORD m_dwIndex;
  11. LPRASDEVINFO m_lpData;
  12. public:
  13. CEnumModem();
  14. ~CEnumModem();
  15. DWORD ReInit();
  16. WCHAR * Next();
  17. WCHAR * GetDeviceTypeFromName(LPWSTR szDeviceName);
  18. WCHAR * GetDeviceNameFromType(LPWSTR szDeviceType);
  19. WCHAR * GetDeviceName(DWORD dwIndex);
  20. WCHAR * GetDeviceType(DWORD dwIndex);
  21. BOOL VerifyDeviceNameAndType(LPWSTR szDeviceName, LPWSTR szDeviceType);
  22. DWORD GetNumDevices() { this->ReInit(); return m_dwNumEntries; }
  23. DWORD GetError() { return m_dwError; }
  24. void ResetIndex() { m_dwIndex = 0; }
  25. };
  26. // from inetcfg\export.cpp
  27. // structure to pass data back from IDD_CHOOSEMODEMNAME handler
  28. typedef struct tagCHOOSEMODEMDLGINFO
  29. {
  30. LPWSTR szModemName[RAS_MaxDeviceName + 1];
  31. HRESULT hr;
  32. } CHOOSEMODEMDLGINFO, * PCHOOSEMODEMDLGINFO;
  33. BOOL CALLBACK ChooseModemDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
  34. LPARAM lParam);
  35. BOOL ChooseModemDlgInit(HWND hDlg, PCHOOSEMODEMDLGINFO pChooseModemDlgInfo);
  36. BOOL ChooseModemDlgOK(HWND hDlg, PCHOOSEMODEMDLGINFO pChooseModemDlgInfo);
  37. //rnacall.cpp
  38. HRESULT InitModemList(HWND hCB);
  39. #endif // ENUMODEM.H