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.

76 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. csrdlini.c
  5. Abstract:
  6. This module implements functions that are used by the Win32 Initialization
  7. File APIs to communicate with csrss.
  8. Author:
  9. Michael Zoran (mzoran) 21-Jun-1998
  10. Revision History:
  11. --*/
  12. #include "basedll.h"
  13. NTSTATUS
  14. CsrBasepRefreshIniFileMapping(
  15. PUNICODE_STRING BaseFileName
  16. )
  17. {
  18. #if defined(BUILD_WOW6432)
  19. return NtWow64CsrBasepRefreshIniFileMapping(BaseFileName);
  20. #else
  21. NTSTATUS Status;
  22. BASE_API_MSG m;
  23. PBASE_REFRESHINIFILEMAPPING_MSG ap = &m.u.RefreshIniFileMapping;
  24. PCSR_CAPTURE_HEADER CaptureBuffer;
  25. CaptureBuffer = NULL;
  26. if (BaseFileName->Length > (MAX_PATH * sizeof( WCHAR ))) {
  27. return STATUS_INVALID_PARAMETER;
  28. }
  29. CaptureBuffer = CsrAllocateCaptureBuffer( 1,
  30. BaseFileName->MaximumLength
  31. );
  32. if (CaptureBuffer == NULL) {
  33. return STATUS_NO_MEMORY;
  34. }
  35. CsrCaptureMessageString( CaptureBuffer,
  36. (PCHAR)BaseFileName->Buffer,
  37. BaseFileName->Length,
  38. BaseFileName->MaximumLength,
  39. (PSTRING)&ap->IniFileName
  40. );
  41. CsrClientCallServer( (PCSR_API_MSG)&m,
  42. CaptureBuffer,
  43. CSR_MAKE_API_NUMBER( BASESRV_SERVERDLL_INDEX,
  44. BasepRefreshIniFileMapping
  45. ),
  46. sizeof( *ap )
  47. );
  48. Status = (NTSTATUS)m.ReturnValue;
  49. CsrFreeCaptureBuffer( CaptureBuffer );
  50. return Status;
  51. #endif
  52. }