Skip to main content

excel_api_sys/
functions.rs

1use core::ffi::c_int;
2
3use crate::{LPXLOPER12, XLOPER12};
4
5/// Raw signature of the variadic Excel 12 C API entry point (`_cdecl`).
6pub type Excel12Fn =
7    unsafe extern "C" fn(xlfn: c_int, operRes: LPXLOPER12, count: c_int, ...) -> c_int;
8
9/// Raw signature of the vector Excel 12 C API entry point (`pascal`/WinAPI).
10pub type Excel12vFn = unsafe extern "system" fn(
11    xlfn: c_int,
12    operRes: LPXLOPER12,
13    count: c_int,
14    opers: *mut LPXLOPER12,
15) -> c_int;
16
17/// Signature of Excel's internal `MdCallBack12` entry point used by
18/// `XLCALL.CPP`.
19pub type Excel12EntryPtFn = unsafe extern "system" fn(
20    xlfn: c_int,
21    coper: c_int,
22    rgpxloper12: *mut LPXLOPER12,
23    xloper12Res: LPXLOPER12,
24) -> c_int;
25
26/// Signature of the SDK bridge export used by cluster hosts.
27pub type SetExcel12EntryPtFn = unsafe extern "system" fn(callback: Excel12EntryPtFn);
28
29/// Raw signature of `XLCallVer`.
30pub type XLCallVerFn = unsafe extern "system" fn() -> c_int;
31
32/// Cluster connector asynchronous callback signature from `XLCALL.H`.
33pub type PXL_HPC_ASYNC_CALLBACK =
34    unsafe extern "system" fn(operAsyncHandle: LPXLOPER12, operReturn: LPXLOPER12) -> c_int;
35
36/// Standard XLL initialization callback.
37pub type XlAutoOpenFn = unsafe extern "system" fn() -> c_int;
38/// Standard XLL shutdown callback.
39pub type XlAutoCloseFn = unsafe extern "system" fn() -> c_int;
40/// Add-in Manager installation callback.
41pub type XlAutoAddFn = unsafe extern "system" fn() -> c_int;
42/// Add-in Manager removal callback.
43pub type XlAutoRemoveFn = unsafe extern "system" fn() -> c_int;
44/// Add-in Manager information callback for the Excel 12 ABI.
45pub type XlAddInManagerInfo12Fn = unsafe extern "system" fn(action: LPXLOPER12) -> LPXLOPER12;
46/// On-demand registration callback for the Excel 12 ABI.
47pub type XlAutoRegister12Fn = unsafe extern "system" fn(name: LPXLOPER12) -> LPXLOPER12;
48/// XLL-owned return-memory cleanup callback.
49pub type XlAutoFree12Fn = unsafe extern "system" fn(value: LPXLOPER12);
50
51// Ensure the aliases remain pointer-compatible with the concrete raw type.
52const _: Option<LPXLOPER12> = None::<*mut XLOPER12>;