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.

37 lines
1.4 KiB

  1. /******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 2001
  4. *
  5. * TITLE: sticfunc.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * DATE: 6 March, 2001
  10. *
  11. * DESCRIPTION:
  12. * This file contains "C" style functions used in the STI/WIA service.
  13. *
  14. ******************************************************************************/
  15. #include <nt.h>
  16. #include <ntrtl.h>
  17. #include <nturtl.h>
  18. //
  19. // This function is here because of a problem with header files. Our
  20. // precompiled header includes <winnt.h>, which defines NT_INCLUDED.
  21. // Unfortuneately, <nt.h> also defines NT_INCLUDED. However, the definition for
  22. // the USER_SHARED_DATA structure can only be retrieved from nt.h. This
  23. // creates a problem for us, since we cannot include nt.h in a C++ source file
  24. // that needs this structure, since we'll get multiple re-definitions of
  25. // most of the structures in nt.h. We also cannot include nt.h in the
  26. // precompiled header itsself, since our files need certain fields defined
  27. // in winnt.h (and remember that including nt.h will define NT_INCLUDED, which
  28. // means everything in winnt.h is skipped).
  29. // The easiest solution was to put this function in a C file, since the CXX
  30. // precompiled header will not be used for this file.
  31. //
  32. ULONG GetCurrentSessionID()
  33. {
  34. return USER_SHARED_DATA->ActiveConsoleId;
  35. }