]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/windows/foreign_items.rs
Add getpid shim
[rust.git] / src / shims / windows / foreign_items.rs
index 05f9aed1747651bf9b50b26532a90320db2a4fa6..8b7742e0a4ae32d4cc64e60c91bd7f2912ed7d0a 100644 (file)
@@ -419,6 +419,11 @@ fn emulate_foreign_item_by_name(
                 let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
                 this.write_scalar(Scalar::from_machine_isize(1, this), dest)?;
             }
+            "GetCurrentProcessId" if this.frame_in_std() => {
+                let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
+                let result = this.GetCurrentProcessId()?;
+                this.write_scalar(Scalar::from_u32(result), dest)?;
+            }
 
             _ => return Ok(EmulateByNameResult::NotSupported),
         }