#[link(name = "kernel32")]
extern "stdcall" {
fn CreateProcessW (
lpApplicationName: *mut u16,
lpCommandLine: u64,
lpProcessAttributes: u64,
lpThreadAttributes: u64,
bInheritHandles: u32,
dwCreationFlags: u32,
lpCurrentDirectory: u64,
lpStartupInfo: *const u8,
lpProcessInformation: *mut u8
) -> u32;
}

fn main() {
let mut cl:[u16; 5] = [0x63, 0x61, 0x6c, 0x63, 0x00]; // "calc\0"
let mut si:[u8; 104] = [0; 104];
si[0] = 104;
let mut pi:[u8; 24] = [0; 24];
let mut ret;
unsafe {ret = CreateProcessW (cl.as_mut_ptr(), 0, 0, 0, 0, 0, 0, si.as_ptr(), pi.as_mut_ptr());}
}
>error: process didn't exit successfully: `target\debug\test03.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
ここまで単純化しても動かねぇ・・・というかsiとpiの正しいサイズがわからない