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.

36 lines
1.1 KiB

  1. #ifdef UNICODE
  2. #define ATOI( pString ) UnicodeStringToNumber( pString )
  3. #define ATOL( pString ) (LONG)UnicodeStringToNumber( pString )
  4. #define STRCHR( pString, Char ) wcschr( pString, Char )
  5. #define STRRCHR( pString, Char ) wcsrchr( pString, Char )
  6. #define STRSTR( pString, pString1 ) wcsstr( pString, pString1 )
  7. #define STRLEN( pString ) wcslen( pString )
  8. #else
  9. #define ATOI( pString ) atoi( pString )
  10. #define ATOL( pString ) atol( pString )
  11. #define STRCHR( pString, Char ) strchr( pString, Char )
  12. #define STRRCHR( pString, Char ) strrchr( pString, Char )
  13. #define STRSTR( pString, pString1 ) strstr( pString, pString1 )
  14. #define STRLEN( pString ) strlen( pString )
  15. #endif
  16. #define UNKNOWN_LENGTH -1
  17. INT AnsiToUnicodeString( LPCSTR pAnsi, LPWSTR pUnicode, INT StringLength );
  18. LPWSTR AllocateUnicodeString( LPCSTR pAnsi );
  19. VOID FreeUnicodeString( LPWSTR pString );
  20. int UnicodeStringToNumber( LPCWSTR pString );
  21. #ifndef UNICODE
  22. INT UnicodeToAnsiString( LPCWSTR pUnicode, LPSTR pAnsi, INT StringLength );
  23. LPSTR AllocateAnsiString( LPCWSTR pUnicode );
  24. VOID FreeAnsiString( LPSTR pString );
  25. #endif
  26.