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.

32 lines
681 B

  1. #include "obcomglb.h"
  2. #include "appdefs.h"
  3. // BUGBUG - This function is not very effecient since it requires a alloc/free for each validation
  4. // plus strtok will tokenize the fill string requring a full search of the string.
  5. BOOL IsValid(LPCWSTR pszText, HWND hWndParent, WORD wNameID)
  6. {
  7. //ASSERT(pszText);
  8. WCHAR* pszTemp = NULL;
  9. BOOL bRetVal = FALSE;
  10. pszTemp = _wcsdup (pszText);
  11. if (lstrlen(pszTemp))
  12. {
  13. WCHAR seps[] = L" ";
  14. WCHAR* token = NULL;
  15. token = wcstok( pszTemp, seps );
  16. if (token)
  17. {
  18. bRetVal = TRUE;
  19. }
  20. }
  21. free(pszTemp);
  22. return bRetVal;
  23. }