postject_sys 0.1.5

Unofficial bindings for postject
Documentation
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */
/* automatically generated by rust-bindgen 0.69.2 */

#![allow(non_camel_case_types)]

pub type PostjectorInjectResultType = ::std::os::raw::c_int;
extern "C" {
    pub static mut POSTJECTOR_INJECT_ALREADY_EXISTS: PostjectorInjectResultType;
}
extern "C" {
    pub static mut POSTJECTOR_INJECT_ERROR: PostjectorInjectResultType;
}
extern "C" {
    pub static mut POSTJECTOR_INJECT_SUCCESS: PostjectorInjectResultType;
}
extern "C" {
    pub static mut POSTJECTOR_INJECT_UNKNOWN_EXECUTABLE_FORMAT: PostjectorInjectResultType;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PostjectorBuffer {
    pub head: *mut u8,
    pub size: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OwnedPostjectorBuffer_s {
    _unused: [u8; 0],
}
pub type PostjectorOwnedBuffer = *mut OwnedPostjectorBuffer_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PostjectorInjectResult {
    pub type_: PostjectorInjectResultType,
    pub data: PostjectorOwnedBuffer,
    pub is_macho: ::std::os::raw::c_char,
}
extern "C" {
    pub fn postjector_inject(
        executable: PostjectorBuffer,
        resource: PostjectorBuffer,
        elf_note_name: *const ::std::os::raw::c_char,
        macho_segment_name: *const ::std::os::raw::c_char,
        macho_section_name: *const ::std::os::raw::c_char,
        pe_resource_name: *const ::std::os::raw::c_char,
        override_: ::std::os::raw::c_char,
    ) -> PostjectorInjectResult;
}
extern "C" {
    pub fn postjector_owned_buffer_data(buf: PostjectorOwnedBuffer) -> PostjectorBuffer;
}
extern "C" {
    pub fn postjector_owned_buffer_free(buf: PostjectorOwnedBuffer);
}