Last active
August 29, 2015 14:13
-
-
Save kkartaltepe/396942fa2afb1f6b2f1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[link(name="cef")] | |
extern "stdcall" { //On windows32 stdcall. on 64 use C? | |
pub fn cef_execute_process(args: *const MainArgs, app: *mut App, win_sandbox_info: *mut c_int) -> c_int; | |
pub fn cef_initialize(args: *const MainArgs, settings: *mut Settings, app: *mut App ) -> c_int; | |
pub fn cef_browser_host_create_browser(windowInfo: *const WindowInfo, client: *mut Client, url: *const CefString, browserSettings: *const BrowserSettings, requestContext: *mut c_void ) -> c_int; | |
pub fn cef_run_message_loop(); | |
pub fn cef_shutdown(); | |
} | |
fn main() { | |
println!("Hello World"); | |
unsafe { | |
let hinst = GetModuleHandleW(std::ptr::null_mut()); | |
// MessageBoxW(std::ptr::null_mut(), std::ptr::null(), std::ptr::null(), 0u32); | |
let args = MainArgs {instance: hinst}; | |
println!("HINST: {}", args.instance as i32); | |
let mut app = App{..Default::default()}; | |
println!("Cef execute process"); | |
let exec_ret = cef_execute_process(&args, &mut app, std::ptr::null_mut()); | |
if exec_ret > 0 { | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment