@@ -32,6 +32,7 @@ pub type DWORD = c_ulong;
3232pub type HANDLE = LPVOID ;
3333pub type HINSTANCE = HANDLE ;
3434pub type HMODULE = HINSTANCE ;
35+ pub type HRESULT = LONG ;
3536pub type BOOL = c_int ;
3637pub type BYTE = u8 ;
3738pub type BOOLEAN = BYTE ;
@@ -197,6 +198,8 @@ pub const ERROR_OPERATION_ABORTED: DWORD = 995;
197198pub const ERROR_IO_PENDING : DWORD = 997 ;
198199pub const ERROR_TIMEOUT : DWORD = 0x5B4 ;
199200
201+ pub const E_NOTIMPL : HRESULT = 0x80004001u32 as HRESULT ;
202+
200203pub const INVALID_HANDLE_VALUE : HANDLE = !0 as HANDLE ;
201204
202205pub const FACILITY_NT_BIT : DWORD = 0x1000_0000 ;
@@ -1163,8 +1166,8 @@ extern "system" {
11631166 timeout : * const timeval ) -> c_int ;
11641167}
11651168
1166- // Functions that aren't available on Windows XP, but we still use them and just
1167- // provide some form of a fallback implementation.
1169+ // Functions that aren't available on every version of Windows that we support,
1170+ // but we still use them and just provide some form of a fallback implementation.
11681171compat_fn ! {
11691172 kernel32:
11701173
@@ -1182,6 +1185,10 @@ compat_fn! {
11821185 pub fn SetThreadStackGuarantee ( _size: * mut c_ulong) -> BOOL {
11831186 SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
11841187 }
1188+ pub fn SetThreadDescription ( hThread: HANDLE ,
1189+ lpThreadDescription: LPCWSTR ) -> HRESULT {
1190+ SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; E_NOTIMPL
1191+ }
11851192 pub fn SetFileInformationByHandle ( _hFile: HANDLE ,
11861193 _FileInformationClass: FILE_INFO_BY_HANDLE_CLASS ,
11871194 _lpFileInformation: LPVOID ,
0 commit comments