Example

Cargo.toml ```toml [package] name = "myplugin" version = "0.1.0" authors = ["Mack Stump mack.stump@gmail.com"]

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

[dependencies] libc = "0.2.21" winapi = "0.2.8" ceplugin = "0.5.0" ```

src/lib.rs ```rust extern crate ceplugin; extern crate libc; extern crate winapi;

use winapi::*;

[allow(nonsnakecase)]

[no_mangle]

pub extern "stdcall" fn CEPluginInitializePlugin(ef: *mut ceplugin::ExportedFunctions, pluginid: libc::cint) -> BOOL { let ef = unsafe { &mut *ef };

(ef.ShowMessage)(b"Plugin Initialized\0" as *const u8);

TRUE

}

[allow(nonsnakecase)]

[no_mangle]

pub extern "stdcall" fn CEPluginGetVersion(pv: *mut ceplugin::PluginVersion, sizeofpluginversion: libc::cint) -> BOOL { let pv = unsafe { &mut *pv };

pv.version = 2;
pv.pluginname = b"Rust CE Plugin\0" as *const libc::c_uchar;

TRUE

}

[allow(nonsnakecase)]

[no_mangle]

pub extern "stdcall" fn CEPlugin_DisablePlugin() -> BOOL { TRUE } ```