I'm trying to go through all windows (using Windows API) and get a list of the windows, but when I try to pass through a vector as a LPARAM
then I get an error:
- non-primitive cast: *mut Vec<isize> as LPARAM an as expression can only be used to convert between primitive types or to coerce to a specific trait object
Code:
unsafe {
let windows: Vec<isize> = vec![];
let _ = WindowsAndMessaging::EnumWindows(Some(enum_window), &mut windows as *mut Vec<isize> as LPARAM).ok();
};