Additionally any attempt to access the string fields of the LibLog
structure result in crash.
The Host Application cannot read out even the numeric fields correctly which makes me think that the Rust Structure is not aligned correctly in memory to the C Language conventions and thus incompatible with the Host Application.
LibLog: Log creating ...
LibLog: Log created.
LibLog - Code: [0]
LibLog - Log: Version '1'
LibLog - Log (Length: '218103808 / ex [0]: 'Access violation'
When implementing a log_debug()
function I see that the structure is correctly populated:
#[no_mangle]
pub extern "C" fn log_debug(oplog: Option<&LibLog>) {
if let Some(l) = oplog {println!("LibLog Debug: '{:?}'", l)}
}
which shows:
LibLog: Debug printing ...
LibLog Debug: 'LibLog { iversion: 2, ierrorcode: 0, iloglength: 13, slogmessage: 0x2653010, ierrorlength: 4, serrormessage: 0x2653600 }'
LibLog: Debug printed.