Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How could xlc functions be called? #4

Open
S1nus opened this issue Oct 15, 2018 · 0 comments
Open

How could xlc functions be called? #4

S1nus opened this issue Oct 15, 2018 · 0 comments

Comments

@S1nus
Copy link

S1nus commented Oct 15, 2018

Hi Marcus,

I was wondering if you know of how I might be able to call the xlc functions using this. Typically, this is done with the Excel12(...) or Excel12v(...) functions.

#[no_mangle]
pub extern "stdcall" fn xlAlert() -> LPXLOPER12 {
  let result = Box::new(Variant:;from_str("Tried to alert"));
  let alert_text = Box::new(Variant::from_str("Hello from Rust"));
  let alert_text_xloper = Box::into_raw(alert_text) as LPXLOPER12;
  unsafe {
    Excel12(xlcAlert as i32, alert_text_xloper, 1);
  }
  Box::into_raw(result) as LPXLOPER12
}

I get an "unresolved external symbol" error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant