Register new snapshots
This commit is contained in:
parent
b5e602ac56
commit
7407bcc1a2
7 changed files with 24 additions and 195 deletions
|
|
@ -14,11 +14,11 @@ pub type SIZE_T = u32;
|
|||
pub type LPVOID = uint;
|
||||
pub type BOOL = u8;
|
||||
|
||||
#[cfg(target_os = "win32")]
|
||||
#[cfg(windows)]
|
||||
mod kernel32 {
|
||||
use super::{HANDLE, DWORD, SIZE_T, LPVOID, BOOL};
|
||||
|
||||
extern "stdcall" {
|
||||
extern "system" {
|
||||
pub fn GetProcessHeap() -> HANDLE;
|
||||
pub fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T)
|
||||
-> LPVOID;
|
||||
|
|
@ -27,7 +27,7 @@ mod kernel32 {
|
|||
}
|
||||
|
||||
|
||||
#[cfg(target_os = "win32")]
|
||||
#[cfg(windows)]
|
||||
#[fixed_stack_segment]
|
||||
pub fn main() {
|
||||
let heap = unsafe { kernel32::GetProcessHeap() };
|
||||
|
|
@ -37,8 +37,5 @@ pub fn main() {
|
|||
assert!(res != 0u8);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(not(windows))]
|
||||
pub fn main() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue