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.

57 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. BOOL CDfName::IsEqual(CDfName const *pdfn) const
  29. {
  30. if (_cb != pdfn->_cb)
  31. return FALSE;
  32. return dfwcsnicmp((WCHAR *)_ab, (WCHAR *)pdfn->_ab, _cb/sizeof(WCHAR)) == 0;
  33. }
  34. //+---------------------------------------------------------------------------
  35. //
  36. // Member: CDfName::CopyString, public
  37. //
  38. // Synopsis: Makes a proper copy of a name in a WCHAR string
  39. //
  40. // Arguments: [pwcs] - String
  41. //
  42. // History: 14-May-93 DrewB Created
  43. //
  44. // Notes: Uses leading characters to determine the format of
  45. // the name in the string
  46. //
  47. //----------------------------------------------------------------------------
  48. void CDfName::CopyString(WCHAR const *pwcs)
  49. {
  50. Set(pwcs);
  51. }