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.

68 lines
1.9 KiB

  1. #ifndef _OPRAHCOM_H_
  2. #define _OPRAHCOM_H_
  3. #include <nmutil.h>
  4. #include <tchar.h>
  5. #include <stock.h>
  6. #include <confdbg.h>
  7. #include <memtrack.h>
  8. // Some string functions that used to be defined here have been moved to
  9. // STRUTIL. We include that header file so that source files that include
  10. // this file continue to work.
  11. #include <strutil.h>
  12. BOOL NMINTERNAL CanShellExecHttp();
  13. BOOL NMINTERNAL CanShellExecMailto();
  14. BOOL NMINTERNAL GetInstallDirectory(LPTSTR psz);
  15. INLINE DWORD
  16. CompareGuid(GUID * p1, GUID * p2)
  17. {
  18. ASSERT(NULL != p1);
  19. ASSERT(NULL != p2);
  20. return memcmp(p1, p2, sizeof(GUID));
  21. }
  22. INLINE VOID
  23. ClosePh(HANDLE * ph)
  24. {
  25. if ((NULL == ph) || (NULL == *ph))
  26. return;
  27. CloseHandle(*ph);
  28. *ph = NULL;
  29. }
  30. BOOL NMINTERNAL FFileExists(LPCTSTR szFile);
  31. BOOL NMINTERNAL FDirExists(LPCSTR szDir);
  32. BOOL NMINTERNAL FEnsureDirExists(LPCTSTR szDir);
  33. BOOL NMINTERNAL FEnsureDirName(LPTSTR pszPath);
  34. DWORD NMINTERNAL CreateNewFile(LPTSTR pszFile);
  35. BOOL NMINTERNAL FCreateNewFile(LPCTSTR pcszPath, LPCTSTR pcszName,
  36. LPCTSTR pcszExt, LPTSTR pszResult, int cchMax);
  37. LPCTSTR NMINTERNAL ExtractFileName(LPCTSTR pcszPathName);
  38. #if defined(UNICODE)
  39. LPCSTR NMINTERNAL ExtractFileNameA(LPCSTR pcszPathName);
  40. #else // defined(UNICODE)
  41. #define ExtractFileNameA ExtractFileName
  42. #endif // defined(UNICODE)
  43. BOOL NMINTERNAL SanitizeFileName(LPTSTR psz);
  44. VOID NMINTERNAL CenterWindow(HWND hwndChild, HWND hwndParent);
  45. /****************************************************************************
  46. Processor ID and Speed routines
  47. *****************************************************************************/
  48. #ifdef _M_IX86
  49. HRESULT NMINTERNAL GetNormalizedCPUSpeed (int *pdwNormalizedSpeed, int *iFamily);
  50. int NMINTERNAL GetProcessorSpeed(int *pdwFamily);
  51. #endif
  52. BOOL NMINTERNAL IsFloatingPointEmulated(void);
  53. #endif // _OPRAHCOM_H_