You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code is: `#[cfg(windows)]
extern crate winapi;
use winapi::shared::minwindef::DWORD;
use winapi::um::fileapi::{CreateFileW, OPEN_EXISTING};
use winapi::um::winnt::{FILE_SHARE_READ, GENERIC_ALL, HANDLE, LPCWSTR};
fn main() {
let mut drive: HANDLE = CreateFileW(
"\\.\PhysicalDrive0" as LPCWSTR,
GENERIC_ALL,
FILE_SHARE_READ,
0 as DWORD,
OPEN_EXISTING,
0 as DWORD,
0 as DWORD,
);
}`
The text was updated successfully, but these errors were encountered:
I'm trying to make a backup program for my MBR.
To accomplish this task, I use CreateFileW, but when I try to use this function with the parameters in the documentation (https://docs.rs/winapi/latest/winapi/um/fileapi/fn.CreateFileW.html), I get the following error:
My code is: `#[cfg(windows)]
extern crate winapi;
use winapi::shared::minwindef::DWORD;
use winapi::um::fileapi::{CreateFileW, OPEN_EXISTING};
use winapi::um::winnt::{FILE_SHARE_READ, GENERIC_ALL, HANDLE, LPCWSTR};
fn main() {
let mut drive: HANDLE = CreateFileW(
"\\.\PhysicalDrive0" as LPCWSTR,
GENERIC_ALL,
FILE_SHARE_READ,
0 as DWORD,
OPEN_EXISTING,
0 as DWORD,
0 as DWORD,
);
}`
The text was updated successfully, but these errors were encountered: