@@ -12,7 +12,6 @@ mod _winapi {
12
12
PyObjectRef , PyResult , TryFromObject , VirtualMachine ,
13
13
} ;
14
14
use std:: ptr:: { null, null_mut} ;
15
- use winapi:: um:: winbase;
16
15
use windows:: {
17
16
core:: PCWSTR ,
18
17
Win32 :: Foundation :: { HANDLE , HINSTANCE , MAX_PATH } ,
@@ -227,7 +226,8 @@ mod _winapi {
227
226
args : CreateProcessArgs ,
228
227
vm : & VirtualMachine ,
229
228
) -> PyResult < ( HANDLE , HANDLE , u32 , u32 ) > {
230
- let mut si = winbase:: STARTUPINFOEXW :: default ( ) ;
229
+ let mut si: windows_sys:: Win32 :: System :: Threading :: STARTUPINFOEXW =
230
+ unsafe { std:: mem:: zeroed ( ) } ;
231
231
si. StartupInfo . cb = std:: mem:: size_of_val ( & si) as _ ;
232
232
233
233
macro_rules! si_attr {
@@ -292,11 +292,11 @@ mod _winapi {
292
292
std:: ptr:: null ( ) ,
293
293
args. inherit_handles ,
294
294
args. creation_flags
295
- | winbase :: EXTENDED_STARTUPINFO_PRESENT
296
- | winbase :: CREATE_UNICODE_ENVIRONMENT ,
295
+ | windows_sys :: Win32 :: System :: Threading :: EXTENDED_STARTUPINFO_PRESENT
296
+ | windows_sys :: Win32 :: System :: Threading :: CREATE_UNICODE_ENVIRONMENT ,
297
297
env as _ ,
298
298
current_dir,
299
- & mut si as * mut winbase :: STARTUPINFOEXW as _ ,
299
+ & mut si as * mut _ as * mut _ ,
300
300
procinfo. as_mut_ptr ( ) ,
301
301
) )
302
302
. into_pyresult ( vm) ?;
@@ -390,7 +390,7 @@ mod _winapi {
390
390
( result, size. assume_init ( ) )
391
391
} ;
392
392
if !result. is_err ( )
393
- || GetLastError ( ) != winapi :: shared :: winerror :: ERROR_INSUFFICIENT_BUFFER
393
+ || GetLastError ( ) != windows_sys :: Win32 :: Foundation :: ERROR_INSUFFICIENT_BUFFER
394
394
{
395
395
return Err ( errno_err ( vm) ) ;
396
396
}
0 commit comments