home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / Profiler / jviewprf / utils.hpp < prev   
Encoding:
C/C++ Source or Header  |  2000-05-04  |  1.0 KB  |  52 lines

  1. // utils.hpp
  2. //
  3. // Created 01/18/99
  4. //
  5. // (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  6. //
  7.  
  8. #ifndef __UTILS_HPP__
  9. #define __UTILS_HPP__
  10.  
  11. #include <jevmon.h>
  12.  
  13.  
  14. BOOL match (PSTR pattern, PSTR s);
  15.  
  16.  
  17. PCSTR StringForExecutionModel (JAVA_EXECUTION_MODEL exec);
  18.  
  19.  
  20. BOOL GrowPtrArray (PVOID **prgpArray, ULONG *pCount, ULONG nNeeded);
  21.  
  22. inline
  23. BOOL GrowStringArray (PSTR **prgpArray, ULONG *pCount)
  24. {
  25.     return GrowPtrArray((PVOID**)prgpArray, pCount, 1);
  26. }
  27.  
  28.  
  29. inline
  30. ULONG InterlockedIncrement (ULONG *pul)
  31. {
  32.     return (ULONG)InterlockedIncrement((LONG*)pul);
  33. }
  34.  
  35. inline
  36. ULONG InterlockedDecrement (ULONG *pul)
  37. {
  38.     return (ULONG)InterlockedDecrement((LONG*)pul);
  39. }
  40.  
  41. VOID __stdcall InterlockedAdd (__int64 *pqwDest, __int64 qwAdd);
  42.  
  43.  
  44. // Converts the given Utf8 format string to Ansi format for the current
  45. // codepage.  If the given string is already in Ansi format, return TRUE with
  46. // *ppszAnsi == NULL.
  47. BOOL Utf8ToAnsi (PCSTR pcszUtf8, PSTR *ppszAnsi);
  48.  
  49.  
  50. #endif /* __UTILS_HPP__ */
  51.  
  52.