apiw_sys/
system_services.rs

1#![allow(unused_doc_comments)]
2#[cfg(feature = "system-services-comm")]
3use windows_sys::Win32::Devices::Communication as comm;
4#[cfg(all(
5    feature = "system-services-modules-and-symbols",
6    feature = "system-services-defaultheapmemobjs-global",
7    feature = "system-services-defaultheapmemobjs-local",
8    feature = "system-services-winmain",
9))]
10use windows_sys::Win32::Foundation as winsys_foundation;
11#[cfg(feature = "system-services-resource")]
12use windows_sys::Win32::Graphics::Gdi as gdi;
13#[cfg(any(
14    feature = "system-services-syspathname",
15    feature = "system-services-drivetype",
16    feature = "system-services-fileop-deprecated",
17))]
18use windows_sys::Win32::Storage::FileSystem as storefs;
19#[cfg(all(
20    feature = "system-services-modules-and-symbols",
21    feature = "system-services-resource",
22))]
23use windows_sys::Win32::System::LibraryLoader as libloader;
24#[cfg(all(
25    feature = "system-services-defaultheapmemobjs-global",
26    feature = "system-services-defaultheapmemobjs-local",
27    feature = "system-services-ptrvalidate",
28))]
29use windows_sys::Win32::System::Memory as sysmem;
30#[cfg(feature = "system-services-regop")]
31use windows_sys::Win32::System::Registry as sysreg;
32#[cfg(feature = "system-services-shutdown")]
33use windows_sys::Win32::System::Shutdown as sysshutdown;
34#[cfg(all(
35    feature = "system-services-version",
36    feature = "system-services-clock",
37    feature = "system-services-syspathname",
38))]
39use windows_sys::Win32::System::SystemInformation as sysinfo;
40#[cfg(feature = "system-services-winexec")]
41use windows_sys::Win32::System::Threading as systhread;
42#[cfg(any(
43    feature = "system-services-defaultheapmemobjs-global",
44    feature = "system-services-defaultheapmemobjs-local",
45    feature = "system-services-fileop-deprecated",
46))]
47use windows_sys::Win32::System::WindowsProgramming as winprg;
48#[cfg(any(
49    feature = "system-services-params-and-metrics",
50    feature = "system-services-inputstate"
51))]
52use windows_sys::Win32::UI::Input::KeyboardAndMouse as kbdmse;
53#[cfg(feature = "system-services-winhelp")]
54use windows_sys::Win32::UI::Shell as shell;
55#[cfg(any(
56    feature = "system-services-params-and-metrics",
57    feature = "system-services-timer",
58    feature = "system-services-inputstate",
59    feature = "system-services-resource",
60))]
61use windows_sys::Win32::UI::WindowsAndMessaging as winmsg;
62#[cfg(any(
63    feature = "system-services-winmain",
64    feature = "system-services-shutdown"
65))]
66use windows_sys::core as wincore;
67
68/// `#305` GetFreeSystemResources
69///
70/// determines the percentage of free space available for all system resources
71/// or a system resource of a specific type
72removed_item!(
73    pub use winmsg::GetFreeSystemResources;
74);
75
76/// `#306` SystemParametersInfo
77///
78/// gets or sets a specific type of system information
79#[cfg(feature = "system-services-params-and-metrics")]
80pub use winmsg::SystemParametersInfoW as SystemParametersInfo;
81
82/// `#307` GetWinFlags
83///
84/// gets the system and memory configuration
85removed_item!(
86    pub use winmsg::GetWinFlags;
87);
88
89/// `#308` GetSystemMetrics
90///
91/// retrieves information about the width and height, in pixels, of the various
92/// elements displayed by the system and also retrieves some other miscellaneous
93/// system information
94#[cfg(feature = "system-services-params-and-metrics")]
95pub use winmsg::GetSystemMetrics;
96
97/// `#309` GetVersion
98///
99/// retrieves the current versions of both Windows and MS-DOS
100#[cfg(feature = "system-services-version")]
101pub use sysinfo::GetVersion;
102
103/// `#310` SetTimer
104///
105/// creates a new system timer
106#[cfg(feature = "system-services-timer")]
107pub use winmsg::SetTimer;
108
109/// `#310` TimerProc
110///
111/// an application-defined callback function that processes WM_TIMER messages
112#[cfg(feature = "system-services-timer")]
113pub type TimerProc = opt_inner_type!(winmsg::TIMERPROC);
114
115/// `#310` KillTimer
116///
117/// removes a system timer
118#[cfg(feature = "system-services-timer")]
119pub use winmsg::KillTimer;
120
121/// `#311` SetDoubleClickTime
122///
123/// sets the maximum number of milliseconds that can occur between the first and
124/// second mouse button clicks of a mouse button double-click
125#[cfg(feature = "system-services-params-and-metrics")]
126pub use kbdmse::SetDoubleClickTime;
127
128/// `#311` GetDoubleClickTime
129///
130/// returns the maximum number of milliseconds that can occur between the first
131/// and second mouse button clicks of a mouse button double-click
132#[cfg(feature = "system-services-params-and-metrics")]
133pub use kbdmse::GetDoubleClickTime;
134
135/// `#312` GetTickCount
136///
137/// returns the number of milliseconds that have elapsed since the session
138/// started
139#[cfg(feature = "system-services-clock")]
140pub use sysinfo::GetTickCount;
141
142/// `#312` GetCurrentTime
143///
144/// identical to the `GetTickCount()` function
145removed_item!(
146    pub use sysinfo::GetCurrentTime;
147);
148
149/// `#313` GetTimerResolution
150///
151/// returns the number of microseconds for each timer tick
152removed_item!(
153    pub use sysinfo::GetTimerResolution;
154);
155
156/// `#314` LoadLibrary
157///
158/// load a library module
159#[cfg(feature = "system-services-modules-and-symbols")]
160pub use libloader::LoadLibraryW as LoadLibrary;
161
162/// `#314` FreeLibrary
163///
164/// decreases by 1 the reference count of the module identified by the `hInst`
165/// parameter
166#[cfg(feature = "system-services-modules-and-symbols")]
167pub use winsys_foundation::FreeLibrary;
168
169/// `#315` LoadModule
170///
171/// loads and executes an application module
172#[cfg(feature = "system-services-modules-and-symbols")]
173pub use libloader::LoadModule;
174
175/// `#315` FreeModule
176///
177/// decreases by 1 the reference count of the module identified by the `hInst`
178/// parameter
179removed_item!(
180    pub use winsys_foundation::FreeModule;
181);
182
183/// `#316` GetModuleFileName
184///
185/// retrieves the null-terminated filename, including the full path, of the file
186/// from which the module specified by `hInst` parameter has been loaded
187#[cfg(feature = "system-services-modules-and-symbols")]
188pub use libloader::GetModuleFileNameW as GetModuleFileName;
189
190/// `#316` GetModuleHandle
191///
192/// obtains a handle of the module specified by name in the `lpszModule`
193/// parameter
194#[cfg(feature = "system-services-modules-and-symbols")]
195pub use libloader::GetModuleHandleW as GetModuleHandle;
196
197/// `#316` GetModuleUsage
198///
199/// returns the reference count for the module specified by `hInst` parameter
200removed_item!(
201    pub use libloader::GetModuleUsage;
202);
203
204/// `#317` GetProcAddress
205///
206/// retrieves the address of a function in the module specified in the `hInst`
207/// parameter
208#[cfg(feature = "system-services-modules-and-symbols")]
209pub use libloader::GetProcAddress;
210
211/// `#318` MakeProcInstance
212///
213/// creates a procedure instance of a given function
214removed_item!(
215    pub use libloader::MakeProcInstance;
216);
217
218/// `#318` FreeProcInstance
219///
220/// frees the procedure instance specified in `lpProc` parameter
221removed_item!(
222    pub use libloader::FreeProcInstance;
223);
224
225/// `#319` LibMain
226///
227/// entry point of a dynamic-link library (DLL) and is called by the system at
228/// the time the DLL is loaded
229removed_item!(
230    type WORD = u16;
231    pub type LibMain = extern "system" fn(
232        winsys_foundation::HINSTANCE,
233        WORD,
234        WORD,
235        wincore::LPSTR,
236    ) -> wincore::BOOL;
237);
238
239/// `#320` WEP
240///
241/// called by the system at the time the DLL is unloaded
242removed_item!(
243    pub type WEP = extern "system" fn(i32) -> wincore::BOOL;
244);
245
246/// `#321` GetInstanceData
247///
248/// makes a copy of the previous instance of an application into the data area
249/// of the current instance
250removed_item!(
251    pub use libloader::GetInstanceData;
252);
253
254/// `#322` GetFreeSpace
255///
256/// retrieves the number of bytes of free memory available
257removed_item!(
258    pub use sysmem::GetFreeSpace;
259);
260
261/// `#323` GlobalAlloc
262///
263/// allocates dwBytes bytes and returns a handle to the memory segment that can
264/// be accessed via `GlobalLock()`
265#[cfg(feature = "system-services-defaultheapmemobjs-global")]
266pub use sysmem::GlobalAlloc;
267
268/// `#323` GlobalFree
269///
270/// frees the memory segment specified by the handle `hMem`
271#[cfg(feature = "system-services-defaultheapmemobjs-global")]
272pub use winsys_foundation::GlobalFree;
273
274/// `#323` LocalAlloc
275///
276/// call the GlobalAlloc() function
277#[cfg(feature = "system-services-defaultheapmemobjs-local")]
278pub use sysmem::LocalAlloc;
279
280/// `#323` LocalFree
281///
282/// call the GlobalFree() function
283#[cfg(feature = "system-services-defaultheapmemobjs-local")]
284pub use winsys_foundation::LocalFree;
285
286/// `#324` GlobalCompact
287///
288/// rearranges the memory content until `MinFree` bytes of memory can no longer
289/// be rearranged
290#[cfg(feature = "system-services-defaultheapmemobjs-global")]
291pub use winprg::GlobalCompact;
292
293/// `#324` LocalCompact
294///
295/// calls `GlobalCompact()`
296#[cfg(feature = "system-services-defaultheapmemobjs-local")]
297pub use winprg::LocalCompact;
298
299/// `#325` GlobalFix
300///
301/// currently performs no operation.
302///
303/// originally prevents the global memory object specified in the `hmem`
304/// parameter from moving in linear memory
305#[cfg(feature = "system-services-defaultheapmemobjs-global")]
306pub use winprg::GlobalFix;
307
308/// `#325` GlobalUnfix
309///
310/// currently performs no operation.
311///
312/// originally allows the global memory object specified in the `hmem` parameter
313/// to be moved in linear memory
314#[cfg(feature = "system-services-defaultheapmemobjs-global")]
315pub use winprg::GlobalUnfix;
316
317/// `#326` GlobalFlags
318///
319/// returns the flag associated with the global memory segment specified by the
320/// `hMem` parameter
321#[cfg(feature = "system-services-defaultheapmemobjs-global")]
322pub use sysmem::GlobalFlags;
323
324/// `#326` LocalFlags
325///
326/// calls `GlobalFlags()`
327#[cfg(feature = "system-services-defaultheapmemobjs-local")]
328pub use sysmem::LocalFlags;
329
330/// `#327` GlobalHandle
331///
332/// searches for a memory segment that contains `lpaddress`, and returns its
333/// associated handle
334#[cfg(feature = "system-services-defaultheapmemobjs-global")]
335pub use sysmem::GlobalHandle;
336
337/// `#327` LocalHandle
338///
339/// calls `GlobalHandle()`
340#[cfg(feature = "system-services-defaultheapmemobjs-local")]
341pub use sysmem::LocalHandle;
342
343/// `#328` GlobalLock
344///
345/// increment the lock count and lock the memory specified by the `hMem`
346/// parameter
347#[cfg(feature = "system-services-defaultheapmemobjs-global")]
348pub use sysmem::GlobalLock;
349
350/// `#328` GlobalUnlock
351///
352/// decrement the lock count and unlock the memory specified by the `hMem`
353/// parameter
354#[cfg(feature = "system-services-defaultheapmemobjs-global")]
355pub use sysmem::GlobalUnlock;
356
357/// `#328` LocalLock
358///
359/// increment the lock count and lock the memory specified by the `hMem`
360/// parameter
361#[cfg(feature = "system-services-defaultheapmemobjs-local")]
362pub use sysmem::LocalLock;
363
364/// `#328` LocalUnlock
365///
366/// decrement the lock count and unlock the memory specified by the `hMem`
367/// parameter
368#[cfg(feature = "system-services-defaultheapmemobjs-local")]
369pub use sysmem::LocalUnlock;
370
371/// `#329` GlobalLRUNewest
372///
373/// currently performs no operation.
374///
375/// orginally moves a memory segment to the newest LRU (least-recently-used)
376/// position in memory
377removed_item!(
378    pub use sysmem::GlobalLRUNewest;
379);
380
381/// `#329` GlobalLRUOldest
382///
383/// currently performs no operation.
384///
385/// orginally moves a memory segment to the oldest LRU position in memory
386removed_item!(
387    pub use sysmem::GlobalLRUOldest;
388);
389
390/// `#330` GlobalNotify
391///
392/// sets the callback function pointed to by the `NotifyProc` parameter
393removed_item!(
394    pub use sysmem::GlobalNotify;
395);
396
397/// `#330` NotifyProc
398///
399/// a user-defined, exported callback function of type `GNOTIFYPROC`
400removed_item!(
401    pub type NotifyProc = extern "system" fn(winsys_foundation::HGLOBAL) -> wincore::BOOL;
402);
403
404/// `#331` GlobalReAlloc
405///
406/// modifies the size or other attributes in a memory segment, specified by the
407/// `hMem` parameter
408#[cfg(feature = "system-services-defaultheapmemobjs-global")]
409pub use sysmem::GlobalReAlloc;
410
411/// `#332` GlobalSize
412///
413/// return the size of the memory segment specified by the `hMem` parameter
414#[cfg(feature = "system-services-defaultheapmemobjs-global")]
415pub use sysmem::GlobalSize;
416
417/// `#332` LocalSize
418///
419/// calls `GlobalSize()`
420#[cfg(feature = "system-services-defaultheapmemobjs-local")]
421pub use sysmem::LocalSize;
422
423/// `#333` LocalInit
424///
425/// provided as stub functions that perform no actions
426removed_item!(
427    pub use sysmem::LocalInit;
428);
429
430/// `#333` LocalShrink
431///
432/// provided as stub functions that perform no actions
433removed_item!(
434    pub use sysmem::LocalShrink;
435);
436
437/// `#334` Catch
438///
439/// saves the current execution environment and stores it in the buffer
440removed_item!(
441    pub use diagdbg::Catch;
442);
443
444/// `#334` Throw
445///
446/// restores the execution environment from the buffer specified by the
447/// `lpCatchBuf` parameter
448removed_item!(
449    pub use diagdbg::Throw;
450);
451
452/// `#335` Yield
453///
454/// pass control between multiple running tasks
455removed_item!(
456    pub use winmsg::Yield;
457);
458
459/// `#335` DirectedYield
460///
461/// pass control between multiple running tasks
462removed_item!(
463    pub use winmsg::DirectedYield;
464);
465
466/// `#336` GetCurrentTask
467///
468/// retrieves the handle of the currently running task
469removed_item!(
470    pub use winmsg::GetCurrentTask;
471);
472
473/// `#337` GetNumTasks
474///
475/// returns the number of tasks currently running in the system
476removed_item!(
477    pub use winmsg::GetNumTasks;
478);
479
480/// `#338` GetWindowTask
481///
482/// retrieves the handle of a task that created the window specified in `hWnd`
483/// parameter
484removed_item!(
485    pub use winmsg::GetWindowTask;
486);
487
488/// `#339` IsTask
489///
490/// checks whether the task handle specified in `hTask` parameter is valid
491removed_item!(
492    pub use winmsg::IsTask;
493);
494
495/// `#340` WinHelp
496///
497/// invokes the Windows Help facility and optionally requests the application
498/// specific help topic
499#[cfg(feature = "system-services-winhelp")]
500pub use shell::WinHelpW as WinHelp;
501
502/// `C.15` HELPWININFO
503///
504/// contains the secondary help window's size and position information
505#[cfg(feature = "system-services-winhelp")]
506pub use shell::HELPWININFOW as HELPWININFO;
507
508/// `#341` EnumTaskWindows
509///
510/// enumerates all windows associated with a task
511removed_item!(
512    pub use winmsg::EnumTaskWindows;
513);
514
515/// `#341` EnumTaskWndProc
516///
517/// an exported, user-defined, callback function of type `WNDENUMPROC` whose
518/// address is passed to the `EnumTaskWindows()` function
519removed_item!(
520    pub type EnumTaskWndProc =
521        extern "system" fn(winsys_foundation::HWND, winsys_foundation::LPARAM) -> wincore::BOOL;
522);
523
524/// `#342` WinExec
525///
526/// starts an application
527#[cfg(feature = "system-services-winexec")]
528pub use systhread::WinExec;
529
530/// `#343` WinMain
531#[cfg(feature = "system-services-winmain")]
532pub type WinMain = extern "system" fn(
533    winsys_foundation::HINSTANCE,
534    winsys_foundation::HINSTANCE,
535    wincore::PSTR,
536    i32,
537) -> i32;
538
539/// `#344` ExitWindows
540///
541/// shuts down the runtime environment with an option to restart it
542#[cfg(feature = "system-services-shutdown")]
543pub use sysshutdown_polyfill::ExitWindows;
544
545/// `#344a` ExitWindowsEx
546///
547/// shuts down the runtime environment with an option to restart it
548#[cfg(feature = "system-services-shutdown")]
549pub use sysshutdown::ExitWindowsEx;
550
551/// `#345` GetAsyncKeyState
552///
553/// indicates, at the time the function is called, whether a particular key is
554/// up or down
555#[cfg(feature = "system-services-inputstate")]
556pub use kbdmse::GetAsyncKeyState;
557
558/// `#346` GetInputState
559///
560/// checks the system queue and identifies mouse clicks or keyboard events that
561/// need to be processed
562#[cfg(feature = "system-services-inputstate")]
563pub use winmsg::GetInputState;
564
565/// `#347` GetKeyboardState
566///
567/// copies the status of the 256 virtual-keyboard keys to the buffer
568#[cfg(feature = "system-services-inputstate")]
569pub use kbdmse::GetKeyboardState;
570
571/// `#347` SetKeyboardState
572///
573/// copies the contents of the 256-byte array buffer pointed to by the
574/// `lpKeyStateBuf` parameter into the system keyboard state table
575#[cfg(feature = "system-services-inputstate")]
576pub use kbdmse::SetKeyboardState;
577
578/// `#348` GetKeyNameText
579///
580/// retrieves a string representing the name of the key
581#[cfg(feature = "system-services-params-and-metrics")]
582pub use kbdmse::GetKeyNameTextW as GetKeyNameText;
583
584/// `#349` GetKeyState
585///
586/// obtains the state of the virtual key identified by the `vidkey` parameter
587#[cfg(feature = "system-services-inputstate")]
588pub use kbdmse::GetKeyState;
589
590/// `#350` GetKBCodePage
591///
592/// returns the current system code page
593#[cfg(feature = "system-services-params-and-metrics")]
594pub use kbdmse::GetKBCodePage;
595
596/// `#351` OemKeyScan
597///
598/// converts OEM ASCII codes 0 through 0xFF to their corresponding OEM scan
599/// codes and shift states
600#[cfg(feature = "system-services-inputstate")]
601pub use kbdmse::OemKeyScan;
602
603/// `#352` MapVirtualKey
604///
605/// converts the virtual-key code identified by the idKeyCode parameter to the
606/// scan code or ASCII value, or vice-versa
607#[cfg(feature = "system-services-inputstate")]
608pub use kbdmse::MapVirtualKeyW as MapVirtualKey;
609
610/// `#353` VkKeyScan
611///
612/// converts a system character to a virtual-key code and shift state for the
613/// keyboard
614#[cfg(feature = "system-services-inputstate")]
615pub use kbdmse::VkKeyScanW as VkKeyScan;
616
617/// `#354` SwapMouseButton
618///
619/// sets the meaning of the right and left mouse buttons
620#[cfg(feature = "system-services-params-and-metrics")]
621pub use kbdmse::SwapMouseButton;
622
623/// `#355` GetKeyboardType
624///
625/// fetches the requested information about the keyboard that is currently in
626/// use
627#[cfg(feature = "system-services-params-and-metrics")]
628pub use kbdmse::GetKeyboardType;
629
630/// `#356` FindResource
631///
632/// returns a handle to a resource in a module
633#[cfg(feature = "system-services-resource")]
634pub use libloader::FindResourceW as FindResource;
635
636/// `#357` LoadResource
637///
638/// loads a resource into global memory and returns a handle to the memory
639#[cfg(feature = "system-services-resource")]
640pub use libloader::LoadResource;
641
642/// `#357` FreeResource
643///
644/// frees a resource previously loaded by the `LoadResource()` function
645#[cfg(feature = "system-services-resource")]
646pub use libloader::FreeResource;
647
648/// `#358` LockResource
649///
650/// locks a resource that has been loaded into global memory and returns a
651/// pointer to the resource's data
652#[cfg(feature = "system-services-resource")]
653pub use libloader::LockResource;
654
655/// `#359` LoadString
656///
657/// loads a string resource into a given buffer
658#[cfg(feature = "system-services-resource")]
659pub use winmsg::LoadStringW;
660
661/// `#360` LoadIcon
662///
663/// loads an icon resource from a module or one of the predefined system icons
664#[cfg(feature = "system-services-resource")]
665pub use winmsg::LoadIconW as LoadIcon;
666
667/// `#361` LoadBitmap
668///
669/// loads a bitmap resource from a module or one of the predefined system
670/// bitmaps
671#[cfg(feature = "system-services-resource")]
672pub use gdi::LoadBitmapW as LoadBitmap;
673
674/// `#362` SetResourceHandler
675///
676/// install a callback function that loads resources
677removed_item!(
678    pub use winmsg::SetResourceHandler;
679);
680
681/// `#362` LoadProc
682///
683/// a user-defined callback function receives information about a resource to be
684/// locked
685removed_item!(
686    pub type LoadProc = extern "system" fn(
687        winsys_foundation::HGLOBAL,
688        winsys_foundation::HINSTANCE,
689        winsys_foundation::HRSRC,
690    ) -> winsys_foundation::HGLOBAL;
691);
692
693/// `#363` SizeofResource
694///
695/// determines the size of a resource in bytes
696#[cfg(feature = "system-services-resource")]
697pub use libloader::SizeofResource;
698
699/// `#364` LoadMenu
700///
701/// loads an menu resource from a module
702#[cfg(feature = "system-services-resource")]
703pub use winmsg::LoadMenuW as LoadMenu;
704
705/// `#365` LoadMenuIndirect
706///
707/// creates a menu resource from the information supplied to the function
708#[cfg(feature = "system-services-resource")]
709pub use winmsg::LoadMenuIndirectW as LoadMenuIndirect;
710
711/// `C.22` MENUITEMTEMPLATE
712///
713/// contains information about a menu item
714#[cfg(feature = "system-services-resource")]
715pub use winmsg::MENUITEMTEMPLATE;
716
717/// `C.23` MENUITEMTEMPLATEHEADER
718///
719/// contains the header information for a menu-item list
720#[cfg(feature = "system-services-resource")]
721pub use winmsg::MENUITEMTEMPLATEHEADER;
722
723/// `#366` LoadAccelerators
724///
725/// loads an accelerator table into memory and returns a handle to the
726/// accelerator table
727#[cfg(feature = "system-services-resource")]
728pub use winmsg::LoadAcceleratorsW as LoadAccelerators;
729
730/// `#367` AllocResource
731///
732/// allocates uninitialized memory for the resource specified by the `hrsrc`
733/// parameter
734removed_item!(
735    pub use winmsg::AllocResource;
736);
737
738/// `#368` BuildCommDCB
739///
740/// converts the given device-definition control string into the appropriate
741/// serial device control block codes
742#[cfg(feature = "system-services-comm")]
743pub use comm::BuildCommDCBW as BuildCommDCB;
744
745/// `#369` ClearCommBreak
746///
747/// returns the communications-device to nonbreak state and permits character
748/// transmission to take place
749#[cfg(feature = "system-services-comm")]
750pub use comm::ClearCommBreak;
751
752/// `#369` SetCommBreak
753///
754/// puts the communication device specified by `NumComDev` in break state
755#[cfg(feature = "system-services-comm")]
756pub use comm::SetCommBreak;
757
758/// `#370` CloseComm
759///
760/// closes the communications device identified by `NumComDev` making sure that
761/// the output queue is empty
762removed_item!(
763    pub use comm::CloseComm;
764);
765
766/// `#370` OpenComm
767///
768/// open the communication device
769removed_item!(
770    pub use comm::OpenComm;
771);
772
773/// `#371` EnableCommNotification
774///
775/// toggles the state (Enable/Disable) of the WM_COMMNOTIFY message that is
776/// posted to the given window
777removed_item!(
778    pub use comm::EnableCommNotification;
779);
780
781/// `#372` EscapeCommFunction
782///
783/// requests the specified communication device to carry an extended function
784#[cfg(feature = "system-services-comm")]
785pub use comm::EscapeCommFunction;
786
787/// `#373` FlushComm
788///
789/// flushes all characters from either the transmission or receiving queue of
790/// the device identified by the `NumComDev` parameter
791removed_item!(
792    pub use comm::FlushComm;
793);
794
795/// `#374` GetCommError
796///
797/// returns the most recent error value for the communication device specified
798/// by the `NumComDev` parameter
799removed_item!(
800    pub use comm::GetCommError;
801);
802
803/// `#375` GetCommEventMask
804///
805/// clears the event word of a communications device after retrieving this value
806removed_item!(
807    pub use comm::GetCommEventMask;
808);
809
810/// `#375` SetCommEventMask
811///
812/// enables the event word of the specified communications device
813removed_item!(
814    pub use comm::SetCommEventMask;
815);
816
817/// `#376` GetCommState
818///
819/// gets the device control block for the device identified by the `NumComDev`
820/// parameter
821#[cfg(feature = "system-services-comm")]
822pub use comm::GetCommState;
823
824/// `#376` SetCommState
825///
826/// set the communications device to the state specified by the settings in the
827/// DCB structure
828#[cfg(feature = "system-services-comm")]
829pub use comm::SetCommState;
830
831/// `#377` ReadComm
832///
833/// reads up to an indicated number of bytes from the communication device
834/// specified by the `NumComDev` parameter
835removed_item!(
836    pub use comm::ReadComm;
837);
838
839/// `#377` WriteComm
840///
841/// writes up to an indicated number of bytes to the communication device
842/// specified by the `NumComDev` parameter
843removed_item!(
844    pub use comm::WriteComm;
845);
846
847/// `#378` TransmitCommChar
848///
849/// puts the specified character contained in the `TransCh` parameter at the
850/// head of the transmission queue of the device identified by the `NumComDev`
851/// parameter
852#[cfg(feature = "system-services-comm")]
853pub use comm::TransmitCommChar;
854
855/// `#378` UngetCommChar
856///
857/// puts the specified character contained in `UngetCh` back in the receiving
858/// queue of the device identified by the `NumComDev` parameter
859removed_item!(
860    pub use comm::UngetCommChar;
861);
862
863/// `#379` GetDriveType
864///
865/// reports whether the `drive` specified in the DriveNumber parameter is
866/// removable, fixed, or remote
867#[cfg(feature = "system-services-drivetype")]
868pub use storefs::GetDriveTypeW as GetDriveType;
869
870/// `#380` GetSystemDirectory
871///
872/// retrieves the system directory that contains drivers, libraries, font files,
873/// and so on.
874#[cfg(feature = "system-services-syspathname")]
875pub use sysinfo::GetSystemDirectoryW as GetSystemDirectory;
876
877/// `#381` GetTempDrive
878///
879/// returns a drive letter that can be used as temporary space
880removed_item!(
881    pub use storefs::GetTempDrive;
882);
883
884/// `#382` GetTempFileName
885///
886/// creates a file name that can be used for temporary storage
887#[cfg(feature = "system-services-syspathname")]
888pub use storefs::GetTempFileNameW as GetTempFileName;
889
890/// `#383` GetWindowsDirectory
891///
892/// returns the path to the system directory, which contains the application's
893/// .INI files, temporary files, and so on.
894#[cfg(feature = "system-services-syspathname")]
895pub use sysinfo::GetWindowsDirectoryW as GetWindowsDirectory;
896
897/// `#384` OpenFile
898///
899/// creates, opens, reopens, or deletes a file
900#[cfg(feature = "system-services-fileop-deprecated")]
901#[deprecated]
902pub use storefs::OpenFile;
903
904/// `C.27` OFSTRUCT
905///
906/// contains information about an open file
907#[cfg(feature = "system-services-fileop-deprecated")]
908#[deprecated]
909pub use storefs::OFSTRUCT;
910
911/// `#385` SetHandleCount
912///
913/// sets the number of file handles available to an application
914#[cfg(feature = "system-services-fileop-deprecated")]
915#[deprecated]
916pub use winprg::SetHandleCount;
917
918/// `#386` _lclose
919///
920/// closes the file described by the file handle
921#[cfg(feature = "system-services-fileop-deprecated")]
922#[deprecated]
923pub use winprg::_lclose;
924
925/// `#387` _lread
926///
927/// reads a specified number of bytes from a file into memory
928#[cfg(feature = "system-services-fileop-deprecated")]
929#[deprecated]
930pub use winprg::_lread;
931
932/// `#388` _lcreat
933///
934/// opens a file, described by `FileName`, for reading and/or writing
935#[cfg(feature = "system-services-fileop-deprecated")]
936#[deprecated]
937pub use winprg::_lcreat;
938
939/// `#389` _llseek
940///
941/// moves the current file position pointer of the file described by
942/// `FileHandle` (of type HFILE), an offset of `OffsetFromCurrent` from the
943/// position described by `StartPos()`
944#[cfg(feature = "system-services-fileop-deprecated")]
945#[deprecated]
946pub use winprg::_llseek;
947
948/// `#390` _lopen
949///
950/// open up a file as described by `FileName`, with the open options as
951/// described by `FileMode`.
952#[cfg(feature = "system-services-fileop-deprecated")]
953#[deprecated]
954pub use winprg::_lopen;
955
956/// `#391` _lwrite
957///
958/// writes a specified number of bytes of memory to a file
959#[cfg(feature = "system-services-fileop-deprecated")]
960#[deprecated]
961pub use winprg::_lwrite;
962
963/// `#392` RegCloseKey
964///
965/// releases the handle of the key specified by the `hkey` parameter by closing
966/// the key
967#[cfg(feature = "system-services-regop")]
968pub use sysreg::RegCloseKey;
969
970/// `#393` RegCreateKey
971///
972/// either creates a Registration Database key or opens the specified key if it
973/// already exists
974#[cfg(feature = "system-services-regop")]
975pub use sysreg::RegCreateKeyW as RegCreateKey;
976
977/// `#393` RegOpenKey
978///
979/// opens a Registration Database key
980#[cfg(feature = "system-services-regop")]
981pub use sysreg::RegOpenKeyW as RegOpenKey;
982
983/// `#394` RegDeleteKey
984///
985/// deletes the Registration Database subkey specified by the `szSubKey`
986/// parameter
987#[cfg(feature = "system-services-regop")]
988pub use sysreg::RegDeleteKeyW as RegDeleteKey;
989
990/// `#395` RegEnumKey
991///
992/// enumerates the subkeys of the Registration Database entry specified by the
993/// `hkey` parameter, an open handle (which can be HKEY_CLASSES_ROOT)
994#[cfg(feature = "system-services-regop")]
995pub use sysreg::RegEnumKeyW as RegEnumKey;
996
997/// `#396` RegQueryValue
998///
999/// queries the Registration Database and returns the value of `szSubKey`
1000#[cfg(feature = "system-services-regop")]
1001pub use sysreg::RegQueryValueW as RegQueryValue;
1002
1003/// `#396` RegSetValue
1004///
1005/// sets the subkey specified by `szSubKey` to a value stored in `szValue`
1006#[cfg(feature = "system-services-regop")]
1007pub use sysreg::RegSetValueW as RegSetValue;
1008
1009/// `#397` IsBadCodePtr
1010///
1011/// validates the given pointer to executable code
1012#[cfg(feature = "system-services-ptrvalidate")]
1013pub use sysmem::IsBadCodePtr;
1014
1015/// `#398` IsBadHugeReadPtr
1016///
1017/// determines whether a huge pointer to readable memory is valid
1018removed_item!(
1019    pub use sysmem::IsBadHugeReadPtr;
1020);
1021
1022/// `#399` IsBadHugeWritePtr
1023///
1024/// validates the given huge pointer to a writable memory block
1025removed_item!(
1026    pub use sysmem::IsBadHugeWritePtr;
1027);
1028
1029/// `#400` IsBadReadPtr
1030///
1031/// validates the given pointer to readable memory
1032#[cfg(feature = "system-services-ptrvalidate")]
1033pub use sysmem::IsBadReadPtr;
1034
1035/// `#401` IsBadStringPtr
1036///
1037/// validates the given pointer to a string
1038#[cfg(feature = "system-services-ptrvalidate")]
1039pub use sysmem::IsBadStringPtrW as IsBadStringPtr;
1040
1041/// `#402` IsBadWritePtr
1042///
1043/// validates a given pointer to writable memory
1044#[cfg(feature = "system-services-ptrvalidate")]
1045pub use sysmem::IsBadWritePtr;
1046
1047#[cfg(feature = "system-services-shutdown")]
1048mod sysshutdown_polyfill {
1049    #![allow(non_snake_case, missing_docs)]
1050    #![allow(clippy::missing_safety_doc)]
1051    use super::sysshutdown;
1052    use super::wincore;
1053
1054    #[inline]
1055    pub unsafe extern "system" fn ExitWindows(_dwreserved: u32, _code: u32) -> wincore::BOOL {
1056        unsafe { sysshutdown::ExitWindowsEx(sysshutdown::EWX_LOGOFF, u32::MAX) }
1057    }
1058}