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.

51 lines
1011 B

  1. //
  2. // Microsoft Corporation - Copyright 1997
  3. //
  4. //
  5. // BASE.CPP - Base class methods
  6. //
  7. #include "pch.h"
  8. // Constructors / Destructors
  9. CBase::CBase(
  10. LPECB lpEcb,
  11. LPSTR *lppszOut,
  12. LPSTR *lppszDebug,
  13. LPDUMPTABLE lpDT )
  14. {
  15. this->lpEcb = lpEcb;
  16. this->lpszOut = NULL;
  17. this->lpszDebug = NULL;
  18. this->lpDT = lpDT;
  19. if ( lppszOut )
  20. {
  21. *lppszOut = (LPSTR) GlobalAlloc( GMEM_FIXED, 65336 );
  22. if ( *lppszOut )
  23. {
  24. this->lpszOut = *lppszOut;
  25. this->lpszOut[ 0 ] = 0; // start empty;
  26. }
  27. }
  28. if ( lppszDebug )
  29. {
  30. *lppszDebug = (LPSTR) GlobalAlloc( GMEM_FIXED, 8196 );
  31. if ( *lppszDebug )
  32. {
  33. this->lpszDebug = *lppszDebug;
  34. this->lpszDebug[ 0 ] = 0; // start empty;
  35. }
  36. }
  37. } // CBase( )
  38. CBase::~CBase( )
  39. {
  40. GlobalFree( lpszDebug );
  41. GlobalFree( lpszOut );
  42. } // ~CBase( )