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.

45 lines
1.4 KiB

  1. // P2EWorker.h: interface for the CP2EWorker class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_P2EWORKER_H__E31CD929_FC30_413D_9944_E6991AFB61DE__INCLUDED_)
  5. #define AFX_P2EWORKER_H__E31CD929_FC30_413D_9944_E6991AFB61DE__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include <winsock2.h>
  10. #include <sbs6base.h>
  11. class CP2EWorker
  12. {
  13. public:
  14. CP2EWorker();
  15. virtual ~CP2EWorker();
  16. // Implementation
  17. public:
  18. int CreateUser( int argc, wchar_t *argv[], const bool bCreateUser, const bool bCreateMailbox );
  19. int Mail( int argc, wchar_t *argv[], const bool bDelete = false );
  20. void PrintError( int iRC );
  21. void PrintMessage( LPWSTR psMessage, bool bCRLF = true );
  22. void PrintMessage( int iID, bool bCRLF = true );
  23. void PrintUsage();
  24. protected:
  25. LPWSTR FormatLogString( LPWSTR psLogString );
  26. HRESULT GetMailFROM( LPCWSTR sFilename, ASTRING &sFrom );
  27. HRESULT RecvResp( SOCKET socket, LPCSTR psExpectedResp );
  28. HRESULT RegisterDependencies();
  29. HRESULT SendRecv( SOCKET socket, LPCSTR psSendBuffer, const int iSize, LPCSTR psExpectedResp );
  30. HRESULT UnRegisterDependencies();
  31. tstring GetModulePath ();
  32. // Attributes
  33. protected:
  34. bool m_bSuppressPrintError;
  35. };
  36. #endif // !defined(AFX_P2EWORKER_H__E31CD929_FC30_413D_9944_E6991AFB61DE__INCLUDED_)