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.

59 lines
1.3 KiB

  1. #include <stdinc.h>
  2. BOOL
  3. W32::FindActCtxSectionStringW(
  4. DWORD dwFlags,
  5. const GUID *lpExtensionGuid,
  6. ULONG ulSectionId,
  7. PCWSTR lpStringToFind,
  8. PACTCTX_SECTION_KEYED_DATA lpReturnedData,
  9. DWORD &rdwWin32Error,
  10. ULONG cELEV,
  11. va_list ap
  12. )
  13. {
  14. rdwWin32Error = ERROR_SUCCESS;
  15. BOOL fSuccess = ::FindActCtxSectionStringW(dwFlags, lpExtensionGuid, ulSectionId, lpStringToFind, lpReturnedData);
  16. if ((!fSuccess) && (cELEV != 0))
  17. {
  18. if (::IsLastErrorInList(cELEV, ap, rdwWin32Error))
  19. fSuccess = TRUE;
  20. }
  21. return fSuccess;
  22. }
  23. BOOL
  24. W32::FindActCtxSectionStringW(
  25. DWORD dwFlags,
  26. const GUID *lpExtensionGuid,
  27. ULONG ulSectionId,
  28. PCWSTR lpStringToFind,
  29. PACTCTX_SECTION_KEYED_DATA lpReturnedData,
  30. DWORD &rdwWin32Error,
  31. ULONG cELEV,
  32. ...
  33. )
  34. {
  35. BOOL f;
  36. va_list ap;
  37. va_start(ap, cELEV);
  38. f = W32::FindActCtxSectionStringW(dwFlags, lpExtensionGuid, ulSectionId, lpStringToFind, lpReturnedData, rdwWin32Error, cELEV, ap);
  39. va_end(ap);
  40. return f;
  41. }
  42. BOOL
  43. W32::FindActCtxSectionStringW(
  44. DWORD dwFlags,
  45. const GUID *lpExtensionGuid,
  46. ULONG ulSectionId,
  47. PCWSTR lpStringToFind,
  48. PACTCTX_SECTION_KEYED_DATA lpReturnedData
  49. )
  50. {
  51. DWORD x;
  52. return W32::FindActCtxSectionStringW(dwFlags, lpExtensionGuid, ulSectionId, lpStringToFind, lpReturnedData, x, 0);
  53. }