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.

63 lines
1.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: dfname.cxx
  7. //
  8. // Contents: CDfName implementation
  9. //
  10. // History: 14-May-93 DrewB Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #include <dfhead.cxx>
  14. #pragma hdrstop
  15. //+---------------------------------------------------------------------------
  16. //
  17. // Member: CDfName::IsEqual, public
  18. //
  19. // Synopsis: Compares two CDfNames
  20. //
  21. // Arguments: [pdfn] - Name to compare against
  22. //
  23. // Returns: TRUE/FALSE
  24. //
  25. // History: 11-May-93 DrewB Created
  26. //
  27. //----------------------------------------------------------------------------
  28. #ifdef FLAT
  29. BOOL CDfName::IsEqual(CDfName const *pdfn) const
  30. {
  31. if (_cb != pdfn->_cb)
  32. return FALSE;
  33. return dfwcsnicmp((WCHAR *)_ab, (WCHAR *)pdfn->_ab, _cb) == 0;
  34. }
  35. #endif
  36. //+---------------------------------------------------------------------------
  37. //
  38. // Member: CDfName::CopyString, public
  39. //
  40. // Synopsis: Makes a proper copy of a name in a WCHAR string
  41. //
  42. // Arguments: [pwcs] - String
  43. //
  44. // History: 14-May-93 DrewB Created
  45. //
  46. // Notes: Uses leading characters to determine the format of
  47. // the name in the string
  48. //
  49. //----------------------------------------------------------------------------
  50. #ifdef CODESEGMENTS
  51. #pragma code_seg(SEG_CDfName_CopyString)
  52. #endif
  53. void CDfName::CopyString(WCHAR const *pwcs)
  54. {
  55. Set(pwcs);
  56. }