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.

96 lines
2.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. mprthred.cxx
  7. Class definition for worker thread for the network connection dialog
  8. FILE HISTORY:
  9. YiHsinS 4-Mar-1993 Created
  10. */
  11. #ifndef _MPRTHRED_HXX_
  12. #define _MPRTHRED_HXX_
  13. #include <w32event.hxx>
  14. #include <w32thred.hxx>
  15. /*************************************************************************
  16. NAME: MPR_ENUM_THREAD
  17. SYNOPSIS: This class runs in a separate thread, enumerating the
  18. appropriate providers, domains, servers...
  19. INTERFACE:
  20. PARENT: WIN32_THREAD
  21. USES:
  22. NOTES:
  23. HISTORY:
  24. YiHsinS 4-Mar-1993 Created
  25. **************************************************************************/
  26. class MPR_ENUM_THREAD : public WIN32_THREAD
  27. {
  28. private:
  29. //
  30. // Information needed to perform the enumeration
  31. //
  32. HWND _hwndDlg;
  33. UINT _uiType;
  34. NETRESOURCE _netresProvider;
  35. NLS_STR _nlsWkstaDomain;
  36. //
  37. // Set when the main dialog is exiting.
  38. //
  39. BOOL _fThreadIsTerminating;
  40. //
  41. // Exit thread event
  42. //
  43. WIN32_EVENT _eventExitThread;
  44. protected:
  45. //
  46. // This method gets the data
  47. //
  48. virtual APIERR Main( VOID );
  49. //
  50. // THIS DELETES *this!! Don't reference any members after this
  51. // has been called!
  52. //
  53. virtual APIERR PostMain( VOID );
  54. public:
  55. MPR_ENUM_THREAD( HWND hwndDlg,
  56. UINT uiType,
  57. LPNETRESOURCE pnetresProvider,
  58. const TCHAR *pszWkstaDomain );
  59. virtual ~MPR_ENUM_THREAD();
  60. //
  61. // This signals the thread to *asynchronously* cleanup and die.
  62. //
  63. // THIS OBJECT WILL BE DELETED SOMETIME AFTER THIS CALL!
  64. //
  65. APIERR ExitThread( void )
  66. { _fThreadIsTerminating = TRUE;
  67. return _eventExitThread.Set(); }
  68. };
  69. #endif //_MPRTHRED_HXX_