Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. extern crate libc;
  2.  
  3. use libc::{c_ulong, c_long};
  4.  
  5. type DWORD = c_ulong;
  6. type LONG = c_long;
  7.  
  8. #[allow(non_snake_case)]
  9. #[derive(Debug)]
  10. pub struct LUID {
  11. pub LowPart: DWORD,
  12. pub HighPart: LONG,
  13. }
  14.  
  15. #[allow(non_snake_case)]
  16. #[allow(non_camel_case_types)]
  17. #[derive(Debug)]
  18. pub struct LUID_AND_ATTRIBUTES {
  19. pub Luid: LUID,
  20. pub Attributes: DWORD,
  21. }
  22.  
  23. #[allow(non_snake_case)]
  24. #[allow(non_camel_case_types)]
  25. #[derive(Debug)]
  26. pub struct TOKEN_PRIVILEGES {
  27. pub PrivilegeCount: DWORD,
  28. pub Privileges: [LUID_AND_ATTRIBUTES; 1],
  29. }
  30.  
  31. fn main() {
  32. let privs: TOKEN_PRIVILEGES = unsafe { std::mem::uninitialized() };
  33. println!("Hello, world! {:?}", privs);
  34. }
Add Comment
Please, Sign In to add comment