Skip to content
Rust bindings to the Cheat Engine plugin SDK
Rust
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Cargo.toml
README.md

README.md

Documentation

Example

Cargo.toml

[package]
name = "myplugin"
version = "0.1.0"
authors = ["Mack Stump <mack.stump@gmail.com>"]

[lib]
crate-type = ["cdylib"]

[dependencies]
winapi = "0.2.8"
ceplugin = "0.7.0"

src/lib.rs

extern crate ceplugin;
extern crate winapi;

use std::ffi::CString;
use std::os::raw::{c_char, c_int};
use winapi::*;

#[no_mangle]
pub extern "stdcall" fn CEPlugin_InitializePlugin(ef: &mut ceplugin::ExportedFunctions,
                                                  pluginid: c_int) -> BOOL {
    let message = CString::new("Plugin Initialized").unwrap();
    (ef.ShowMessage)(message.as_ptr());

    TRUE
}

#[no_mangle]
pub extern "stdcall" fn CEPlugin_GetVersion(pv: &mut ceplugin::PluginVersion,
                                            sizeofpluginversion: c_int) -> BOOL {
    pv.version = 2;
    pv.pluginname = b"Rust CE Plugin\0" as *const _ as *const c_char;

    TRUE
}

#[no_mangle]
pub extern "stdcall" fn CEPlugin_DisablePlugin() -> BOOL {
    TRUE
}
You can’t perform that action at this time.