From 2404e7f5d64c526f13c7e187a2fdf884f6d08506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 24 Feb 2025 11:58:18 +0100 Subject: [PATCH 1/4] update_mingw: Add update logic for winpthreads files. Also rename a few constants for clarity. --- tools/update_mingw.zig | 64 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/tools/update_mingw.zig b/tools/update_mingw.zig index c473e600aad4..9c67b27375bb 100644 --- a/tools/update_mingw.zig +++ b/tools/update_mingw.zig @@ -42,11 +42,12 @@ pub fn main() !void { src_crt_dir.copyFile(entry.path, dest_crt_dir, entry.path, .{}) catch |err| switch (err) { error.FileNotFound => { - const whitelisted = for (whitelist) |item| { + const keep = for (kept_crt_files) |item| { if (std.mem.eql(u8, entry.path, item)) break true; + if (std.mem.startsWith(u8, entry.path, "winpthreads/")) break true; } else false; - if (!whitelisted) { + if (!keep) { std.log.warn("deleting {s}", .{entry.path}); try dest_crt_dir.deleteFile(entry.path); } @@ -61,6 +62,51 @@ pub fn main() !void { if (fail) std.process.exit(1); } + { + const dest_mingw_winpthreads_path = try std.fs.path.join(arena, &.{ + zig_src_lib_path, "libc", "mingw", "winpthreads", + }); + const src_mingw_libraries_winpthreads_src_path = try std.fs.path.join(arena, &.{ + mingw_src_path, "mingw-w64-libraries", "winpthreads", "src", + }); + + var dest_winpthreads_dir = std.fs.cwd().openDir(dest_mingw_winpthreads_path, .{ .iterate = true }) catch |err| { + std.log.err("unable to open directory '{s}': {s}", .{ dest_mingw_winpthreads_path, @errorName(err) }); + std.process.exit(1); + }; + defer dest_winpthreads_dir.close(); + + var src_winpthreads_dir = std.fs.cwd().openDir(src_mingw_libraries_winpthreads_src_path, .{ .iterate = true }) catch |err| { + std.log.err("unable to open directory '{s}': {s}", .{ src_mingw_libraries_winpthreads_src_path, @errorName(err) }); + std.process.exit(1); + }; + defer src_winpthreads_dir.close(); + + { + var walker = try dest_winpthreads_dir.walk(arena); + defer walker.deinit(); + + var fail = false; + + while (try walker.next()) |entry| { + if (entry.kind != .file) continue; + + src_winpthreads_dir.copyFile(entry.path, dest_winpthreads_dir, entry.path, .{}) catch |err| switch (err) { + error.FileNotFound => { + std.log.warn("deleting {s}", .{entry.path}); + try dest_winpthreads_dir.deleteFile(entry.path); + }, + else => { + std.log.err("unable to copy {s}: {s}", .{ entry.path, @errorName(err) }); + fail = true; + }, + }; + } + + if (fail) std.process.exit(1); + } + } + { // Also add all new def and def.in files. var walker = try src_crt_dir.walk(arena); @@ -71,19 +117,19 @@ pub fn main() !void { while (try walker.next()) |entry| { if (entry.kind != .file) continue; - const ok_ext = for (ok_exts) |ext| { + const ok_ext = for (def_exts) |ext| { if (std.mem.endsWith(u8, entry.path, ext)) break true; } else false; if (!ok_ext) continue; - const ok_prefix = for (ok_prefixes) |p| { + const ok_prefix = for (def_dirs) |p| { if (std.mem.startsWith(u8, entry.path, p)) break true; } else false; if (!ok_prefix) continue; - const blacklisted = for (blacklist) |item| { + const blacklisted = for (blacklisted_defs) |item| { if (std.mem.eql(u8, entry.basename, item)) break true; } else false; @@ -106,17 +152,17 @@ pub fn main() !void { return std.process.cleanExit(); } -const whitelist = [_][]const u8{ +const kept_crt_files = [_][]const u8{ "COPYING", "include" ++ std.fs.path.sep_str ++ "config.h", }; -const ok_exts = [_][]const u8{ +const def_exts = [_][]const u8{ ".def", ".def.in", }; -const ok_prefixes = [_][]const u8{ +const def_dirs = [_][]const u8{ "lib32" ++ std.fs.path.sep_str, "lib64" ++ std.fs.path.sep_str, "libarm32" ++ std.fs.path.sep_str, @@ -125,7 +171,7 @@ const ok_prefixes = [_][]const u8{ "def-include" ++ std.fs.path.sep_str, }; -const blacklist = [_][]const u8{ +const blacklisted_defs = [_][]const u8{ "crtdll.def.in", "msvcp60.def", From ed10a5db588a74d4ecbff8dd4f5617d8fc75cd27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 24 Feb 2025 11:59:10 +0100 Subject: [PATCH 2/4] mingw: Update MinGW-w64 headers to 3839e21b08807479a31d5a9764666f82ae2f0356. --- lib/libc/include/any-windows-any/_mingw.h | 22 +- lib/libc/include/any-windows-any/_mingw_mac.h | 22 +- lib/libc/include/any-windows-any/activation.h | 2 +- lib/libc/include/any-windows-any/activaut.h | 2 +- lib/libc/include/any-windows-any/activdbg.h | 2 +- .../include/any-windows-any/activdbg100.h | 2 +- lib/libc/include/any-windows-any/activprof.h | 2 +- lib/libc/include/any-windows-any/activscp.h | 2 +- lib/libc/include/any-windows-any/adhoc.h | 2 +- lib/libc/include/any-windows-any/alg.h | 2 +- lib/libc/include/any-windows-any/amstream.h | 2 +- lib/libc/include/any-windows-any/amvideo.h | 2 +- lib/libc/include/any-windows-any/asyncinfo.h | 2 +- .../include/any-windows-any/audioclient.h | 2 +- .../include/any-windows-any/audioendpoints.h | 2 +- .../include/any-windows-any/audiopolicy.h | 2 +- lib/libc/include/any-windows-any/austream.h | 2 +- lib/libc/include/any-windows-any/bdaiface.h | 2 +- lib/libc/include/any-windows-any/bits.h | 2 +- lib/libc/include/any-windows-any/bits1_5.h | 2 +- lib/libc/include/any-windows-any/bits2_0.h | 2 +- lib/libc/include/any-windows-any/bits2_5.h | 2 +- lib/libc/include/any-windows-any/bits3_0.h | 2 +- lib/libc/include/any-windows-any/bits5_0.h | 2 +- lib/libc/include/any-windows-any/comadmin.h | 2 +- lib/libc/include/any-windows-any/combaseapi.h | 11 + lib/libc/include/any-windows-any/comcat.h | 2 +- .../include/any-windows-any/commoncontrols.h | 2 +- lib/libc/include/any-windows-any/consoleapi.h | 139 ++ .../include/any-windows-any/consoleapi2.h | 144 ++ .../include/any-windows-any/consoleapi3.h | 146 ++ lib/libc/include/any-windows-any/control.h | 2 +- .../include/any-windows-any/corecrt_wstdlib.h | 10 +- .../any-windows-any/credentialprovider.h | 2 +- lib/libc/include/any-windows-any/crtdbg.h | 232 ++- lib/libc/include/any-windows-any/ctfutb.h | 2 +- lib/libc/include/any-windows-any/ctxtcall.h | 2 +- lib/libc/include/any-windows-any/ctype.h | 72 +- lib/libc/include/any-windows-any/d3d10.h | 2 +- lib/libc/include/any-windows-any/d3d10_1.h | 2 +- .../include/any-windows-any/d3d10effect.h | 2 +- .../include/any-windows-any/d3d10sdklayers.h | 2 +- .../include/any-windows-any/d3d10shader.h | 2 +- lib/libc/include/any-windows-any/d3d11.h | 2 +- lib/libc/include/any-windows-any/d3d11_1.h | 2 +- lib/libc/include/any-windows-any/d3d11_2.h | 2 +- lib/libc/include/any-windows-any/d3d11_3.h | 2 +- lib/libc/include/any-windows-any/d3d11_4.h | 2 +- lib/libc/include/any-windows-any/d3d11on12.h | 2 +- .../include/any-windows-any/d3d11sdklayers.h | 2 +- lib/libc/include/any-windows-any/d3d12.h | 2 +- .../include/any-windows-any/d3d12sdklayers.h | 2 +- .../include/any-windows-any/d3d12shader.h | 2 +- lib/libc/include/any-windows-any/d3d12video.h | 2 +- lib/libc/include/any-windows-any/d3dcommon.h | 2 +- lib/libc/include/any-windows-any/dbgprop.h | 2 +- lib/libc/include/any-windows-any/dcommon.h | 2 +- .../include/any-windows-any/dcompanimation.h | 2 +- lib/libc/include/any-windows-any/ddstream.h | 2 +- .../include/any-windows-any/devicetopology.h | 2 +- lib/libc/include/any-windows-any/dimm.h | 2 +- lib/libc/include/any-windows-any/dinputd.h | 2 +- lib/libc/include/any-windows-any/direct.h | 33 + .../any-windows-any/directmanipulation.h | 2 +- lib/libc/include/any-windows-any/dispex.h | 2 +- lib/libc/include/any-windows-any/dmodshow.h | 2 +- lib/libc/include/any-windows-any/docobj.h | 2 +- .../any-windows-any/docobjectservice.h | 2 +- .../include/any-windows-any/documenttarget.h | 2 +- .../include/any-windows-any/downloadmgr.h | 2 +- .../include/any-windows-any/drmexternals.h | 2 +- lib/libc/include/any-windows-any/dvdif.h | 2 +- lib/libc/include/any-windows-any/dwrite.h | 2 +- lib/libc/include/any-windows-any/dwrite_1.h | 2 +- lib/libc/include/any-windows-any/dwrite_2.h | 2 +- lib/libc/include/any-windows-any/dwrite_3.h | 1054 +++++++++- lib/libc/include/any-windows-any/dxgi.h | 2 +- lib/libc/include/any-windows-any/dxgi1_2.h | 2 +- lib/libc/include/any-windows-any/dxgi1_3.h | 2 +- lib/libc/include/any-windows-any/dxgi1_4.h | 2 +- lib/libc/include/any-windows-any/dxgi1_5.h | 2 +- lib/libc/include/any-windows-any/dxgi1_6.h | 2 +- lib/libc/include/any-windows-any/dxgicommon.h | 2 +- lib/libc/include/any-windows-any/dxgidebug.h | 2 +- lib/libc/include/any-windows-any/dxgiformat.h | 2 +- lib/libc/include/any-windows-any/dxgitype.h | 2 +- lib/libc/include/any-windows-any/dxva2api.h | 2 +- lib/libc/include/any-windows-any/dxvahd.h | 4 +- .../include/any-windows-any/endpointvolume.h | 2 +- lib/libc/include/any-windows-any/evr.h | 2 +- lib/libc/include/any-windows-any/evr9.h | 2 +- lib/libc/include/any-windows-any/exdisp.h | 2 +- lib/libc/include/any-windows-any/fibersapi.h | 5 + lib/libc/include/any-windows-any/filter.h | 2 +- lib/libc/include/any-windows-any/fsrm.h | 2 +- lib/libc/include/any-windows-any/fsrmenums.h | 2 +- lib/libc/include/any-windows-any/fsrmquota.h | 2 +- .../include/any-windows-any/fsrmreports.h | 2 +- lib/libc/include/any-windows-any/fsrmscreen.h | 2 +- lib/libc/include/any-windows-any/fusion.h | 2 +- lib/libc/include/any-windows-any/fwptypes.h | 2 +- lib/libc/include/any-windows-any/hstring.h | 2 +- lib/libc/include/any-windows-any/icftypes.h | 2 +- lib/libc/include/any-windows-any/icodecapi.h | 2 +- lib/libc/include/any-windows-any/iketypes.h | 2 +- .../any-windows-any/inputpaneinterop.h | 2 +- lib/libc/include/any-windows-any/inputscope.h | 2 +- .../include/any-windows-any/inspectable.h | 2 +- lib/libc/include/any-windows-any/intrin.h | 20 +- lib/libc/include/any-windows-any/io.h | 15 + lib/libc/include/any-windows-any/iwscapi.h | 2 +- .../include/any-windows-any/locationapi.h | 2 +- lib/libc/include/any-windows-any/malloc.h | 75 +- lib/libc/include/any-windows-any/mapi.h | 42 + lib/libc/include/any-windows-any/mbstring.h | 7 + lib/libc/include/any-windows-any/mediaobj.h | 2 +- lib/libc/include/any-windows-any/medparam.h | 2 +- .../include/any-windows-any/mfcaptureengine.h | 2 +- lib/libc/include/any-windows-any/mfd3d12.h | 2 +- lib/libc/include/any-windows-any/mfidl.h | 2 +- .../include/any-windows-any/mfmediacapture.h | 2 +- .../include/any-windows-any/mfmediaengine.h | 2 +- lib/libc/include/any-windows-any/mfobjects.h | 2 +- lib/libc/include/any-windows-any/mfplay.h | 2 +- .../include/any-windows-any/mfreadwrite.h | 2 +- .../include/any-windows-any/mftransform.h | 2 +- .../include/any-windows-any/mmdeviceapi.h | 2 +- lib/libc/include/any-windows-any/mmstream.h | 2 +- lib/libc/include/any-windows-any/mscoree.h | 2 +- lib/libc/include/any-windows-any/msctf.h | 2 +- lib/libc/include/any-windows-any/mshtmhst.h | 2 +- lib/libc/include/any-windows-any/mshtml.h | 2 +- lib/libc/include/any-windows-any/msinkaut.h | 2 +- lib/libc/include/any-windows-any/msinkaut_i.c | 2 +- lib/libc/include/any-windows-any/msopc.h | 2 +- lib/libc/include/any-windows-any/msxml.h | 2 +- lib/libc/include/any-windows-any/msxml2.h | 2 +- lib/libc/include/any-windows-any/msxml6.h | 2 +- .../any-windows-any/napcertrelyingparty.h | 2 +- lib/libc/include/any-windows-any/napcommon.h | 2 +- .../any-windows-any/napenforcementclient.h | 2 +- .../include/any-windows-any/napmanagement.h | 2 +- .../include/any-windows-any/napprotocol.h | 2 +- .../any-windows-any/napservermanagement.h | 2 +- .../any-windows-any/napsystemhealthagent.h | 2 +- .../napsystemhealthvalidator.h | 2 +- lib/libc/include/any-windows-any/naptypes.h | 2 +- lib/libc/include/any-windows-any/netcfgn.h | 2 +- lib/libc/include/any-windows-any/netcfgx.h | 2 +- lib/libc/include/any-windows-any/netfw.h | 2 +- lib/libc/include/any-windows-any/netlistmgr.h | 2 +- lib/libc/include/any-windows-any/oaidl.h | 2 +- .../include/any-windows-any/objectarray.h | 2 +- lib/libc/include/any-windows-any/objidl.h | 2 +- lib/libc/include/any-windows-any/objidlbase.h | 2 +- lib/libc/include/any-windows-any/ocidl.h | 2 +- lib/libc/include/any-windows-any/oleacc.h | 2 +- lib/libc/include/any-windows-any/oleidl.h | 2 +- lib/libc/include/any-windows-any/optary.h | 2 +- .../any-windows-any/portabledeviceapi.h | 2 +- .../any-windows-any/portabledevicetypes.h | 2 +- .../any-windows-any/processthreadsapi.h | 14 +- .../proofofpossessioncookieinfo.h | 2 +- lib/libc/include/any-windows-any/propidl.h | 2 +- lib/libc/include/any-windows-any/propsys.h | 2 +- .../include/any-windows-any/propvarutil.h | 3 + .../any-windows-any/psdk_inc/intrin-impl.h | 27 +- lib/libc/include/any-windows-any/pthread.h | 57 +- .../include/any-windows-any/pthread_compat.h | 38 +- .../include/any-windows-any/pthread_time.h | 19 +- lib/libc/include/any-windows-any/qedit.h | 2 +- lib/libc/include/any-windows-any/qnetwork.h | 2 +- .../include/any-windows-any/rdpencomapi.h | 2 +- lib/libc/include/any-windows-any/regbag.h | 2 +- lib/libc/include/any-windows-any/relogger.h | 2 +- lib/libc/include/any-windows-any/robuffer.h | 2 +- lib/libc/include/any-windows-any/rtworkq.h | 2 +- lib/libc/include/any-windows-any/sapi51.h | 2 +- lib/libc/include/any-windows-any/sapi53.h | 2 +- lib/libc/include/any-windows-any/sapi54.h | 2 +- lib/libc/include/any-windows-any/sched.h | 34 +- .../any-windows-any/sec_api/stdlib_s.h | 10 +- lib/libc/include/any-windows-any/semaphore.h | 43 +- lib/libc/include/any-windows-any/sensorsapi.h | 2 +- lib/libc/include/any-windows-any/servprov.h | 2 +- lib/libc/include/any-windows-any/shldisp.h | 2 +- lib/libc/include/any-windows-any/shlwapi.h | 4 +- lib/libc/include/any-windows-any/shobjidl.h | 2 +- lib/libc/include/any-windows-any/shtypes.h | 2 +- .../any-windows-any/spatialaudioclient.h | 2 +- lib/libc/include/any-windows-any/spellcheck.h | 2 +- lib/libc/include/any-windows-any/stdio.h | 127 +- lib/libc/include/any-windows-any/stdlib.h | 63 + lib/libc/include/any-windows-any/string.h | 28 + lib/libc/include/any-windows-any/strmif.h | 2 +- .../structuredquerycondition.h | 2 +- lib/libc/include/any-windows-any/swprintf.inl | 34 +- .../systemmediatransportcontrolsinterop.h | 2 +- lib/libc/include/any-windows-any/taskschd.h | 2 +- lib/libc/include/any-windows-any/tchar.h | 83 +- lib/libc/include/any-windows-any/textstor.h | 2 +- lib/libc/include/any-windows-any/thumbcache.h | 2 +- lib/libc/include/any-windows-any/tlbref.h | 2 +- lib/libc/include/any-windows-any/tlogstg.h | 2 +- lib/libc/include/any-windows-any/tpcshrd.h | 2 +- .../any-windows-any/tsvirtualchannels.h | 2 +- lib/libc/include/any-windows-any/tuner.h | 2 +- .../include/any-windows-any/uianimation.h | 2 +- .../any-windows-any/uiautomationclient.h | 92 +- .../any-windows-any/uiautomationcore.h | 2 +- .../any-windows-any/uiviewsettingsinterop.h | 2 +- lib/libc/include/any-windows-any/unknwn.h | 2 +- lib/libc/include/any-windows-any/unknwnbase.h | 2 +- lib/libc/include/any-windows-any/urlhist.h | 2 +- lib/libc/include/any-windows-any/urlmon.h | 2 +- lib/libc/include/any-windows-any/vdslun.h | 2 +- lib/libc/include/any-windows-any/vidcap.h | 2 +- lib/libc/include/any-windows-any/vmr9.h | 2 +- lib/libc/include/any-windows-any/vsadmin.h | 2 +- lib/libc/include/any-windows-any/vsbackup.h | 2 +- lib/libc/include/any-windows-any/vsmgmt.h | 2 +- lib/libc/include/any-windows-any/vsprov.h | 2 +- lib/libc/include/any-windows-any/vss.h | 2 +- lib/libc/include/any-windows-any/vswriter.h | 2 +- lib/libc/include/any-windows-any/wbemads.h | 2 +- lib/libc/include/any-windows-any/wbemcli.h | 2 +- lib/libc/include/any-windows-any/wbemdisp.h | 2 +- lib/libc/include/any-windows-any/wbemprov.h | 2 +- lib/libc/include/any-windows-any/wbemtran.h | 2 +- lib/libc/include/any-windows-any/wchar.h | 142 +- lib/libc/include/any-windows-any/wdstptmgmt.h | 2 +- .../include/any-windows-any/weakreference.h | 2 +- lib/libc/include/any-windows-any/wia.h | 1051 +--------- lib/libc/include/any-windows-any/wia_lh.h | 1821 +++++++++++++++++ lib/libc/include/any-windows-any/wia_xp.h | 692 +++++++ lib/libc/include/any-windows-any/wiadef.h | 4 - lib/libc/include/any-windows-any/wincodec.h | 2 +- .../include/any-windows-any/wincodecsdk.h | 2 +- lib/libc/include/any-windows-any/wincon.h | 413 +--- .../include/any-windows-any/wincontypes.h | 130 ++ lib/libc/include/any-windows-any/winnt.h | 510 +++-- lib/libc/include/any-windows-any/winnt.rh | 218 ++ lib/libc/include/any-windows-any/wmcodecdsp.h | 2 +- .../include/any-windows-any/wmcontainer.h | 2 +- lib/libc/include/any-windows-any/wmdrmsdk.h | 2 +- lib/libc/include/any-windows-any/wmp.h | 2 +- .../include/any-windows-any/wmprealestate.h | 2 +- .../include/any-windows-any/wmpservices.h | 2 +- lib/libc/include/any-windows-any/wmsbuffer.h | 2 +- lib/libc/include/any-windows-any/wmsdkidl.h | 2 +- lib/libc/include/any-windows-any/wmsecure.h | 2 +- lib/libc/include/any-windows-any/wpcapi.h | 2 +- .../include/any-windows-any/wsdattachment.h | 2 +- lib/libc/include/any-windows-any/wsdbase.h | 2 +- lib/libc/include/any-windows-any/wsdclient.h | 2 +- lib/libc/include/any-windows-any/wsddisco.h | 2 +- lib/libc/include/any-windows-any/wsdhost.h | 2 +- lib/libc/include/any-windows-any/wsdxml.h | 2 +- lib/libc/include/any-windows-any/wsmandisp.h | 2 +- lib/libc/include/any-windows-any/wtypes.h | 2 +- lib/libc/include/any-windows-any/wtypesbase.h | 2 +- lib/libc/include/any-windows-any/wuapi.h | 2 +- lib/libc/include/any-windows-any/xamlom.h | 2 +- lib/libc/include/any-windows-any/xapo.h | 2 +- lib/libc/include/any-windows-any/xaudio2.h | 2 +- lib/libc/include/any-windows-any/xaudio2fx.h | 2 +- lib/libc/include/any-windows-any/xmllite.h | 2 +- .../any-windows-any/xpsdigitalsignature.h | 2 +- .../include/any-windows-any/xpsobjectmodel.h | 2 +- .../any-windows-any/xpsobjectmodel_1.h | 2 +- lib/libc/include/any-windows-any/xpsprint.h | 2 +- lib/libc/include/any-windows-any/xpsrassvc.h | 2 +- 272 files changed, 6025 insertions(+), 2143 deletions(-) create mode 100644 lib/libc/include/any-windows-any/consoleapi.h create mode 100644 lib/libc/include/any-windows-any/consoleapi2.h create mode 100644 lib/libc/include/any-windows-any/consoleapi3.h create mode 100644 lib/libc/include/any-windows-any/wia_lh.h create mode 100644 lib/libc/include/any-windows-any/wia_xp.h create mode 100644 lib/libc/include/any-windows-any/wincontypes.h diff --git a/lib/libc/include/any-windows-any/_mingw.h b/lib/libc/include/any-windows-any/_mingw.h index 2318dd0f9b60..965a2275c553 100644 --- a/lib/libc/include/any-windows-any/_mingw.h +++ b/lib/libc/include/any-windows-any/_mingw.h @@ -237,6 +237,10 @@ limitations in handling dllimport attribute. */ # endif #endif +#if !defined(__CRTDLL__) && __MSVCRT_VERSION__ == 0x00 +#define __CRTDLL__ +#endif + #if !defined(_UCRT) && ((__MSVCRT_VERSION__ >= 0x1400) || (__MSVCRT_VERSION__ >= 0xE00 && __MSVCRT_VERSION__ < 0x1000)) /* Allow both 0x1400 and 0xE00 to identify UCRT */ #define _UCRT @@ -594,12 +598,12 @@ extern "C" { void __cdecl __debugbreak(void); __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void) { -#if defined(__i386__) || defined(__x86_64__) +#if defined(__aarch64__) || defined(__arm64ec__) + __asm__ __volatile__("brk #0xf000"); +#elif defined(__i386__) || defined(__x86_64__) __asm__ __volatile__("int {$}3":); #elif defined(__arm__) __asm__ __volatile__("udf #0xfe"); -#elif defined(__aarch64__) - __asm__ __volatile__("brk #0xf000"); #else __asm__ __volatile__("unimplemented"); #endif @@ -615,14 +619,14 @@ __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void) void __cdecl __MINGW_ATTRIB_NORETURN __fastfail(unsigned int code); __MINGW_INTRIN_INLINE void __cdecl __MINGW_ATTRIB_NORETURN __fastfail(unsigned int code) { -#if defined(__i386__) || defined(__x86_64__) +#if defined(__aarch64__) || defined(__arm64ec__) + register unsigned int w0 __asm__("w0") = code; + __asm__ __volatile__("brk #0xf003"::"r"(w0)); +#elif defined(__i386__) || defined(__x86_64__) __asm__ __volatile__("int {$}0x29"::"c"(code)); #elif defined(__arm__) register unsigned int r0 __asm__("r0") = code; __asm__ __volatile__("udf #0xfb"::"r"(r0)); -#elif defined(__aarch64__) - register unsigned int w0 __asm__("w0") = code; - __asm__ __volatile__("brk #0xf003"::"r"(w0)); #else __asm__ __volatile__("unimplemented"); #endif @@ -636,13 +640,13 @@ __MINGW_INTRIN_INLINE void __cdecl __MINGW_ATTRIB_NORETURN __fastfail(unsigned i #define __MINGW_PREFETCH_IMPL 1 #endif #if __MINGW_PREFETCH_IMPL == 1 -#if defined(__arm__) || defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__) || defined(__arm64ec__) void __cdecl __prefetch(const void *addr); __MINGW_INTRIN_INLINE void __cdecl __prefetch(const void *addr) { #if defined(__arm__) __asm__ __volatile__("pld [%0]"::"r"(addr)); -#elif defined(__aarch64__) +#elif defined(__aarch64__) || defined(__arm64ec__) __asm__ __volatile__("prfm pldl1keep, [%0]"::"r"(addr)); #endif } diff --git a/lib/libc/include/any-windows-any/_mingw_mac.h b/lib/libc/include/any-windows-any/_mingw_mac.h index e7fd07220495..f69bbec5d344 100644 --- a/lib/libc/include/any-windows-any/_mingw_mac.h +++ b/lib/libc/include/any-windows-any/_mingw_mac.h @@ -7,6 +7,9 @@ #ifndef _INC_CRTDEFS_MACRO #define _INC_CRTDEFS_MACRO +#define __MINGW64_PASTE2(x, y) x ## y +#define __MINGW64_PASTE(x, y) __MINGW64_PASTE2(x, y) + #define __STRINGIFY(x) #x #define __MINGW64_STRINGIFY(x) \ __STRINGIFY(x) @@ -88,6 +91,13 @@ # endif #endif +#if defined(__arm64ec__) && !defined(_M_ARM64EC) +# define _M_ARM64EC 1 +# ifndef _ARM64EC_ +# define _ARM64EC_ 1 +# endif +#endif + #ifndef _X86_ /* MS does not prefix symbols by underscores for 64-bit. */ # ifndef __MINGW_USE_UNDERSCORE_PREFIX @@ -116,14 +126,14 @@ #endif /* ifndef _X86_ */ #if __MINGW_USE_UNDERSCORE_PREFIX == 0 -# define __MINGW_IMP_SYMBOL(sym) __imp_##sym -# define __MINGW_IMP_LSYMBOL(sym) __imp_##sym +# define __MINGW_IMP_SYMBOL(sym) __MINGW64_PASTE(__imp_,sym) +# define __MINGW_IMP_LSYMBOL(sym) __MINGW64_PASTE(__imp_,sym) # define __MINGW_USYMBOL(sym) sym -# define __MINGW_LSYMBOL(sym) _##sym +# define __MINGW_LSYMBOL(sym) __MINGW64_PASTE(_,sym) #else /* ! if __MINGW_USE_UNDERSCORE_PREFIX == 0 */ -# define __MINGW_IMP_SYMBOL(sym) _imp__##sym -# define __MINGW_IMP_LSYMBOL(sym) __imp__##sym -# define __MINGW_USYMBOL(sym) _##sym +# define __MINGW_IMP_SYMBOL(sym) __MINGW64_PASTE(_imp__,sym) +# define __MINGW_IMP_LSYMBOL(sym) __MINGW64_PASTE(__imp__,sym) +# define __MINGW_USYMBOL(sym) __MINGW64_PASTE(_,sym) # define __MINGW_LSYMBOL(sym) sym #endif /* if __MINGW_USE_UNDERSCORE_PREFIX == 0 */ diff --git a/lib/libc/include/any-windows-any/activation.h b/lib/libc/include/any-windows-any/activation.h index cf19b58c0074..8da6cf00b5c2 100644 --- a/lib/libc/include/any-windows-any/activation.h +++ b/lib/libc/include/any-windows-any/activation.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activation.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activation.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/activaut.h b/lib/libc/include/any-windows-any/activaut.h index ec1fc8fdb332..323e40d09c1a 100644 --- a/lib/libc/include/any-windows-any/activaut.h +++ b/lib/libc/include/any-windows-any/activaut.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activaut.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activaut.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/activdbg.h b/lib/libc/include/any-windows-any/activdbg.h index bc952ef9fd29..b7b67394d82a 100644 --- a/lib/libc/include/any-windows-any/activdbg.h +++ b/lib/libc/include/any-windows-any/activdbg.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activdbg.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activdbg.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/activdbg100.h b/lib/libc/include/any-windows-any/activdbg100.h index c21a81932e26..2a1525cb0a10 100644 --- a/lib/libc/include/any-windows-any/activdbg100.h +++ b/lib/libc/include/any-windows-any/activdbg100.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activdbg100.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activdbg100.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/activprof.h b/lib/libc/include/any-windows-any/activprof.h index eceb81c0c1bc..dab693335856 100644 --- a/lib/libc/include/any-windows-any/activprof.h +++ b/lib/libc/include/any-windows-any/activprof.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activprof.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activprof.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/activscp.h b/lib/libc/include/any-windows-any/activscp.h index 5bac679b9d6b..3e7062187fac 100644 --- a/lib/libc/include/any-windows-any/activscp.h +++ b/lib/libc/include/any-windows-any/activscp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/activscp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/activscp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/adhoc.h b/lib/libc/include/any-windows-any/adhoc.h index 96e6d32561cc..77929af55256 100644 --- a/lib/libc/include/any-windows-any/adhoc.h +++ b/lib/libc/include/any-windows-any/adhoc.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/adhoc.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/adhoc.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/alg.h b/lib/libc/include/any-windows-any/alg.h index df704be7bef1..45122302d8ac 100644 --- a/lib/libc/include/any-windows-any/alg.h +++ b/lib/libc/include/any-windows-any/alg.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/alg.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/alg.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/amstream.h b/lib/libc/include/any-windows-any/amstream.h index c1368a775dea..fbe51b4cc74f 100644 --- a/lib/libc/include/any-windows-any/amstream.h +++ b/lib/libc/include/any-windows-any/amstream.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/amstream.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/amstream.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/amvideo.h b/lib/libc/include/any-windows-any/amvideo.h index 9aed44015df7..b12684bcc25b 100644 --- a/lib/libc/include/any-windows-any/amvideo.h +++ b/lib/libc/include/any-windows-any/amvideo.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/amvideo.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/amvideo.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/asyncinfo.h b/lib/libc/include/any-windows-any/asyncinfo.h index 68ba5dea7cc9..bb2dffca7c2a 100644 --- a/lib/libc/include/any-windows-any/asyncinfo.h +++ b/lib/libc/include/any-windows-any/asyncinfo.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/asyncinfo.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/asyncinfo.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/audioclient.h b/lib/libc/include/any-windows-any/audioclient.h index d2c1dc8bba96..d20053152099 100644 --- a/lib/libc/include/any-windows-any/audioclient.h +++ b/lib/libc/include/any-windows-any/audioclient.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/audioclient.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/audioclient.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/audioendpoints.h b/lib/libc/include/any-windows-any/audioendpoints.h index b8d066ec2846..547050800342 100644 --- a/lib/libc/include/any-windows-any/audioendpoints.h +++ b/lib/libc/include/any-windows-any/audioendpoints.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/audioendpoints.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/audioendpoints.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/audiopolicy.h b/lib/libc/include/any-windows-any/audiopolicy.h index ac72dbaacbe8..4acbd39b9327 100644 --- a/lib/libc/include/any-windows-any/audiopolicy.h +++ b/lib/libc/include/any-windows-any/audiopolicy.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/audiopolicy.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/audiopolicy.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/austream.h b/lib/libc/include/any-windows-any/austream.h index 5c73c14c39bf..98a619bc10d7 100644 --- a/lib/libc/include/any-windows-any/austream.h +++ b/lib/libc/include/any-windows-any/austream.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/austream.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/austream.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bdaiface.h b/lib/libc/include/any-windows-any/bdaiface.h index 6390d72c15cd..883658009e90 100644 --- a/lib/libc/include/any-windows-any/bdaiface.h +++ b/lib/libc/include/any-windows-any/bdaiface.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bdaiface.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bdaiface.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits.h b/lib/libc/include/any-windows-any/bits.h index 9822593ab13f..ec90bde2df08 100644 --- a/lib/libc/include/any-windows-any/bits.h +++ b/lib/libc/include/any-windows-any/bits.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits1_5.h b/lib/libc/include/any-windows-any/bits1_5.h index 13f6ce852ba3..f351805ceb76 100644 --- a/lib/libc/include/any-windows-any/bits1_5.h +++ b/lib/libc/include/any-windows-any/bits1_5.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits1_5.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits1_5.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits2_0.h b/lib/libc/include/any-windows-any/bits2_0.h index 6976b0a2612a..ec3d1c685c64 100644 --- a/lib/libc/include/any-windows-any/bits2_0.h +++ b/lib/libc/include/any-windows-any/bits2_0.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits2_0.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits2_0.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits2_5.h b/lib/libc/include/any-windows-any/bits2_5.h index 5fe6e68d55c9..2fa677588fab 100644 --- a/lib/libc/include/any-windows-any/bits2_5.h +++ b/lib/libc/include/any-windows-any/bits2_5.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits2_5.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits2_5.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits3_0.h b/lib/libc/include/any-windows-any/bits3_0.h index 80562b4d5ad5..e8c3366d7a76 100644 --- a/lib/libc/include/any-windows-any/bits3_0.h +++ b/lib/libc/include/any-windows-any/bits3_0.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits3_0.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits3_0.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/bits5_0.h b/lib/libc/include/any-windows-any/bits5_0.h index d597f53bd4b9..3e5fe5b6f088 100644 --- a/lib/libc/include/any-windows-any/bits5_0.h +++ b/lib/libc/include/any-windows-any/bits5_0.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/bits5_0.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/bits5_0.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/comadmin.h b/lib/libc/include/any-windows-any/comadmin.h index a181d013a518..9295b0c7b959 100644 --- a/lib/libc/include/any-windows-any/comadmin.h +++ b/lib/libc/include/any-windows-any/comadmin.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/comadmin.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/comadmin.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/combaseapi.h b/lib/libc/include/any-windows-any/combaseapi.h index fa289ac1da01..1a96f6dbd207 100644 --- a/lib/libc/include/any-windows-any/combaseapi.h +++ b/lib/libc/include/any-windows-any/combaseapi.h @@ -354,6 +354,17 @@ WINOLEAPI CoGetTreatAsClass (REFCLSID clsidOld, LPCLSID pClsidNew); WINOLEAPI CoInvalidateRemoteMachineBindings (LPOLESTR pszMachineName); #endif +#if (NTDDI_VERSION >= NTDDI_WINBLUE) +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +enum AgileReferenceOptions { + AGILEREFERENCE_DEFAULT = 0, + AGILEREFERENCE_DELAYEDMARSHAL = 1 +}; + +WINOLEAPI RoGetAgileReference(enum AgileReferenceOptions options, REFIID riid, IUnknown *pUnk, IAgileReference **ppAgileReference); +#endif +#endif + #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT) (REFCLSID, REFIID, LPVOID *); typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW) (void); diff --git a/lib/libc/include/any-windows-any/comcat.h b/lib/libc/include/any-windows-any/comcat.h index e8c3aa9d0e6c..525bd7c0a283 100644 --- a/lib/libc/include/any-windows-any/comcat.h +++ b/lib/libc/include/any-windows-any/comcat.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/comcat.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/comcat.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/commoncontrols.h b/lib/libc/include/any-windows-any/commoncontrols.h index 3d5232661923..b65cf4eec41d 100644 --- a/lib/libc/include/any-windows-any/commoncontrols.h +++ b/lib/libc/include/any-windows-any/commoncontrols.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/commoncontrols.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/commoncontrols.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/consoleapi.h b/lib/libc/include/any-windows-any/consoleapi.h new file mode 100644 index 000000000000..233e1f3fef65 --- /dev/null +++ b/lib/libc/include/any-windows-any/consoleapi.h @@ -0,0 +1,139 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _APISETCONSOLE_ +#define _APISETCONSOLE_ + +#include <_mingw_unicode.h> + +#include +#include +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + +WINBASEAPI WINBOOL WINAPI AllocConsole(void); + +#if (NTDDI_VERSION >= NTDDI_WIN11_GE) + +typedef enum ALLOC_CONSOLE_MODE { + ALLOC_CONSOLE_MODE_DEFAULT = 0, + ALLOC_CONSOLE_MODE_NEW_WINDOW = 1, + ALLOC_CONSOLE_MODE_NO_WINDOW = 2 +} ALLOC_CONSOLE_MODE; + +typedef struct ALLOC_CONSOLE_OPTIONS { + ALLOC_CONSOLE_MODE mode; + WINBOOL useShowWindow; + WORD showWindow; +} ALLOC_CONSOLE_OPTIONS, *PALLOC_CONSOLE_OPTIONS; + +typedef enum ALLOC_CONSOLE_RESULT { + ALLOC_CONSOLE_RESULT_NO_CONSOLE = 0, + ALLOC_CONSOLE_RESULT_NEW_CONSOLE = 1, + ALLOC_CONSOLE_RESULT_EXISTING_CONSOLE = 2 +} ALLOC_CONSOLE_RESULT, *PALLOC_CONSOLE_RESULT; + +WINBASEAPI HRESULT WINAPI AllocConsoleWithOptions(PALLOC_CONSOLE_OPTIONS options, PALLOC_CONSOLE_RESULT result); + +#endif /* NTDDI_VERSION >= NTDDI_WIN11_GE */ + +WINBASEAPI WINBOOL WINAPI FreeConsole(void); + +#if (_WIN32_WINNT >= 0x0500) + +WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD process_id); + +#define ATTACH_PARENT_PROCESS ((DWORD)-1) + +#endif /* _WIN32_WINNT >= 0x0500 */ + +WINBASEAPI UINT WINAPI GetConsoleCP(void); +WINBASEAPI UINT WINAPI GetConsoleOutputCP(void); + +#define ENABLE_PROCESSED_INPUT 0x0001 +#define ENABLE_LINE_INPUT 0x0002 +#define ENABLE_ECHO_INPUT 0x0004 +#define ENABLE_WINDOW_INPUT 0x0008 +#define ENABLE_MOUSE_INPUT 0x0010 +#define ENABLE_INSERT_MODE 0x0020 +#define ENABLE_QUICK_EDIT_MODE 0x0040 +#define ENABLE_EXTENDED_FLAGS 0x0080 +#define ENABLE_AUTO_POSITION 0x0100 +#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200 + +#define ENABLE_PROCESSED_OUTPUT 0x0001 +#define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002 +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 +#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 +#define ENABLE_LVB_GRID_WORLDWIDE 0x0010 + +WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE console_handle, LPDWORD mode); +WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE console_handle, DWORD mode); +WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE console_input, LPDWORD number_of_events); + +WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE console_input, PINPUT_RECORD buffer, DWORD length, LPDWORD number_of_events_read); +WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE console_input, PINPUT_RECORD buffer, DWORD length, LPDWORD number_of_events_read); +#define ReadConsoleInput __MINGW_NAME_AW(ReadConsoleInput) + +WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE console_input, PINPUT_RECORD buffer, DWORD length, LPDWORD number_of_events_read); +WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE console_input, PINPUT_RECORD buffer, DWORD length, LPDWORD number_of_events_read); +#define PeekConsoleInput __MINGW_NAME_AW(PeekConsoleInput) + +typedef struct _CONSOLE_READCONSOLE_CONTROL { + ULONG nLength; + ULONG nInitialChars; + ULONG dwCtrlWakeupMask; + ULONG dwControlKeyState; +} CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL; + +WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE console_input, LPVOID buffer, DWORD number_of_chars_to_read, LPDWORD number_of_chars_read, PCONSOLE_READCONSOLE_CONTROL input_control); +WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE console_input, LPVOID buffer, DWORD number_of_chars_to_read, LPDWORD number_of_chars_read, PCONSOLE_READCONSOLE_CONTROL input_control); +#define ReadConsole __MINGW_NAME_AW(ReadConsole) + +WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE console_output, const void *buffer, DWORD number_of_chars_to_write, LPDWORD number_of_chars_written, LPVOID reserved); +WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE console_output, const void *buffer, DWORD number_of_chars_to_write, LPDWORD number_of_chars_written, LPVOID reserved); +#define WriteConsole __MINGW_NAME_AW(WriteConsole) + +#define CTRL_C_EVENT 0 +#define CTRL_BREAK_EVENT 1 +#define CTRL_CLOSE_EVENT 2 +#define CTRL_LOGOFF_EVENT 5 +#define CTRL_SHUTDOWN_EVENT 6 + +typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD ctrl_type); +WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE handler_routine, WINBOOL add); + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + +#if (NTDDI_VERSION >= NTDDI_WIN10_RS5) +#define PSEUDOCONSOLE_INHERIT_CURSOR (0x1) + +WINBASEAPI HRESULT WINAPI CreatePseudoConsole(COORD size, HANDLE input, HANDLE output, DWORD flags, HPCON *pc); +WINBASEAPI HRESULT WINAPI ResizePseudoConsole(HPCON pc, COORD size); +WINBASEAPI void WINAPI ClosePseudoConsole(HPCON pc); +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN11_GE) +WINBASEAPI HRESULT WINAPI ReleasePseudoConsole(HPCON pc); +#endif + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _APISETCONSOLE_ */ diff --git a/lib/libc/include/any-windows-any/consoleapi2.h b/lib/libc/include/any-windows-any/consoleapi2.h new file mode 100644 index 000000000000..184e47fe551d --- /dev/null +++ b/lib/libc/include/any-windows-any/consoleapi2.h @@ -0,0 +1,144 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _APISETCONSOLEL2_ +#define _APISETCONSOLEL2_ + +#include <_mingw_unicode.h> + +#include +#include +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + +#define FOREGROUND_BLUE 0x0001 +#define FOREGROUND_GREEN 0x0002 +#define FOREGROUND_RED 0x0004 +#define FOREGROUND_INTENSITY 0x0008 +#define BACKGROUND_BLUE 0x0010 +#define BACKGROUND_GREEN 0x0020 +#define BACKGROUND_RED 0x0040 +#define BACKGROUND_INTENSITY 0x0080 +#define COMMON_LVB_LEADING_BYTE 0x0100 +#define COMMON_LVB_TRAILING_BYTE 0x0200 +#define COMMON_LVB_GRID_HORIZONTAL 0x0400 +#define COMMON_LVB_GRID_LVERTICAL 0x0800 +#define COMMON_LVB_GRID_RVERTICAL 0x1000 +#define COMMON_LVB_REVERSE_VIDEO 0x4000 +#define COMMON_LVB_UNDERSCORE 0x8000 + +#define COMMON_LVB_SBCSDBCS 0x0300 + +WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE console_output, CHAR character, DWORD length, COORD write_coord, LPDWORD number_of_chars_written); +WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE console_output, WCHAR character, DWORD length, COORD write_coord, LPDWORD number_of_chars_written); +#define FillConsoleOutputCharacter __MINGW_NAME_AW(FillConsoleOutputCharacter) + +WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE console_output, WORD attribute, DWORD length, COORD write_coord, LPDWORD number_of_attrs_written); +WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD ctrl_event, DWORD process_group_id); +WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD desired_access, DWORD share_mode, const SECURITY_ATTRIBUTES *security_attributes, DWORD flags, LPVOID screen_buffer_data); +WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE console_output); +WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE console_input); +WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT code_page_id); +WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT code_page_id); + +typedef struct _CONSOLE_CURSOR_INFO { + DWORD dwSize; + WINBOOL bVisible; +} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO; + +WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE console_output, PCONSOLE_CURSOR_INFO console_cursor_info); +WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE console_output, const CONSOLE_CURSOR_INFO *console_cursor_info); + +typedef struct _CONSOLE_SCREEN_BUFFER_INFO { + COORD dwSize; + COORD dwCursorPosition; + WORD wAttributes; + SMALL_RECT srWindow; + COORD dwMaximumWindowSize; +} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO; + +WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE console_output, PCONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info); + +typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { + ULONG cbSize; + COORD dwSize; + COORD dwCursorPosition; + WORD wAttributes; + SMALL_RECT srWindow; + COORD dwMaximumWindowSize; + WORD wPopupAttributes; + WINBOOL bFullscreenSupported; + COLORREF ColorTable[16]; +} CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX; + +WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfoEx(HANDLE console_output, PCONSOLE_SCREEN_BUFFER_INFOEX console_screen_buffer_info_ex); +WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferInfoEx(HANDLE console_output, PCONSOLE_SCREEN_BUFFER_INFOEX console_screen_buffer_info_ex); +WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE console_output, COORD size); +WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE console_output, COORD cursor_position); +WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE console_output); +WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE console_output, WORD attributes); +WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE console_output, WINBOOL absolute, const SMALL_RECT *console_window); + +WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE console_output, LPCSTR character, DWORD length, COORD write_coord, LPDWORD number_of_chars_written); +WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE console_output, LPCWSTR character, DWORD length, COORD write_coord, LPDWORD number_of_chars_written); +#define WriteConsoleOutputCharacter __MINGW_NAME_AW(WriteConsoleOutputCharacter) + +WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE console_output, const WORD *attribute, DWORD length, COORD write_coord, LPDWORD number_of_attrs_written); + +WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE console_output, LPSTR character, DWORD length, COORD read_coord, LPDWORD number_of_chars_read); +WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE console_output, LPWSTR character, DWORD length, COORD read_coord, LPDWORD number_of_chars_read); +#define ReadConsoleOutputCharacter __MINGW_NAME_AW(ReadConsoleOutputCharacter) + +WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE console_output, LPWORD attribute, DWORD length, COORD read_coord, LPDWORD number_of_attrs_read); + +WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE console_input, const INPUT_RECORD *buffer, DWORD length, LPDWORD number_of_events_written); +WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE console_input, const INPUT_RECORD *buffer, DWORD length, LPDWORD number_of_events_written); +#define WriteConsoleInput __MINGW_NAME_AW(WriteConsoleInput) + +WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE console_output, const SMALL_RECT *scroll_rectangle, const SMALL_RECT *clip_rectangle, COORD destination_origin, const CHAR_INFO *fill); +WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE console_output, const SMALL_RECT *scroll_rectangle, const SMALL_RECT *clip_rectangle, COORD destination_origin, const CHAR_INFO *fill); +#define ScrollConsoleScreenBuffer __MINGW_NAME_AW(ScrollConsoleScreenBuffer) + +WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE console_output, const CHAR_INFO *buffer, COORD buffer_size, COORD buffer_coord, PSMALL_RECT write_region); +WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE console_output, const CHAR_INFO *buffer, COORD buffer_size, COORD buffer_coord, PSMALL_RECT write_region); +#define WriteConsoleOutput __MINGW_NAME_AW(WriteConsoleOutput) + +WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE console_output, PCHAR_INFO buffer, COORD buffer_size, COORD buffer_coord, PSMALL_RECT read_region); +WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE console_output, PCHAR_INFO buffer, COORD buffer_size, COORD buffer_coord, PSMALL_RECT read_region); +#define ReadConsoleOutput __MINGW_NAME_AW(ReadConsoleOutput) + +WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR console_title, DWORD size); +WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR console_title, DWORD size); +#define GetConsoleTitle __MINGW_NAME_AW(GetConsoleTitle) + +#if (_WIN32_WINNT >= 0x0600) + +WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleA(LPSTR console_title, DWORD size); +WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleW(LPWSTR console_title, DWORD size); +#define GetConsoleOriginalTitle __MINGW_NAME_AW(GetConsoleOriginalTitle) + +#endif /* _WIN32_WINNT >= 0x0600 */ + +WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR console_title); +WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR console_title); +#define SetConsoleTitle __MINGW_NAME_AW(SetConsoleTitle) + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _APISETCONSOLEL2_ */ diff --git a/lib/libc/include/any-windows-any/consoleapi3.h b/lib/libc/include/any-windows-any/consoleapi3.h new file mode 100644 index 000000000000..73363089bc31 --- /dev/null +++ b/lib/libc/include/any-windows-any/consoleapi3.h @@ -0,0 +1,146 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _APISETCONSOLEL3_ +#define _APISETCONSOLEL3_ + +#include <_mingw_unicode.h> + +#include +#include +#include +#include + +#include +#include + +#ifndef NOGDI +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + +WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD number_of_mouse_buttons); + +#if (_WIN32_WINNT >= 0x0500) + +WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE console_output, DWORD font); +WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFO console_current_font); + +#ifndef NOGDI + +typedef struct _CONSOLE_FONT_INFOEX { + ULONG cbSize; + DWORD nFont; + COORD dwFontSize; + UINT FontFamily; + UINT FontWeight; + WCHAR FaceName[LF_FACESIZE]; +} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; + +WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFontEx(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFOEX console_current_font_ex); +WINBASEAPI WINBOOL WINAPI SetCurrentConsoleFontEx(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFOEX console_current_font_ex); + +#endif /* !NOGDI */ + +#define CONSOLE_NO_SELECTION 0x0000 +#define CONSOLE_SELECTION_IN_PROGRESS 0x0001 +#define CONSOLE_SELECTION_NOT_EMPTY 0x0002 +#define CONSOLE_MOUSE_SELECTION 0x0004 +#define CONSOLE_MOUSE_DOWN 0x0008 + +typedef struct _CONSOLE_SELECTION_INFO { + DWORD dwFlags; + COORD dwSelectionAnchor; + SMALL_RECT srSelection; +} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO; + +WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO console_selection_info); + +#define HISTORY_NO_DUP_FLAG 0x1 + +typedef struct _CONSOLE_HISTORY_INFO { + UINT cbSize; + UINT HistoryBufferSize; + UINT NumberOfHistoryBuffers; + DWORD dwFlags; +} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; + +WINBASEAPI WINBOOL WINAPI GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO console_history_info); +WINBASEAPI WINBOOL WINAPI SetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO console_history_info); + +#define CONSOLE_FULLSCREEN 1 +#define CONSOLE_FULLSCREEN_HARDWARE 2 + +WINBASEAPI WINBOOL APIENTRY GetConsoleDisplayMode(LPDWORD mode_flags); + +#define CONSOLE_FULLSCREEN_MODE 1 +#define CONSOLE_WINDOWED_MODE 2 + +WINBASEAPI WINBOOL APIENTRY SetConsoleDisplayMode(HANDLE console_output, DWORD flags, PCOORD new_screen_buffer_dimensions); +WINBASEAPI HWND APIENTRY GetConsoleWindow(void); + +#endif /* _WIN32_WINNT >= 0x0500 */ + +#if (_WIN32_WINNT >= 0x0501) + +WINBASEAPI WINBOOL APIENTRY AddConsoleAliasA(LPSTR source, LPSTR target, LPSTR exe_name); +WINBASEAPI WINBOOL APIENTRY AddConsoleAliasW(LPWSTR source, LPWSTR target, LPWSTR exe_name); +#define AddConsoleAlias __MINGW_NAME_AW(AddConsoleAlias) + +WINBASEAPI DWORD APIENTRY GetConsoleAliasA(LPSTR source, LPSTR target_buffer, DWORD target_buffer_length, LPSTR exe_name); +WINBASEAPI DWORD APIENTRY GetConsoleAliasW(LPWSTR source, LPWSTR target_buffer, DWORD target_buffer_length, LPWSTR exe_name); +#define GetConsoleAlias __MINGW_NAME_AW(GetConsoleAlias) + +WINBASEAPI DWORD APIENTRY GetConsoleAliasesLengthA(LPSTR exe_name); +WINBASEAPI DWORD APIENTRY GetConsoleAliasesLengthW(LPWSTR exe_name); +#define GetConsoleAliasesLength __MINGW_NAME_AW(GetConsoleAliasesLength) + +WINBASEAPI DWORD APIENTRY GetConsoleAliasExesLengthA(void); +WINBASEAPI DWORD APIENTRY GetConsoleAliasExesLengthW(void); +#define GetConsoleAliasExesLength __MINGW_NAME_AW(GetConsoleAliasExesLength) + +WINBASEAPI DWORD APIENTRY GetConsoleAliasesA(LPSTR alias_buffer, DWORD alias_buffer_length, LPSTR exe_name); +WINBASEAPI DWORD APIENTRY GetConsoleAliasesW(LPWSTR alias_buffer, DWORD alias_buffer_length, LPWSTR exe_name); +#define GetConsoleAliases __MINGW_NAME_AW(GetConsoleAliases) + +WINBASEAPI DWORD APIENTRY GetConsoleAliasExesA(LPSTR exe_name_buffer, DWORD exe_name_buffer_length); +WINBASEAPI DWORD APIENTRY GetConsoleAliasExesW(LPWSTR exe_name_buffer, DWORD exe_name_buffer_length); +#define GetConsoleAliasExes __MINGW_NAME_AW(GetConsoleAliasExes) + +#endif /* _WIN32_WINNT >= 0x0501 */ + +WINBASEAPI void APIENTRY ExpungeConsoleCommandHistoryA(LPSTR exe_name); +WINBASEAPI void APIENTRY ExpungeConsoleCommandHistoryW(LPWSTR exe_name); +#define ExpungeConsoleCommandHistory __MINGW_NAME_AW(ExpungeConsoleCommandHistory) + +WINBASEAPI WINBOOL APIENTRY SetConsoleNumberOfCommandsA(DWORD number, LPSTR exe_name); +WINBASEAPI WINBOOL APIENTRY SetConsoleNumberOfCommandsW(DWORD number, LPWSTR exe_name); +#define SetConsoleNumberOfCommands __MINGW_NAME_AW(SetConsoleNumberOfCommands) + +WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryLengthA(LPSTR exe_name); +WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryLengthW(LPWSTR exe_name); +#define GetConsoleCommandHistoryLength __MINGW_NAME_AW(GetConsoleCommandHistoryLength) + +WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryA(LPSTR commands, DWORD command_buffer_length, LPSTR exe_name); +WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryW(LPWSTR commands, DWORD command_buffer_length, LPWSTR exe_name); +#define GetConsoleCommandHistory __MINGW_NAME_AW(GetConsoleCommandHistory) + +#if (_WIN32_WINNT >= 0x0501) +WINBASEAPI DWORD APIENTRY GetConsoleProcessList(LPDWORD process_list, DWORD process_count); +#endif /* _WIN32_WINNT >= 0x0501 */ + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _APISETCONSOLEL3_ */ diff --git a/lib/libc/include/any-windows-any/control.h b/lib/libc/include/any-windows-any/control.h index 59e5daea4c75..3953ad37b6a9 100644 --- a/lib/libc/include/any-windows-any/control.h +++ b/lib/libc/include/any-windows-any/control.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/control.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/control.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/corecrt_wstdlib.h b/lib/libc/include/any-windows-any/corecrt_wstdlib.h index 6169c2d40ac5..d525397e0970 100644 --- a/lib/libc/include/any-windows-any/corecrt_wstdlib.h +++ b/lib/libc/include/any-windows-any/corecrt_wstdlib.h @@ -10,6 +10,15 @@ #ifdef __cplusplus extern "C" { +#endif + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wdupenv_s") +#undef _wdupenv_s +#endif + _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wdupenv_s") #endif _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); @@ -24,7 +33,6 @@ extern "C" { _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t,_wgetenv_s,size_t*,_ReturnSize,wchar_t,_DstBuf,const wchar_t*,_VarName) - _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); diff --git a/lib/libc/include/any-windows-any/credentialprovider.h b/lib/libc/include/any-windows-any/credentialprovider.h index 7bbebbe14dbc..f440899ec2e1 100644 --- a/lib/libc/include/any-windows-any/credentialprovider.h +++ b/lib/libc/include/any-windows-any/credentialprovider.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/credentialprovider.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/credentialprovider.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/crtdbg.h b/lib/libc/include/any-windows-any/crtdbg.h index e24d5053bb8d..c498bcfa63f0 100644 --- a/lib/libc/include/any-windows-any/crtdbg.h +++ b/lib/libc/include/any-windows-any/crtdbg.h @@ -4,6 +4,7 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ #include +#include #ifndef _INC_CRTDBG #define _INC_CRTDBG @@ -94,13 +95,21 @@ extern "C" { } _CrtMemState; #ifndef _STATIC_ASSERT -#if defined(_MSC_VER) +#if (defined(__cpp_static_assert) && __cpp_static_assert >= 201411L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) +#define _STATIC_ASSERT(expr) static_assert(expr) +#elif defined(__cpp_static_assert) +#define _STATIC_ASSERT(expr) static_assert(expr, #expr) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#define _STATIC_ASSERT(expr) _Static_assert(expr, #expr) +#elif defined(_MSC_VER) #define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] #else #define _STATIC_ASSERT(expr) extern void __static_assert_t(int [(expr)?1:-1]) #endif #endif +#ifndef _DEBUG + #ifndef _ASSERT #define _ASSERT(expr) ((void)0) #endif @@ -208,6 +217,227 @@ extern "C" { #define _CrtSetCheckCount(f) ((int)0) #define _CrtGetCheckCount() ((int)0) +#else /* _DEBUG */ + +_CRTIMP long * __cdecl __p__crtAssertBusy(void); +#define _crtAssertBusy (*__p__crtAssertBusy()) + +_CRTIMP _CRT_REPORT_HOOK __cdecl _CrtGetReportHook(void); +_CRTIMP _CRT_REPORT_HOOK __cdecl _CrtSetReportHook(_CRT_REPORT_HOOK _PFnNewHook); +_CRTIMP int __cdecl _CrtSetReportHook2(int _Mode, _CRT_REPORT_HOOK _PFnNewHook); +_CRTIMP int __cdecl _CrtSetReportHookW2(int _Mode, _CRT_REPORT_HOOKW _PFnNewHook); +_CRTIMP int __cdecl _CrtSetReportMode(int _ReportType, int _ReportMode); +_CRTIMP _HFILE __cdecl _CrtSetReportFile(int _ReportType, _HFILE _ReportFile); +_CRTIMP int __cdecl _CrtDbgReport(int _ReportType, const char * _Filename, int _Linenumber, const char * _ModuleName, const char * _Format, ...); +_CRTIMP size_t __cdecl _CrtSetDebugFillThreshold(size_t _NewDebugFillThreshold); +_CRTIMP int __cdecl _CrtDbgReportW(int _ReportType, const wchar_t * _Filename, int _LineNumber, const wchar_t * _ModuleName, const wchar_t * _Format, ...); + +#define _ASSERT_EXPR(expr, msg) \ + (void) ((!!(expr)) || \ + (1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, msg)) || \ + (_CrtDbgBreak(), 0)) + +#ifndef _ASSERT +#define _ASSERT(expr) _ASSERT_EXPR((expr), NULL) +#endif + +#ifndef _ASSERTE +#define _ASSERTE(expr) _ASSERT_EXPR((expr), _CRT_WIDE(#expr)) +#endif + +#ifndef _ASSERT_BASE +#define _ASSERT_BASE _ASSERT_EXPR +#endif + +#define _RPT_BASE(args) \ + (void) ((1 != _CrtDbgReport args) || \ + (_CrtDbgBreak(), 0)) + +#define _RPT_BASE_W(args) \ + (void) ((1 != _CrtDbgReportW args) || \ + (_CrtDbgBreak(), 0)) + +#define _RPT0(rptno, msg) \ + _RPT_BASE((rptno, NULL, 0, NULL, "%s", msg)) + +#define _RPTW0(rptno, msg) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, L"%s", msg)) + +#define _RPT1(rptno, msg, arg1) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1)) + +#define _RPTW1(rptno, msg, arg1) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1)) + +#define _RPT2(rptno, msg, arg1, arg2) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2)) + +#define _RPTW2(rptno, msg, arg1, arg2) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2)) + +#define _RPT3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3)) + +#define _RPTW3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3)) + +#define _RPT4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4)) + +#define _RPTW4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4)) + +#define _RPT5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4, arg5)) + +#define _RPTW5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ + _RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4, arg5)) + +#define _RPTF0(rptno, msg) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, "%s", msg)) + +#define _RPTFW0(rptno, msg) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, L"%s", msg)) + +#define _RPTF1(rptno, msg, arg1) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1)) + +#define _RPTFW1(rptno, msg, arg1) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1)) + +#define _RPTF2(rptno, msg, arg1, arg2) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2)) + +#define _RPTFW2(rptno, msg, arg1, arg2) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2)) + +#define _RPTF3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3)) + +#define _RPTFW3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3)) + +#define _RPTF4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3, arg4)) + +#define _RPTFW4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3, arg4)) + +#define _RPTF5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3, arg4, arg5)) + +#define _RPTFW5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ + _RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3, arg4, arg5)) + +#define _CrtDbgBreak() __debugbreak() + +#ifdef _CRTDBG_MAP_ALLOC + +#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _recalloc(p, c, s) _recalloc_dbg(p, c, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define free(p) _free_dbg(p, _NORMAL_BLOCK) +#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK) +#define _aligned_msize(p, a, o) _aligned_msize_dbg(p, a, o) +#define _aligned_malloc(s, a) _aligned_malloc_dbg(s, a, __FILE__, __LINE__) +#define _aligned_realloc(p, s, a) _aligned_realloc_dbg(p, s, a, __FILE__, __LINE__) +#define _aligned_recalloc(p, c, s, a) _aligned_recalloc_dbg(p, c, s, a, __FILE__, __LINE__) +#define _aligned_offset_malloc(s, a, o) _aligned_offset_malloc_dbg(s, a, o, __FILE__, __LINE__) +#define _aligned_offset_realloc(p, s, a, o) _aligned_offset_realloc_dbg(p, s, a, o, __FILE__, __LINE__) +#define _aligned_offset_recalloc(p, c, s, a, o) _aligned_offset_recalloc_dbg(p, c, s, a, o, __FILE__, __LINE__) +#define _aligned_free(p) _aligned_free_dbg(p) + +#define _malloca(s) _malloca_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _freea(p) _freea_dbg(p, _NORMAL_BLOCK) + +#define _strdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wcsdup(s) _wcsdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _mbsdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _tempnam(s1, s2) _tempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wtempnam(s1, s2) _wtempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _fullpath(s1, s2, le) _fullpath_dbg(s1, s2, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wfullpath(s1, s2, le) _wfullpath_dbg(s1, s2, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _getcwd(s, le) _getcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wgetcwd(s, le) _wgetcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _getdcwd(d, s, le) _getdcwd_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wgetdcwd(d, s, le) _wgetdcwd_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _getdcwd_nolock(d, s, le) _getdcwd_lk_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wgetdcwd_nolock(d, s, le) _wgetdcwd_lk_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _dupenv_s(ps1, size, s2) _dupenv_s_dbg(ps1, size, s2, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _wdupenv_s(ps1, size, s2) _wdupenv_s_dbg(ps1, size, s2, _NORMAL_BLOCK, __FILE__, __LINE__) + +#define strdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define wcsdup(s) _wcsdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define tempnam(s1, s2) _tempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) +#define getcwd(s, le) _getcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) + +#endif /* _CRTDBG_MAP_ALLOC */ + +_CRTIMP long * __cdecl __p__crtBreakAlloc(void); +#define _crtBreakAlloc (*__p__crtBreakAlloc()) + +_CRTIMP long __cdecl _CrtSetBreakAlloc(long _BreakAlloc); + +_CRTIMP __checkReturn void * __cdecl _malloc_dbg(size_t _Size, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _calloc_dbg(size_t _NumOfElements, size_t _SizeOfElements, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _realloc_dbg(void * _Memory, size_t _NewSize, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _expand_dbg(void * _Memory, size_t _NewSize, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP void __cdecl _free_dbg(void * _Memory, int _BlockType); +_CRTIMP size_t __cdecl _msize_dbg(void * _Memory, int _BlockType); +_CRTIMP size_t __cdecl _aligned_msize_dbg(void * _Memory, size_t _Alignment, size_t _Offset); +_CRTIMP __checkReturn void * __cdecl _aligned_malloc_dbg(size_t _Size, size_t _Alignment, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _aligned_realloc_dbg(void * _Memory, size_t _Size, size_t _Alignment, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _aligned_recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, size_t _Alignment, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _aligned_offset_malloc_dbg(size_t _Size, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _aligned_offset_realloc_dbg(void * _Memory, size_t _Size, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn void * __cdecl _aligned_offset_recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); +_CRTIMP void __cdecl _aligned_free_dbg(void * _Memory); +_CRTIMP __checkReturn char * __cdecl _strdup_dbg(const char * _Str, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn wchar_t * __cdecl _wcsdup_dbg(const wchar_t * _Str, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn char * __cdecl _tempnam_dbg(const char * _DirName, const char * _FilePrefix, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn wchar_t * __cdecl _wtempnam_dbg(const wchar_t * _DirName, const wchar_t * _FilePrefix, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn char * __cdecl _fullpath_dbg(char * _FullPath, const char * _Path, size_t _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn wchar_t * __cdecl _wfullpath_dbg(wchar_t * _FullPath, const wchar_t * _Path, size_t _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn char * __cdecl _getcwd_dbg(char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn wchar_t * __cdecl _wgetcwd_dbg(wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn char * __cdecl _getdcwd_dbg(int _Drive, char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn wchar_t * __cdecl _wgetdcwd_dbg(int _Drive, wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); +__checkReturn char * __cdecl _getdcwd_lk_dbg(int _Drive, char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); +__checkReturn wchar_t * __cdecl _wgetdcwd_lk_dbg(int _Drive, wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn errno_t __cdecl _dupenv_s_dbg(char ** _PBuffer, size_t * _PBufferSizeInBytes, const char * _VarName, int _BlockType, const char * _Filename, int _LineNumber); +_CRTIMP __checkReturn errno_t __cdecl _wdupenv_s_dbg(wchar_t ** _PBuffer, size_t * _PBufferSizeInWords, const wchar_t * _VarName, int _BlockType, const char * _Filename, int _LineNumber); + +#define _malloca_dbg(s, t, f, l) _malloc_dbg(s, t, f, l) +#define _freea_dbg(p, t) _free_dbg(p, t) + +_CRTIMP _CRT_ALLOC_HOOK __cdecl _CrtGetAllocHook(void); +_CRTIMP _CRT_ALLOC_HOOK __cdecl _CrtSetAllocHook(_CRT_ALLOC_HOOK _PfnNewHook); + +_CRTIMP int * __cdecl __p__crtDbgFlag(void); +#define _crtDbgFlag (*__p__crtDbgFlag()) + +_CRTIMP int __cdecl _CrtCheckMemory(void); +_CRTIMP int __cdecl _CrtSetDbgFlag(int _NewFlag); +_CRTIMP void __cdecl _CrtDoForAllClientObjects(void (__cdecl *_PFn)(void *, void *), void * _Context); +_CRTIMP __checkReturn int __cdecl _CrtIsValidPointer(const void * _Ptr, unsigned int _Bytes, int _ReadWrite); +_CRTIMP __checkReturn int __cdecl _CrtIsValidHeapPointer(const void * _HeapPtr); +_CRTIMP int __cdecl _CrtIsMemoryBlock(const void * _Memory, unsigned int _Bytes, long * _RequestNumber, char ** _Filename, int * _LineNumber); +_CRTIMP __checkReturn int __cdecl _CrtReportBlockType(const void * _Memory); +_CRTIMP _CRT_DUMP_CLIENT __cdecl _CrtGetDumpClient(void); +_CRTIMP _CRT_DUMP_CLIENT __cdecl _CrtSetDumpClient(_CRT_DUMP_CLIENT _PFnNewDump); +_CRTIMP _CRT_MANAGED_HEAP_DEPRECATE void __cdecl _CrtMemCheckpoint(_CrtMemState * _State); +_CRTIMP _CRT_MANAGED_HEAP_DEPRECATE int __cdecl _CrtMemDifference(_CrtMemState * _State, const _CrtMemState * _OldState, const _CrtMemState * _NewState); +_CRTIMP void __cdecl _CrtMemDumpAllObjectsSince(const _CrtMemState * _State); +_CRTIMP void __cdecl _CrtMemDumpStatistics(const _CrtMemState * _State); +_CRTIMP int __cdecl _CrtDumpMemoryLeaks(void); +_CRTIMP int __cdecl _CrtSetCheckCount(int _CheckCount); +_CRTIMP int __cdecl _CrtGetCheckCount(void); + +#endif /* _DEBUG */ + #ifdef __cplusplus } /* diff --git a/lib/libc/include/any-windows-any/ctfutb.h b/lib/libc/include/any-windows-any/ctfutb.h index 21ae6482d886..963e8c979cc4 100644 --- a/lib/libc/include/any-windows-any/ctfutb.h +++ b/lib/libc/include/any-windows-any/ctfutb.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/ctfutb.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/ctfutb.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/ctxtcall.h b/lib/libc/include/any-windows-any/ctxtcall.h index 327653213530..350873862f48 100644 --- a/lib/libc/include/any-windows-any/ctxtcall.h +++ b/lib/libc/include/any-windows-any/ctxtcall.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/ctxtcall.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/ctxtcall.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/ctype.h b/lib/libc/include/any-windows-any/ctype.h index 975d21abfb2e..2c8499d4d5bb 100644 --- a/lib/libc/include/any-windows-any/ctype.h +++ b/lib/libc/include/any-windows-any/ctype.h @@ -111,35 +111,38 @@ extern "C" { _CRTIMP int __cdecl __toascii(int _C); _CRTIMP int __cdecl __iscsymf(int _C); _CRTIMP int __cdecl __iscsym(int _C); - -#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) || defined (__cplusplus) -int __cdecl isblank(int _C); -#endif +#if __MSVCRT_VERSION__ >= 0xC00 + _CRTIMP int __cdecl isblank(int _C); + _CRTIMP int __cdecl _isblank_l(int _C,_locale_t _Locale); +#else + int __cdecl isblank(int _C); +#endif /* msvcr120 */ #endif #ifndef _WCTYPE_DEFINED #define _WCTYPE_DEFINED - int __cdecl iswalpha(wint_t _C); - int __cdecl iswupper(wint_t _C); - int __cdecl iswlower(wint_t _C); - int __cdecl iswdigit(wint_t _C); - int __cdecl iswxdigit(wint_t _C); - int __cdecl iswspace(wint_t _C); - int __cdecl iswpunct(wint_t _C); - int __cdecl iswalnum(wint_t _C); - int __cdecl iswprint(wint_t _C); - int __cdecl iswgraph(wint_t _C); - int __cdecl iswcntrl(wint_t _C); - int __cdecl iswascii(wint_t _C); + _CRTIMP int __cdecl iswalpha(wint_t _C); + _CRTIMP int __cdecl iswupper(wint_t _C); + _CRTIMP int __cdecl iswlower(wint_t _C); + _CRTIMP int __cdecl iswdigit(wint_t _C); + _CRTIMP int __cdecl iswxdigit(wint_t _C); + _CRTIMP int __cdecl iswspace(wint_t _C); + _CRTIMP int __cdecl iswpunct(wint_t _C); + _CRTIMP int __cdecl iswalnum(wint_t _C); + _CRTIMP int __cdecl iswprint(wint_t _C); + _CRTIMP int __cdecl iswgraph(wint_t _C); + _CRTIMP int __cdecl iswcntrl(wint_t _C); + _CRTIMP int __cdecl iswascii(wint_t _C); #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP - int __cdecl isleadbyte(int _C); + _CRTIMP int __cdecl isleadbyte(int _C); #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */ - wint_t __cdecl towupper(wint_t _C); - wint_t __cdecl towlower(wint_t _C); - int __cdecl iswctype(wint_t _C,wctype_t _Type); -#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x700 && _WIN32_WINNT >= 0x0600) - /* These are available since msvcr80.dll, and in msvcrt.dll since Vista. */ + _CRTIMP wint_t __cdecl towupper(wint_t _C); + _CRTIMP wint_t __cdecl towlower(wint_t _C); + _CRTIMP int __cdecl iswctype(wint_t _C,wctype_t _Type); +#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) + /* These are available since msvcr80.dll (__MSVCRT_VERSION__ >= 0x800), and in + * msvcrt.dll (__MSVCRT_VERSION__ == 0x600) since Vista (_WIN32_WINNT >= 0x0600). */ _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale); _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale); _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale); @@ -166,12 +169,15 @@ int __cdecl isblank(int _C); _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale); #endif #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP - int __cdecl is_wctype(wint_t _C,wctype_t _Type); + _CRTIMP int __cdecl is_wctype(wint_t _C,wctype_t _Type); #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */ -#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) || defined (__cplusplus) -int __cdecl iswblank(wint_t _C); -#endif +#if __MSVCRT_VERSION__ >= 0xC00 + _CRTIMP int __cdecl iswblank(wint_t _C); + _CRTIMP int __cdecl _iswblank_l(wint_t _C,_locale_t _Locale); +#else + int __cdecl iswblank(wint_t _C); +#endif /* msvcr120 */ #endif #ifndef _CTYPE_DISABLE_MACROS @@ -225,7 +231,8 @@ _CRTIMP int __cdecl ___mb_cur_max_func(void); #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT)) #define iswcntrl(_c) (iswctype(_c,_CONTROL)) #define iswascii(_c) ((unsigned)(_c) < 0x80) -#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x700 && _WIN32_WINNT >= 0x0600) +#define iswblank(_c) (iswctype(_c,_SPACE) || ((_c)=='\t')) +#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) # define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p)) # define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p)) # define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p)) @@ -238,7 +245,10 @@ _CRTIMP int __cdecl ___mb_cur_max_func(void); # define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p)) # define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p)) #endif /* __MSVCRT_VERSION__ >= 0x800 */ +#if __MSVCRT_VERSION__ >= 0xC00 +#define _iswblank_l(_c,_p) (_iswctype_l(_c,_BLANK,_p) || ((_c)=='\t')) #endif +#endif /* __cplusplus */ #endif #define __iscsymf(_c) (isalpha(_c) || ((_c)=='_')) @@ -253,10 +263,10 @@ _CRTIMP int __cdecl ___mb_cur_max_func(void); #ifndef NO_OLDNAMES #ifndef _CTYPE_DEFINED - int __cdecl isascii(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; - int __cdecl toascii(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; - int __cdecl iscsymf(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; - int __cdecl iscsym(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; + _CRTIMP int __cdecl isascii(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; + _CRTIMP int __cdecl toascii(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; + _CRTIMP int __cdecl iscsymf(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; + _CRTIMP int __cdecl iscsym(int _C) __MINGW_ATTRIB_DEPRECATED_MSVC2005; #else #define isascii __isascii #define toascii __toascii diff --git a/lib/libc/include/any-windows-any/d3d10.h b/lib/libc/include/any-windows-any/d3d10.h index 7574c6d1f8f2..23cb271e3543 100644 --- a/lib/libc/include/any-windows-any/d3d10.h +++ b/lib/libc/include/any-windows-any/d3d10.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d10.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d10.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d10_1.h b/lib/libc/include/any-windows-any/d3d10_1.h index 4156f5cb4e2c..d21eeb338ef2 100644 --- a/lib/libc/include/any-windows-any/d3d10_1.h +++ b/lib/libc/include/any-windows-any/d3d10_1.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d10_1.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d10_1.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d10effect.h b/lib/libc/include/any-windows-any/d3d10effect.h index 64de43b97e9d..5c4b86aaa606 100644 --- a/lib/libc/include/any-windows-any/d3d10effect.h +++ b/lib/libc/include/any-windows-any/d3d10effect.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d10effect.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d10effect.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d10sdklayers.h b/lib/libc/include/any-windows-any/d3d10sdklayers.h index 4ffa6628e798..cc8e9ec4a82b 100644 --- a/lib/libc/include/any-windows-any/d3d10sdklayers.h +++ b/lib/libc/include/any-windows-any/d3d10sdklayers.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d10sdklayers.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d10sdklayers.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d10shader.h b/lib/libc/include/any-windows-any/d3d10shader.h index 3771ecde424d..0c826c6c922c 100644 --- a/lib/libc/include/any-windows-any/d3d10shader.h +++ b/lib/libc/include/any-windows-any/d3d10shader.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d10shader.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d10shader.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11.h b/lib/libc/include/any-windows-any/d3d11.h index ea12315b2ee9..407c5d443018 100644 --- a/lib/libc/include/any-windows-any/d3d11.h +++ b/lib/libc/include/any-windows-any/d3d11.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11_1.h b/lib/libc/include/any-windows-any/d3d11_1.h index 9217ec94c989..117c9a9432ea 100644 --- a/lib/libc/include/any-windows-any/d3d11_1.h +++ b/lib/libc/include/any-windows-any/d3d11_1.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11_1.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11_1.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11_2.h b/lib/libc/include/any-windows-any/d3d11_2.h index 3d5c784651b5..8de7055d277d 100644 --- a/lib/libc/include/any-windows-any/d3d11_2.h +++ b/lib/libc/include/any-windows-any/d3d11_2.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11_2.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11_2.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11_3.h b/lib/libc/include/any-windows-any/d3d11_3.h index 324b1aae14ad..e8087e4add07 100644 --- a/lib/libc/include/any-windows-any/d3d11_3.h +++ b/lib/libc/include/any-windows-any/d3d11_3.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11_3.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11_3.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11_4.h b/lib/libc/include/any-windows-any/d3d11_4.h index bf2bed09a225..a2bf87f06948 100644 --- a/lib/libc/include/any-windows-any/d3d11_4.h +++ b/lib/libc/include/any-windows-any/d3d11_4.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11_4.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11_4.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11on12.h b/lib/libc/include/any-windows-any/d3d11on12.h index d8cefe66348b..f2d9ab39625d 100644 --- a/lib/libc/include/any-windows-any/d3d11on12.h +++ b/lib/libc/include/any-windows-any/d3d11on12.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11on12.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11on12.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d11sdklayers.h b/lib/libc/include/any-windows-any/d3d11sdklayers.h index 794a4072135b..1091ef0103ce 100644 --- a/lib/libc/include/any-windows-any/d3d11sdklayers.h +++ b/lib/libc/include/any-windows-any/d3d11sdklayers.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d11sdklayers.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d11sdklayers.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d12.h b/lib/libc/include/any-windows-any/d3d12.h index 9270b89a39ae..d431790aafd8 100644 --- a/lib/libc/include/any-windows-any/d3d12.h +++ b/lib/libc/include/any-windows-any/d3d12.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d12.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d12.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d12sdklayers.h b/lib/libc/include/any-windows-any/d3d12sdklayers.h index d53432f741e2..69c10b8abd74 100644 --- a/lib/libc/include/any-windows-any/d3d12sdklayers.h +++ b/lib/libc/include/any-windows-any/d3d12sdklayers.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d12sdklayers.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d12sdklayers.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d12shader.h b/lib/libc/include/any-windows-any/d3d12shader.h index af7fd5b6dc96..dcd09944ffef 100644 --- a/lib/libc/include/any-windows-any/d3d12shader.h +++ b/lib/libc/include/any-windows-any/d3d12shader.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d12shader.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d12shader.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3d12video.h b/lib/libc/include/any-windows-any/d3d12video.h index cf15640d4b4d..598341a7e3f2 100644 --- a/lib/libc/include/any-windows-any/d3d12video.h +++ b/lib/libc/include/any-windows-any/d3d12video.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3d12video.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3d12video.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/d3dcommon.h b/lib/libc/include/any-windows-any/d3dcommon.h index 5a7ff8dbe632..da1410daa2dd 100644 --- a/lib/libc/include/any-windows-any/d3dcommon.h +++ b/lib/libc/include/any-windows-any/d3dcommon.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/d3dcommon.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/d3dcommon.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dbgprop.h b/lib/libc/include/any-windows-any/dbgprop.h index 8a61c945b15b..f4b5988d01a3 100644 --- a/lib/libc/include/any-windows-any/dbgprop.h +++ b/lib/libc/include/any-windows-any/dbgprop.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dbgprop.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dbgprop.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dcommon.h b/lib/libc/include/any-windows-any/dcommon.h index 4dce5a582f3c..2c84344bc1ad 100644 --- a/lib/libc/include/any-windows-any/dcommon.h +++ b/lib/libc/include/any-windows-any/dcommon.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dcommon.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dcommon.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dcompanimation.h b/lib/libc/include/any-windows-any/dcompanimation.h index 9d4fd8df49a9..c2df490f8c53 100644 --- a/lib/libc/include/any-windows-any/dcompanimation.h +++ b/lib/libc/include/any-windows-any/dcompanimation.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dcompanimation.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dcompanimation.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/ddstream.h b/lib/libc/include/any-windows-any/ddstream.h index f4e3e706d527..78eca081e45c 100644 --- a/lib/libc/include/any-windows-any/ddstream.h +++ b/lib/libc/include/any-windows-any/ddstream.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/ddstream.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/ddstream.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/devicetopology.h b/lib/libc/include/any-windows-any/devicetopology.h index c71d78f5f888..a25846488f1f 100644 --- a/lib/libc/include/any-windows-any/devicetopology.h +++ b/lib/libc/include/any-windows-any/devicetopology.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/devicetopology.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/devicetopology.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dimm.h b/lib/libc/include/any-windows-any/dimm.h index 1fce97e4d197..0ef27d5e1256 100644 --- a/lib/libc/include/any-windows-any/dimm.h +++ b/lib/libc/include/any-windows-any/dimm.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dimm.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dimm.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dinputd.h b/lib/libc/include/any-windows-any/dinputd.h index 586da73bebcd..bc5f37721c94 100644 --- a/lib/libc/include/any-windows-any/dinputd.h +++ b/lib/libc/include/any-windows-any/dinputd.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dinputd.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dinputd.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/direct.h b/lib/libc/include/any-windows-any/direct.h index e6d95f271025..df53e95f2d72 100644 --- a/lib/libc/include/any-windows-any/direct.h +++ b/lib/libc/include/any-windows-any/direct.h @@ -25,10 +25,23 @@ extern "C" { }; #endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_getcwd") +#undef _getcwd +#pragma push_macro("_getdcwd") +#undef _getdcwd +#pragma push_macro("_getdcwd_nolock") +#undef _getdcwd_nolock +#endif _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes); _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes); #if __MSVCRT_VERSION__ >= 0x800 char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes); +#endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_getcwd") +#pragma pop_macro("_getdcwd") +#pragma pop_macro("_getdcwd_nolock") #endif _CRTIMP int __cdecl _chdir(const char *_Path); _CRTIMP int __cdecl _mkdir(const char *_Path); @@ -46,10 +59,23 @@ extern "C" { #ifndef _WDIRECT_DEFINED #define _WDIRECT_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wgetcwd") +#undef _wgetcwd +#pragma push_macro("_wgetdcwd") +#undef _wgetdcwd +#pragma push_macro("_wgetdcwd_nolock") +#undef _wgetdcwd_nolock +#endif _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); #if __MSVCRT_VERSION__ >= 0x800 wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords); +#endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wgetcwd") +#pragma pop_macro("_wgetdcwd") +#pragma pop_macro("_wgetdcwd_nolock") #endif _CRTIMP int __cdecl _wchdir(const wchar_t *_Path); _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path); @@ -60,7 +86,14 @@ extern "C" { #define diskfree_t _diskfree_t +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("getcwd") +#undef getcwd +#endif char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("getcwd") +#endif int __cdecl chdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl rmdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005; diff --git a/lib/libc/include/any-windows-any/directmanipulation.h b/lib/libc/include/any-windows-any/directmanipulation.h index abd834c0288f..7b9c1209c883 100644 --- a/lib/libc/include/any-windows-any/directmanipulation.h +++ b/lib/libc/include/any-windows-any/directmanipulation.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/directmanipulation.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/directmanipulation.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dispex.h b/lib/libc/include/any-windows-any/dispex.h index 8918089eb3b2..f2b211118a50 100644 --- a/lib/libc/include/any-windows-any/dispex.h +++ b/lib/libc/include/any-windows-any/dispex.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dispex.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dispex.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dmodshow.h b/lib/libc/include/any-windows-any/dmodshow.h index c54697a00d31..2eaa84318b2b 100644 --- a/lib/libc/include/any-windows-any/dmodshow.h +++ b/lib/libc/include/any-windows-any/dmodshow.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dmodshow.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dmodshow.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/docobj.h b/lib/libc/include/any-windows-any/docobj.h index ea589d97b103..9661e5c90c9d 100644 --- a/lib/libc/include/any-windows-any/docobj.h +++ b/lib/libc/include/any-windows-any/docobj.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/docobj.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/docobj.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/docobjectservice.h b/lib/libc/include/any-windows-any/docobjectservice.h index 84fe56c2a3a8..0be1e704a457 100644 --- a/lib/libc/include/any-windows-any/docobjectservice.h +++ b/lib/libc/include/any-windows-any/docobjectservice.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/docobjectservice.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/docobjectservice.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/documenttarget.h b/lib/libc/include/any-windows-any/documenttarget.h index d483ac1316ab..a27ce1f622f7 100644 --- a/lib/libc/include/any-windows-any/documenttarget.h +++ b/lib/libc/include/any-windows-any/documenttarget.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/documenttarget.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/documenttarget.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/downloadmgr.h b/lib/libc/include/any-windows-any/downloadmgr.h index e23fd3e782cd..5caf66e43a2b 100644 --- a/lib/libc/include/any-windows-any/downloadmgr.h +++ b/lib/libc/include/any-windows-any/downloadmgr.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/downloadmgr.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/downloadmgr.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/drmexternals.h b/lib/libc/include/any-windows-any/drmexternals.h index a316a561d768..a23c6bcaf89a 100644 --- a/lib/libc/include/any-windows-any/drmexternals.h +++ b/lib/libc/include/any-windows-any/drmexternals.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/drmexternals.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/drmexternals.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dvdif.h b/lib/libc/include/any-windows-any/dvdif.h index c3f7186aaa21..25df808bc551 100644 --- a/lib/libc/include/any-windows-any/dvdif.h +++ b/lib/libc/include/any-windows-any/dvdif.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dvdif.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dvdif.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dwrite.h b/lib/libc/include/any-windows-any/dwrite.h index ee34b82e8b91..015ae77aa556 100644 --- a/lib/libc/include/any-windows-any/dwrite.h +++ b/lib/libc/include/any-windows-any/dwrite.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dwrite.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dwrite.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dwrite_1.h b/lib/libc/include/any-windows-any/dwrite_1.h index 7bac4430da12..671f3e047201 100644 --- a/lib/libc/include/any-windows-any/dwrite_1.h +++ b/lib/libc/include/any-windows-any/dwrite_1.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dwrite_1.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dwrite_1.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dwrite_2.h b/lib/libc/include/any-windows-any/dwrite_2.h index 26477eacc3d5..c31c4c001373 100644 --- a/lib/libc/include/any-windows-any/dwrite_2.h +++ b/lib/libc/include/any-windows-any/dwrite_2.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dwrite_2.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dwrite_2.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dwrite_3.h b/lib/libc/include/any-windows-any/dwrite_3.h index fc4edb78f782..9af6c0cd42ca 100644 --- a/lib/libc/include/any-windows-any/dwrite_3.h +++ b/lib/libc/include/any-windows-any/dwrite_3.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dwrite_3.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dwrite_3.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ @@ -378,6 +378,30 @@ interface IDWriteFactory7; #endif /* __cplusplus */ #endif +#ifndef __IDWriteFactory8_FWD_DEFINED__ +#define __IDWriteFactory8_FWD_DEFINED__ +typedef interface IDWriteFactory8 IDWriteFactory8; +#ifdef __cplusplus +interface IDWriteFactory8; +#endif /* __cplusplus */ +#endif + +#ifndef __IDWriteBitmapRenderTarget2_FWD_DEFINED__ +#define __IDWriteBitmapRenderTarget2_FWD_DEFINED__ +typedef interface IDWriteBitmapRenderTarget2 IDWriteBitmapRenderTarget2; +#ifdef __cplusplus +interface IDWriteBitmapRenderTarget2; +#endif /* __cplusplus */ +#endif + +#ifndef __IDWriteBitmapRenderTarget3_FWD_DEFINED__ +#define __IDWriteBitmapRenderTarget3_FWD_DEFINED__ +typedef interface IDWriteBitmapRenderTarget3 IDWriteBitmapRenderTarget3; +#ifdef __cplusplus +interface IDWriteBitmapRenderTarget3; +#endif /* __cplusplus */ +#endif + /* Headers for imported files */ #include @@ -571,11 +595,14 @@ typedef enum DWRITE_PAINT_TYPE { DWRITE_PAINT_TYPE_TRANSFORM = 9, DWRITE_PAINT_TYPE_COMPOSITE = 10 } DWRITE_PAINT_TYPE; +#ifndef DWRITE_PAINT_FEATURE_LEVEL_DEFINED +#define DWRITE_PAINT_FEATURE_LEVEL_DEFINED typedef enum DWRITE_PAINT_FEATURE_LEVEL { DWRITE_PAINT_FEATURE_LEVEL_NONE = 0, DWRITE_PAINT_FEATURE_LEVEL_COLR_V0 = 1, DWRITE_PAINT_FEATURE_LEVEL_COLR_V1 = 2 } DWRITE_PAINT_FEATURE_LEVEL; +#endif /* DWRITE_PAINT_FEATURE_LEVEL_DEFINED */ typedef enum DWRITE_PAINT_ATTRIBUTES { DWRITE_PAINT_ATTRIBUTES_NONE = 0, DWRITE_PAINT_ATTRIBUTES_USES_PALETTE = 0x1, @@ -14125,6 +14152,1031 @@ static inline HRESULT IDWriteFactory7_GetSystemFontCollection(IDWriteFactory7* T #endif /* __IDWriteFactory7_INTERFACE_DEFINED__ */ +/***************************************************************************** + * IDWriteFactory8 interface + */ +#ifndef __IDWriteFactory8_INTERFACE_DEFINED__ +#define __IDWriteFactory8_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IDWriteFactory8, 0xee0a7fb5, 0xdef4, 0x4c23, 0xa4,0x54, 0xc9,0xc7,0xdc,0x87,0x83,0x98); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("ee0a7fb5-def4-4c23-a454-c9c7dc878398") +IDWriteFactory8 : public IDWriteFactory7 +{ + virtual HRESULT STDMETHODCALLTYPE TranslateColorGlyphRun( + D2D1_POINT_2F origin, + const DWRITE_GLYPH_RUN *glyph_run, + const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc, + DWRITE_GLYPH_IMAGE_FORMATS image_formats, + DWRITE_PAINT_FEATURE_LEVEL feature_level, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_MATRIX *world_and_dpi_transform, + UINT32 palette_index, + IDWriteColorGlyphRunEnumerator1 **enumerator) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDWriteFactory8, 0xee0a7fb5, 0xdef4, 0x4c23, 0xa4,0x54, 0xc9,0xc7,0xdc,0x87,0x83,0x98) +#endif +#else +typedef struct IDWriteFactory8Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IDWriteFactory8 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IDWriteFactory8 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IDWriteFactory8 *This); + + /*** IDWriteFactory methods ***/ + HRESULT (STDMETHODCALLTYPE *GetSystemFontCollection)( + IDWriteFactory8 *This, + IDWriteFontCollection **collection, + WINBOOL check_for_updates); + + HRESULT (STDMETHODCALLTYPE *CreateCustomFontCollection)( + IDWriteFactory8 *This, + IDWriteFontCollectionLoader *loader, + const void *key, + UINT32 key_size, + IDWriteFontCollection **collection); + + HRESULT (STDMETHODCALLTYPE *RegisterFontCollectionLoader)( + IDWriteFactory8 *This, + IDWriteFontCollectionLoader *loader); + + HRESULT (STDMETHODCALLTYPE *UnregisterFontCollectionLoader)( + IDWriteFactory8 *This, + IDWriteFontCollectionLoader *loader); + + HRESULT (STDMETHODCALLTYPE *CreateFontFileReference)( + IDWriteFactory8 *This, + const WCHAR *path, + const FILETIME *writetime, + IDWriteFontFile **font_file); + + HRESULT (STDMETHODCALLTYPE *CreateCustomFontFileReference)( + IDWriteFactory8 *This, + const void *reference_key, + UINT32 key_size, + IDWriteFontFileLoader *loader, + IDWriteFontFile **font_file); + + HRESULT (STDMETHODCALLTYPE *CreateFontFace)( + IDWriteFactory8 *This, + DWRITE_FONT_FACE_TYPE facetype, + UINT32 files_number, + IDWriteFontFile *const *font_files, + UINT32 index, + DWRITE_FONT_SIMULATIONS sim_flags, + IDWriteFontFace **font_face); + + HRESULT (STDMETHODCALLTYPE *CreateRenderingParams)( + IDWriteFactory8 *This, + IDWriteRenderingParams **params); + + HRESULT (STDMETHODCALLTYPE *CreateMonitorRenderingParams)( + IDWriteFactory8 *This, + HMONITOR monitor, + IDWriteRenderingParams **params); + + HRESULT (STDMETHODCALLTYPE *CreateCustomRenderingParams)( + IDWriteFactory8 *This, + FLOAT gamma, + FLOAT enhancedContrast, + FLOAT cleartype_level, + DWRITE_PIXEL_GEOMETRY geometry, + DWRITE_RENDERING_MODE mode, + IDWriteRenderingParams **params); + + HRESULT (STDMETHODCALLTYPE *RegisterFontFileLoader)( + IDWriteFactory8 *This, + IDWriteFontFileLoader *loader); + + HRESULT (STDMETHODCALLTYPE *UnregisterFontFileLoader)( + IDWriteFactory8 *This, + IDWriteFontFileLoader *loader); + + HRESULT (STDMETHODCALLTYPE *CreateTextFormat)( + IDWriteFactory8 *This, + const WCHAR *family_name, + IDWriteFontCollection *collection, + DWRITE_FONT_WEIGHT weight, + DWRITE_FONT_STYLE style, + DWRITE_FONT_STRETCH stretch, + FLOAT size, + const WCHAR *locale, + IDWriteTextFormat **format); + + HRESULT (STDMETHODCALLTYPE *CreateTypography)( + IDWriteFactory8 *This, + IDWriteTypography **typography); + + HRESULT (STDMETHODCALLTYPE *GetGdiInterop)( + IDWriteFactory8 *This, + IDWriteGdiInterop **gdi_interop); + + HRESULT (STDMETHODCALLTYPE *CreateTextLayout)( + IDWriteFactory8 *This, + const WCHAR *string, + UINT32 len, + IDWriteTextFormat *format, + FLOAT max_width, + FLOAT max_height, + IDWriteTextLayout **layout); + + HRESULT (STDMETHODCALLTYPE *CreateGdiCompatibleTextLayout)( + IDWriteFactory8 *This, + const WCHAR *string, + UINT32 len, + IDWriteTextFormat *format, + FLOAT layout_width, + FLOAT layout_height, + FLOAT pixels_per_dip, + const DWRITE_MATRIX *transform, + WINBOOL use_gdi_natural, + IDWriteTextLayout **layout); + + HRESULT (STDMETHODCALLTYPE *CreateEllipsisTrimmingSign)( + IDWriteFactory8 *This, + IDWriteTextFormat *format, + IDWriteInlineObject **trimming_sign); + + HRESULT (STDMETHODCALLTYPE *CreateTextAnalyzer)( + IDWriteFactory8 *This, + IDWriteTextAnalyzer **analyzer); + + HRESULT (STDMETHODCALLTYPE *CreateNumberSubstitution)( + IDWriteFactory8 *This, + DWRITE_NUMBER_SUBSTITUTION_METHOD method, + const WCHAR *locale, + WINBOOL ignore_user_override, + IDWriteNumberSubstitution **substitution); + + HRESULT (STDMETHODCALLTYPE *CreateGlyphRunAnalysis)( + IDWriteFactory8 *This, + const DWRITE_GLYPH_RUN *glyph_run, + FLOAT pixels_per_dip, + const DWRITE_MATRIX *transform, + DWRITE_RENDERING_MODE rendering_mode, + DWRITE_MEASURING_MODE measuring_mode, + FLOAT baseline_x, + FLOAT baseline_y, + IDWriteGlyphRunAnalysis **analysis); + + /*** IDWriteFactory1 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetEudcFontCollection)( + IDWriteFactory8 *This, + IDWriteFontCollection **collection, + WINBOOL check_for_updates); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory1_CreateCustomRenderingParams)( + IDWriteFactory8 *This, + FLOAT gamma, + FLOAT enhcontrast, + FLOAT enhcontrast_grayscale, + FLOAT cleartype_level, + DWRITE_PIXEL_GEOMETRY geometry, + DWRITE_RENDERING_MODE mode, + IDWriteRenderingParams1 **params); + + /*** IDWriteFactory2 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetSystemFontFallback)( + IDWriteFactory8 *This, + IDWriteFontFallback **fallback); + + HRESULT (STDMETHODCALLTYPE *CreateFontFallbackBuilder)( + IDWriteFactory8 *This, + IDWriteFontFallbackBuilder **fallbackbuilder); + + HRESULT (STDMETHODCALLTYPE *TranslateColorGlyphRun)( + IDWriteFactory8 *This, + FLOAT originX, + FLOAT originY, + const DWRITE_GLYPH_RUN *run, + const DWRITE_GLYPH_RUN_DESCRIPTION *rundescr, + DWRITE_MEASURING_MODE mode, + const DWRITE_MATRIX *transform, + UINT32 palette_index, + IDWriteColorGlyphRunEnumerator **colorlayers); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory2_CreateCustomRenderingParams)( + IDWriteFactory8 *This, + FLOAT gamma, + FLOAT contrast, + FLOAT grayscalecontrast, + FLOAT cleartypeLevel, + DWRITE_PIXEL_GEOMETRY pixelGeometry, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_GRID_FIT_MODE gridFitMode, + IDWriteRenderingParams2 **params); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory2_CreateGlyphRunAnalysis)( + IDWriteFactory8 *This, + const DWRITE_GLYPH_RUN *run, + const DWRITE_MATRIX *transform, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_MEASURING_MODE measuringMode, + DWRITE_GRID_FIT_MODE gridFitMode, + DWRITE_TEXT_ANTIALIAS_MODE antialiasMode, + FLOAT originX, + FLOAT originY, + IDWriteGlyphRunAnalysis **analysis); + + /*** IDWriteFactory3 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory3_CreateGlyphRunAnalysis)( + IDWriteFactory8 *This, + const DWRITE_GLYPH_RUN *run, + const DWRITE_MATRIX *transform, + DWRITE_RENDERING_MODE1 rendering_mode, + DWRITE_MEASURING_MODE measuring_mode, + DWRITE_GRID_FIT_MODE gridfit_mode, + DWRITE_TEXT_ANTIALIAS_MODE antialias_mode, + FLOAT origin_x, + FLOAT origin_y, + IDWriteGlyphRunAnalysis **analysis); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory3_CreateCustomRenderingParams)( + IDWriteFactory8 *This, + FLOAT gamma, + FLOAT enhanced_contrast, + FLOAT grayscale_enhanced_contrast, + FLOAT cleartype_level, + DWRITE_PIXEL_GEOMETRY pixel_geometry, + DWRITE_RENDERING_MODE1 rendering_mode, + DWRITE_GRID_FIT_MODE gridfit_mode, + IDWriteRenderingParams3 **params); + + HRESULT (STDMETHODCALLTYPE *CreateFontFaceReference_)( + IDWriteFactory8 *This, + IDWriteFontFile *file, + UINT32 index, + DWRITE_FONT_SIMULATIONS simulations, + IDWriteFontFaceReference **reference); + + HRESULT (STDMETHODCALLTYPE *CreateFontFaceReference)( + IDWriteFactory8 *This, + const WCHAR *path, + const FILETIME *writetime, + UINT32 index, + DWRITE_FONT_SIMULATIONS simulations, + IDWriteFontFaceReference **reference); + + HRESULT (STDMETHODCALLTYPE *GetSystemFontSet)( + IDWriteFactory8 *This, + IDWriteFontSet **fontset); + + HRESULT (STDMETHODCALLTYPE *CreateFontSetBuilder)( + IDWriteFactory8 *This, + IDWriteFontSetBuilder **builder); + + HRESULT (STDMETHODCALLTYPE *CreateFontCollectionFromFontSet)( + IDWriteFactory8 *This, + IDWriteFontSet *fontset, + IDWriteFontCollection1 **collection); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory3_GetSystemFontCollection)( + IDWriteFactory8 *This, + WINBOOL include_downloadable, + IDWriteFontCollection1 **collection, + WINBOOL check_for_updates); + + HRESULT (STDMETHODCALLTYPE *GetFontDownloadQueue)( + IDWriteFactory8 *This, + IDWriteFontDownloadQueue **queue); + + /*** IDWriteFactory4 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory4_TranslateColorGlyphRun)( + IDWriteFactory8 *This, + D2D1_POINT_2F baseline_origin, + const DWRITE_GLYPH_RUN *run, + const DWRITE_GLYPH_RUN_DESCRIPTION *run_desc, + DWRITE_GLYPH_IMAGE_FORMATS desired_formats, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_MATRIX *transform, + UINT32 palette, + IDWriteColorGlyphRunEnumerator1 **layers); + + HRESULT (STDMETHODCALLTYPE *ComputeGlyphOrigins_)( + IDWriteFactory8 *This, + const DWRITE_GLYPH_RUN *run, + D2D1_POINT_2F baseline_origin, + D2D1_POINT_2F *origins); + + HRESULT (STDMETHODCALLTYPE *ComputeGlyphOrigins)( + IDWriteFactory8 *This, + const DWRITE_GLYPH_RUN *run, + DWRITE_MEASURING_MODE measuring_mode, + D2D1_POINT_2F baseline_origin, + const DWRITE_MATRIX *transform, + D2D1_POINT_2F *origins); + + /*** IDWriteFactory5 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory5_CreateFontSetBuilder)( + IDWriteFactory8 *This, + IDWriteFontSetBuilder1 **fontset_builder); + + HRESULT (STDMETHODCALLTYPE *CreateInMemoryFontFileLoader)( + IDWriteFactory8 *This, + IDWriteInMemoryFontFileLoader **loader); + + HRESULT (STDMETHODCALLTYPE *CreateHttpFontFileLoader)( + IDWriteFactory8 *This, + const WCHAR *referrer_url, + const WCHAR *extra_headers, + IDWriteRemoteFontFileLoader **loader); + + DWRITE_CONTAINER_TYPE (STDMETHODCALLTYPE *AnalyzeContainerType)( + IDWriteFactory8 *This, + const void *data, + UINT32 data_size); + + HRESULT (STDMETHODCALLTYPE *UnpackFontFile)( + IDWriteFactory8 *This, + DWRITE_CONTAINER_TYPE container_type, + const void *data, + UINT32 data_size, + IDWriteFontFileStream **stream); + + /*** IDWriteFactory6 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_CreateFontFaceReference)( + IDWriteFactory8 *This, + IDWriteFontFile *file, + UINT32 face_index, + DWRITE_FONT_SIMULATIONS simulations, + const DWRITE_FONT_AXIS_VALUE *axis_values, + UINT32 num_axis, + IDWriteFontFaceReference1 **face_ref); + + HRESULT (STDMETHODCALLTYPE *CreateFontResource)( + IDWriteFactory8 *This, + IDWriteFontFile *file, + UINT32 face_index, + IDWriteFontResource **resource); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_GetSystemFontSet)( + IDWriteFactory8 *This, + WINBOOL include_downloadable, + IDWriteFontSet1 **fontset); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_GetSystemFontCollection)( + IDWriteFactory8 *This, + WINBOOL include_downloadable, + DWRITE_FONT_FAMILY_MODEL family_model, + IDWriteFontCollection2 **collection); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_CreateFontCollectionFromFontSet)( + IDWriteFactory8 *This, + IDWriteFontSet *fontset, + DWRITE_FONT_FAMILY_MODEL family_model, + IDWriteFontCollection2 **collection); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_CreateFontSetBuilder)( + IDWriteFactory8 *This, + IDWriteFontSetBuilder2 **builder); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory6_CreateTextFormat)( + IDWriteFactory8 *This, + const WCHAR *familyname, + IDWriteFontCollection *collection, + const DWRITE_FONT_AXIS_VALUE *axis_values, + UINT32 num_axis, + FLOAT fontsize, + const WCHAR *localename, + IDWriteTextFormat3 **format); + + /*** IDWriteFactory7 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory7_GetSystemFontSet)( + IDWriteFactory8 *This, + WINBOOL include_downloadable, + IDWriteFontSet2 **fontset); + + HRESULT (STDMETHODCALLTYPE *IDWriteFactory7_GetSystemFontCollection)( + IDWriteFactory8 *This, + WINBOOL include_downloadable, + DWRITE_FONT_FAMILY_MODEL family_model, + IDWriteFontCollection3 **collection); + + /*** IDWriteFactory8 methods ***/ + HRESULT (STDMETHODCALLTYPE *IDWriteFactory8_TranslateColorGlyphRun)( + IDWriteFactory8 *This, + D2D1_POINT_2F origin, + const DWRITE_GLYPH_RUN *glyph_run, + const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc, + DWRITE_GLYPH_IMAGE_FORMATS image_formats, + DWRITE_PAINT_FEATURE_LEVEL feature_level, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_MATRIX *world_and_dpi_transform, + UINT32 palette_index, + IDWriteColorGlyphRunEnumerator1 **enumerator); + + END_INTERFACE +} IDWriteFactory8Vtbl; + +interface IDWriteFactory8 { + CONST_VTBL IDWriteFactory8Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IDWriteFactory8_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IDWriteFactory8_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IDWriteFactory8_Release(This) (This)->lpVtbl->Release(This) +/*** IDWriteFactory methods ***/ +#define IDWriteFactory8_CreateCustomFontCollection(This,loader,key,key_size,collection) (This)->lpVtbl->CreateCustomFontCollection(This,loader,key,key_size,collection) +#define IDWriteFactory8_RegisterFontCollectionLoader(This,loader) (This)->lpVtbl->RegisterFontCollectionLoader(This,loader) +#define IDWriteFactory8_UnregisterFontCollectionLoader(This,loader) (This)->lpVtbl->UnregisterFontCollectionLoader(This,loader) +#define IDWriteFactory8_CreateFontFileReference(This,path,writetime,font_file) (This)->lpVtbl->CreateFontFileReference(This,path,writetime,font_file) +#define IDWriteFactory8_CreateCustomFontFileReference(This,reference_key,key_size,loader,font_file) (This)->lpVtbl->CreateCustomFontFileReference(This,reference_key,key_size,loader,font_file) +#define IDWriteFactory8_CreateFontFace(This,facetype,files_number,font_files,index,sim_flags,font_face) (This)->lpVtbl->CreateFontFace(This,facetype,files_number,font_files,index,sim_flags,font_face) +#define IDWriteFactory8_CreateRenderingParams(This,params) (This)->lpVtbl->CreateRenderingParams(This,params) +#define IDWriteFactory8_CreateMonitorRenderingParams(This,monitor,params) (This)->lpVtbl->CreateMonitorRenderingParams(This,monitor,params) +#define IDWriteFactory8_RegisterFontFileLoader(This,loader) (This)->lpVtbl->RegisterFontFileLoader(This,loader) +#define IDWriteFactory8_UnregisterFontFileLoader(This,loader) (This)->lpVtbl->UnregisterFontFileLoader(This,loader) +#define IDWriteFactory8_CreateTypography(This,typography) (This)->lpVtbl->CreateTypography(This,typography) +#define IDWriteFactory8_GetGdiInterop(This,gdi_interop) (This)->lpVtbl->GetGdiInterop(This,gdi_interop) +#define IDWriteFactory8_CreateTextLayout(This,string,len,format,max_width,max_height,layout) (This)->lpVtbl->CreateTextLayout(This,string,len,format,max_width,max_height,layout) +#define IDWriteFactory8_CreateGdiCompatibleTextLayout(This,string,len,format,layout_width,layout_height,pixels_per_dip,transform,use_gdi_natural,layout) (This)->lpVtbl->CreateGdiCompatibleTextLayout(This,string,len,format,layout_width,layout_height,pixels_per_dip,transform,use_gdi_natural,layout) +#define IDWriteFactory8_CreateEllipsisTrimmingSign(This,format,trimming_sign) (This)->lpVtbl->CreateEllipsisTrimmingSign(This,format,trimming_sign) +#define IDWriteFactory8_CreateTextAnalyzer(This,analyzer) (This)->lpVtbl->CreateTextAnalyzer(This,analyzer) +#define IDWriteFactory8_CreateNumberSubstitution(This,method,locale,ignore_user_override,substitution) (This)->lpVtbl->CreateNumberSubstitution(This,method,locale,ignore_user_override,substitution) +/*** IDWriteFactory1 methods ***/ +#define IDWriteFactory8_GetEudcFontCollection(This,collection,check_for_updates) (This)->lpVtbl->GetEudcFontCollection(This,collection,check_for_updates) +/*** IDWriteFactory2 methods ***/ +#define IDWriteFactory8_GetSystemFontFallback(This,fallback) (This)->lpVtbl->GetSystemFontFallback(This,fallback) +#define IDWriteFactory8_CreateFontFallbackBuilder(This,fallbackbuilder) (This)->lpVtbl->CreateFontFallbackBuilder(This,fallbackbuilder) +/*** IDWriteFactory3 methods ***/ +#define IDWriteFactory8_CreateGlyphRunAnalysis(This,run,transform,rendering_mode,measuring_mode,gridfit_mode,antialias_mode,origin_x,origin_y,analysis) (This)->lpVtbl->IDWriteFactory3_CreateGlyphRunAnalysis(This,run,transform,rendering_mode,measuring_mode,gridfit_mode,antialias_mode,origin_x,origin_y,analysis) +#define IDWriteFactory8_CreateCustomRenderingParams(This,gamma,enhanced_contrast,grayscale_enhanced_contrast,cleartype_level,pixel_geometry,rendering_mode,gridfit_mode,params) (This)->lpVtbl->IDWriteFactory3_CreateCustomRenderingParams(This,gamma,enhanced_contrast,grayscale_enhanced_contrast,cleartype_level,pixel_geometry,rendering_mode,gridfit_mode,params) +#define IDWriteFactory8_CreateFontFaceReference_(This,file,index,simulations,reference) (This)->lpVtbl->CreateFontFaceReference_(This,file,index,simulations,reference) +#define IDWriteFactory8_GetFontDownloadQueue(This,queue) (This)->lpVtbl->GetFontDownloadQueue(This,queue) +/*** IDWriteFactory4 methods ***/ +#define IDWriteFactory8_ComputeGlyphOrigins_(This,run,baseline_origin,origins) (This)->lpVtbl->ComputeGlyphOrigins_(This,run,baseline_origin,origins) +#define IDWriteFactory8_ComputeGlyphOrigins(This,run,measuring_mode,baseline_origin,transform,origins) (This)->lpVtbl->ComputeGlyphOrigins(This,run,measuring_mode,baseline_origin,transform,origins) +/*** IDWriteFactory5 methods ***/ +#define IDWriteFactory8_CreateInMemoryFontFileLoader(This,loader) (This)->lpVtbl->CreateInMemoryFontFileLoader(This,loader) +#define IDWriteFactory8_CreateHttpFontFileLoader(This,referrer_url,extra_headers,loader) (This)->lpVtbl->CreateHttpFontFileLoader(This,referrer_url,extra_headers,loader) +#define IDWriteFactory8_AnalyzeContainerType(This,data,data_size) (This)->lpVtbl->AnalyzeContainerType(This,data,data_size) +#define IDWriteFactory8_UnpackFontFile(This,container_type,data,data_size,stream) (This)->lpVtbl->UnpackFontFile(This,container_type,data,data_size,stream) +/*** IDWriteFactory6 methods ***/ +#define IDWriteFactory8_CreateFontFaceReference(This,file,face_index,simulations,axis_values,num_axis,face_ref) (This)->lpVtbl->IDWriteFactory6_CreateFontFaceReference(This,file,face_index,simulations,axis_values,num_axis,face_ref) +#define IDWriteFactory8_CreateFontResource(This,file,face_index,resource) (This)->lpVtbl->CreateFontResource(This,file,face_index,resource) +#define IDWriteFactory8_CreateFontCollectionFromFontSet(This,fontset,family_model,collection) (This)->lpVtbl->IDWriteFactory6_CreateFontCollectionFromFontSet(This,fontset,family_model,collection) +#define IDWriteFactory8_CreateFontSetBuilder(This,builder) (This)->lpVtbl->IDWriteFactory6_CreateFontSetBuilder(This,builder) +#define IDWriteFactory8_CreateTextFormat(This,familyname,collection,axis_values,num_axis,fontsize,localename,format) (This)->lpVtbl->IDWriteFactory6_CreateTextFormat(This,familyname,collection,axis_values,num_axis,fontsize,localename,format) +/*** IDWriteFactory7 methods ***/ +#define IDWriteFactory8_GetSystemFontSet(This,include_downloadable,fontset) (This)->lpVtbl->IDWriteFactory7_GetSystemFontSet(This,include_downloadable,fontset) +#define IDWriteFactory8_GetSystemFontCollection(This,include_downloadable,family_model,collection) (This)->lpVtbl->IDWriteFactory7_GetSystemFontCollection(This,include_downloadable,family_model,collection) +/*** IDWriteFactory8 methods ***/ +#define IDWriteFactory8_TranslateColorGlyphRun(This,origin,glyph_run,glyph_run_desc,image_formats,feature_level,measuring_mode,world_and_dpi_transform,palette_index,enumerator) (This)->lpVtbl->IDWriteFactory8_TranslateColorGlyphRun(This,origin,glyph_run,glyph_run_desc,image_formats,feature_level,measuring_mode,world_and_dpi_transform,palette_index,enumerator) +#else +/*** IUnknown methods ***/ +static inline HRESULT IDWriteFactory8_QueryInterface(IDWriteFactory8* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IDWriteFactory8_AddRef(IDWriteFactory8* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IDWriteFactory8_Release(IDWriteFactory8* This) { + return This->lpVtbl->Release(This); +} +/*** IDWriteFactory methods ***/ +static inline HRESULT IDWriteFactory8_CreateCustomFontCollection(IDWriteFactory8* This,IDWriteFontCollectionLoader *loader,const void *key,UINT32 key_size,IDWriteFontCollection **collection) { + return This->lpVtbl->CreateCustomFontCollection(This,loader,key,key_size,collection); +} +static inline HRESULT IDWriteFactory8_RegisterFontCollectionLoader(IDWriteFactory8* This,IDWriteFontCollectionLoader *loader) { + return This->lpVtbl->RegisterFontCollectionLoader(This,loader); +} +static inline HRESULT IDWriteFactory8_UnregisterFontCollectionLoader(IDWriteFactory8* This,IDWriteFontCollectionLoader *loader) { + return This->lpVtbl->UnregisterFontCollectionLoader(This,loader); +} +static inline HRESULT IDWriteFactory8_CreateFontFileReference(IDWriteFactory8* This,const WCHAR *path,const FILETIME *writetime,IDWriteFontFile **font_file) { + return This->lpVtbl->CreateFontFileReference(This,path,writetime,font_file); +} +static inline HRESULT IDWriteFactory8_CreateCustomFontFileReference(IDWriteFactory8* This,const void *reference_key,UINT32 key_size,IDWriteFontFileLoader *loader,IDWriteFontFile **font_file) { + return This->lpVtbl->CreateCustomFontFileReference(This,reference_key,key_size,loader,font_file); +} +static inline HRESULT IDWriteFactory8_CreateFontFace(IDWriteFactory8* This,DWRITE_FONT_FACE_TYPE facetype,UINT32 files_number,IDWriteFontFile *const *font_files,UINT32 index,DWRITE_FONT_SIMULATIONS sim_flags,IDWriteFontFace **font_face) { + return This->lpVtbl->CreateFontFace(This,facetype,files_number,font_files,index,sim_flags,font_face); +} +static inline HRESULT IDWriteFactory8_CreateRenderingParams(IDWriteFactory8* This,IDWriteRenderingParams **params) { + return This->lpVtbl->CreateRenderingParams(This,params); +} +static inline HRESULT IDWriteFactory8_CreateMonitorRenderingParams(IDWriteFactory8* This,HMONITOR monitor,IDWriteRenderingParams **params) { + return This->lpVtbl->CreateMonitorRenderingParams(This,monitor,params); +} +static inline HRESULT IDWriteFactory8_RegisterFontFileLoader(IDWriteFactory8* This,IDWriteFontFileLoader *loader) { + return This->lpVtbl->RegisterFontFileLoader(This,loader); +} +static inline HRESULT IDWriteFactory8_UnregisterFontFileLoader(IDWriteFactory8* This,IDWriteFontFileLoader *loader) { + return This->lpVtbl->UnregisterFontFileLoader(This,loader); +} +static inline HRESULT IDWriteFactory8_CreateTypography(IDWriteFactory8* This,IDWriteTypography **typography) { + return This->lpVtbl->CreateTypography(This,typography); +} +static inline HRESULT IDWriteFactory8_GetGdiInterop(IDWriteFactory8* This,IDWriteGdiInterop **gdi_interop) { + return This->lpVtbl->GetGdiInterop(This,gdi_interop); +} +static inline HRESULT IDWriteFactory8_CreateTextLayout(IDWriteFactory8* This,const WCHAR *string,UINT32 len,IDWriteTextFormat *format,FLOAT max_width,FLOAT max_height,IDWriteTextLayout **layout) { + return This->lpVtbl->CreateTextLayout(This,string,len,format,max_width,max_height,layout); +} +static inline HRESULT IDWriteFactory8_CreateGdiCompatibleTextLayout(IDWriteFactory8* This,const WCHAR *string,UINT32 len,IDWriteTextFormat *format,FLOAT layout_width,FLOAT layout_height,FLOAT pixels_per_dip,const DWRITE_MATRIX *transform,WINBOOL use_gdi_natural,IDWriteTextLayout **layout) { + return This->lpVtbl->CreateGdiCompatibleTextLayout(This,string,len,format,layout_width,layout_height,pixels_per_dip,transform,use_gdi_natural,layout); +} +static inline HRESULT IDWriteFactory8_CreateEllipsisTrimmingSign(IDWriteFactory8* This,IDWriteTextFormat *format,IDWriteInlineObject **trimming_sign) { + return This->lpVtbl->CreateEllipsisTrimmingSign(This,format,trimming_sign); +} +static inline HRESULT IDWriteFactory8_CreateTextAnalyzer(IDWriteFactory8* This,IDWriteTextAnalyzer **analyzer) { + return This->lpVtbl->CreateTextAnalyzer(This,analyzer); +} +static inline HRESULT IDWriteFactory8_CreateNumberSubstitution(IDWriteFactory8* This,DWRITE_NUMBER_SUBSTITUTION_METHOD method,const WCHAR *locale,WINBOOL ignore_user_override,IDWriteNumberSubstitution **substitution) { + return This->lpVtbl->CreateNumberSubstitution(This,method,locale,ignore_user_override,substitution); +} +/*** IDWriteFactory1 methods ***/ +static inline HRESULT IDWriteFactory8_GetEudcFontCollection(IDWriteFactory8* This,IDWriteFontCollection **collection,WINBOOL check_for_updates) { + return This->lpVtbl->GetEudcFontCollection(This,collection,check_for_updates); +} +/*** IDWriteFactory2 methods ***/ +static inline HRESULT IDWriteFactory8_GetSystemFontFallback(IDWriteFactory8* This,IDWriteFontFallback **fallback) { + return This->lpVtbl->GetSystemFontFallback(This,fallback); +} +static inline HRESULT IDWriteFactory8_CreateFontFallbackBuilder(IDWriteFactory8* This,IDWriteFontFallbackBuilder **fallbackbuilder) { + return This->lpVtbl->CreateFontFallbackBuilder(This,fallbackbuilder); +} +/*** IDWriteFactory3 methods ***/ +static inline HRESULT IDWriteFactory8_CreateGlyphRunAnalysis(IDWriteFactory8* This,const DWRITE_GLYPH_RUN *run,const DWRITE_MATRIX *transform,DWRITE_RENDERING_MODE1 rendering_mode,DWRITE_MEASURING_MODE measuring_mode,DWRITE_GRID_FIT_MODE gridfit_mode,DWRITE_TEXT_ANTIALIAS_MODE antialias_mode,FLOAT origin_x,FLOAT origin_y,IDWriteGlyphRunAnalysis **analysis) { + return This->lpVtbl->IDWriteFactory3_CreateGlyphRunAnalysis(This,run,transform,rendering_mode,measuring_mode,gridfit_mode,antialias_mode,origin_x,origin_y,analysis); +} +static inline HRESULT IDWriteFactory8_CreateCustomRenderingParams(IDWriteFactory8* This,FLOAT gamma,FLOAT enhanced_contrast,FLOAT grayscale_enhanced_contrast,FLOAT cleartype_level,DWRITE_PIXEL_GEOMETRY pixel_geometry,DWRITE_RENDERING_MODE1 rendering_mode,DWRITE_GRID_FIT_MODE gridfit_mode,IDWriteRenderingParams3 **params) { + return This->lpVtbl->IDWriteFactory3_CreateCustomRenderingParams(This,gamma,enhanced_contrast,grayscale_enhanced_contrast,cleartype_level,pixel_geometry,rendering_mode,gridfit_mode,params); +} +static inline HRESULT IDWriteFactory8_CreateFontFaceReference_(IDWriteFactory8* This,IDWriteFontFile *file,UINT32 index,DWRITE_FONT_SIMULATIONS simulations,IDWriteFontFaceReference **reference) { + return This->lpVtbl->CreateFontFaceReference_(This,file,index,simulations,reference); +} +static inline HRESULT IDWriteFactory8_GetFontDownloadQueue(IDWriteFactory8* This,IDWriteFontDownloadQueue **queue) { + return This->lpVtbl->GetFontDownloadQueue(This,queue); +} +/*** IDWriteFactory4 methods ***/ +static inline HRESULT IDWriteFactory8_ComputeGlyphOrigins_(IDWriteFactory8* This,const DWRITE_GLYPH_RUN *run,D2D1_POINT_2F baseline_origin,D2D1_POINT_2F *origins) { + return This->lpVtbl->ComputeGlyphOrigins_(This,run,baseline_origin,origins); +} +static inline HRESULT IDWriteFactory8_ComputeGlyphOrigins(IDWriteFactory8* This,const DWRITE_GLYPH_RUN *run,DWRITE_MEASURING_MODE measuring_mode,D2D1_POINT_2F baseline_origin,const DWRITE_MATRIX *transform,D2D1_POINT_2F *origins) { + return This->lpVtbl->ComputeGlyphOrigins(This,run,measuring_mode,baseline_origin,transform,origins); +} +/*** IDWriteFactory5 methods ***/ +static inline HRESULT IDWriteFactory8_CreateInMemoryFontFileLoader(IDWriteFactory8* This,IDWriteInMemoryFontFileLoader **loader) { + return This->lpVtbl->CreateInMemoryFontFileLoader(This,loader); +} +static inline HRESULT IDWriteFactory8_CreateHttpFontFileLoader(IDWriteFactory8* This,const WCHAR *referrer_url,const WCHAR *extra_headers,IDWriteRemoteFontFileLoader **loader) { + return This->lpVtbl->CreateHttpFontFileLoader(This,referrer_url,extra_headers,loader); +} +static inline DWRITE_CONTAINER_TYPE IDWriteFactory8_AnalyzeContainerType(IDWriteFactory8* This,const void *data,UINT32 data_size) { + return This->lpVtbl->AnalyzeContainerType(This,data,data_size); +} +static inline HRESULT IDWriteFactory8_UnpackFontFile(IDWriteFactory8* This,DWRITE_CONTAINER_TYPE container_type,const void *data,UINT32 data_size,IDWriteFontFileStream **stream) { + return This->lpVtbl->UnpackFontFile(This,container_type,data,data_size,stream); +} +/*** IDWriteFactory6 methods ***/ +static inline HRESULT IDWriteFactory8_CreateFontFaceReference(IDWriteFactory8* This,IDWriteFontFile *file,UINT32 face_index,DWRITE_FONT_SIMULATIONS simulations,const DWRITE_FONT_AXIS_VALUE *axis_values,UINT32 num_axis,IDWriteFontFaceReference1 **face_ref) { + return This->lpVtbl->IDWriteFactory6_CreateFontFaceReference(This,file,face_index,simulations,axis_values,num_axis,face_ref); +} +static inline HRESULT IDWriteFactory8_CreateFontResource(IDWriteFactory8* This,IDWriteFontFile *file,UINT32 face_index,IDWriteFontResource **resource) { + return This->lpVtbl->CreateFontResource(This,file,face_index,resource); +} +static inline HRESULT IDWriteFactory8_CreateFontCollectionFromFontSet(IDWriteFactory8* This,IDWriteFontSet *fontset,DWRITE_FONT_FAMILY_MODEL family_model,IDWriteFontCollection2 **collection) { + return This->lpVtbl->IDWriteFactory6_CreateFontCollectionFromFontSet(This,fontset,family_model,collection); +} +static inline HRESULT IDWriteFactory8_CreateFontSetBuilder(IDWriteFactory8* This,IDWriteFontSetBuilder2 **builder) { + return This->lpVtbl->IDWriteFactory6_CreateFontSetBuilder(This,builder); +} +static inline HRESULT IDWriteFactory8_CreateTextFormat(IDWriteFactory8* This,const WCHAR *familyname,IDWriteFontCollection *collection,const DWRITE_FONT_AXIS_VALUE *axis_values,UINT32 num_axis,FLOAT fontsize,const WCHAR *localename,IDWriteTextFormat3 **format) { + return This->lpVtbl->IDWriteFactory6_CreateTextFormat(This,familyname,collection,axis_values,num_axis,fontsize,localename,format); +} +/*** IDWriteFactory7 methods ***/ +static inline HRESULT IDWriteFactory8_GetSystemFontSet(IDWriteFactory8* This,WINBOOL include_downloadable,IDWriteFontSet2 **fontset) { + return This->lpVtbl->IDWriteFactory7_GetSystemFontSet(This,include_downloadable,fontset); +} +static inline HRESULT IDWriteFactory8_GetSystemFontCollection(IDWriteFactory8* This,WINBOOL include_downloadable,DWRITE_FONT_FAMILY_MODEL family_model,IDWriteFontCollection3 **collection) { + return This->lpVtbl->IDWriteFactory7_GetSystemFontCollection(This,include_downloadable,family_model,collection); +} +/*** IDWriteFactory8 methods ***/ +static inline HRESULT IDWriteFactory8_TranslateColorGlyphRun(IDWriteFactory8* This,D2D1_POINT_2F origin,const DWRITE_GLYPH_RUN *glyph_run,const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,DWRITE_GLYPH_IMAGE_FORMATS image_formats,DWRITE_PAINT_FEATURE_LEVEL feature_level,DWRITE_MEASURING_MODE measuring_mode,const DWRITE_MATRIX *world_and_dpi_transform,UINT32 palette_index,IDWriteColorGlyphRunEnumerator1 **enumerator) { + return This->lpVtbl->IDWriteFactory8_TranslateColorGlyphRun(This,origin,glyph_run,glyph_run_desc,image_formats,feature_level,measuring_mode,world_and_dpi_transform,palette_index,enumerator); +} +#endif +#endif + +#endif + + +#endif /* __IDWriteFactory8_INTERFACE_DEFINED__ */ + +typedef struct DWRITE_BITMAP_DATA_BGRA32 { + UINT32 width; + UINT32 height; + UINT32 *pixels; +} DWRITE_BITMAP_DATA_BGRA32; +/***************************************************************************** + * IDWriteBitmapRenderTarget2 interface + */ +#ifndef __IDWriteBitmapRenderTarget2_INTERFACE_DEFINED__ +#define __IDWriteBitmapRenderTarget2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IDWriteBitmapRenderTarget2, 0xc553a742, 0xfc01, 0x44da, 0xa6,0x6e, 0xb8,0xb9,0xed,0x6c,0x39,0x95); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("c553a742-fc01-44da-a66e-b8b9ed6c3995") +IDWriteBitmapRenderTarget2 : public IDWriteBitmapRenderTarget1 +{ + virtual HRESULT STDMETHODCALLTYPE GetBitmapData( + DWRITE_BITMAP_DATA_BGRA32 *bitmap_data) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDWriteBitmapRenderTarget2, 0xc553a742, 0xfc01, 0x44da, 0xa6,0x6e, 0xb8,0xb9,0xed,0x6c,0x39,0x95) +#endif +#else +typedef struct IDWriteBitmapRenderTarget2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IDWriteBitmapRenderTarget2 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IDWriteBitmapRenderTarget2 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IDWriteBitmapRenderTarget2 *This); + + /*** IDWriteBitmapRenderTarget methods ***/ + HRESULT (STDMETHODCALLTYPE *DrawGlyphRun)( + IDWriteBitmapRenderTarget2 *This, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *glyph_run, + IDWriteRenderingParams *params, + COLORREF textColor, + RECT *blackbox_rect); + + HDC (STDMETHODCALLTYPE *GetMemoryDC)( + IDWriteBitmapRenderTarget2 *This); + + FLOAT (STDMETHODCALLTYPE *GetPixelsPerDip)( + IDWriteBitmapRenderTarget2 *This); + + HRESULT (STDMETHODCALLTYPE *SetPixelsPerDip)( + IDWriteBitmapRenderTarget2 *This, + FLOAT pixels_per_dip); + + HRESULT (STDMETHODCALLTYPE *GetCurrentTransform)( + IDWriteBitmapRenderTarget2 *This, + DWRITE_MATRIX *transform); + + HRESULT (STDMETHODCALLTYPE *SetCurrentTransform)( + IDWriteBitmapRenderTarget2 *This, + const DWRITE_MATRIX *transform); + + HRESULT (STDMETHODCALLTYPE *GetSize)( + IDWriteBitmapRenderTarget2 *This, + SIZE *size); + + HRESULT (STDMETHODCALLTYPE *Resize)( + IDWriteBitmapRenderTarget2 *This, + UINT32 width, + UINT32 height); + + /*** IDWriteBitmapRenderTarget1 methods ***/ + DWRITE_TEXT_ANTIALIAS_MODE (STDMETHODCALLTYPE *GetTextAntialiasMode)( + IDWriteBitmapRenderTarget2 *This); + + HRESULT (STDMETHODCALLTYPE *SetTextAntialiasMode)( + IDWriteBitmapRenderTarget2 *This, + DWRITE_TEXT_ANTIALIAS_MODE mode); + + /*** IDWriteBitmapRenderTarget2 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetBitmapData)( + IDWriteBitmapRenderTarget2 *This, + DWRITE_BITMAP_DATA_BGRA32 *bitmap_data); + + END_INTERFACE +} IDWriteBitmapRenderTarget2Vtbl; + +interface IDWriteBitmapRenderTarget2 { + CONST_VTBL IDWriteBitmapRenderTarget2Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IDWriteBitmapRenderTarget2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IDWriteBitmapRenderTarget2_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IDWriteBitmapRenderTarget2_Release(This) (This)->lpVtbl->Release(This) +/*** IDWriteBitmapRenderTarget methods ***/ +#define IDWriteBitmapRenderTarget2_DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect) (This)->lpVtbl->DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect) +#define IDWriteBitmapRenderTarget2_GetMemoryDC(This) (This)->lpVtbl->GetMemoryDC(This) +#define IDWriteBitmapRenderTarget2_GetPixelsPerDip(This) (This)->lpVtbl->GetPixelsPerDip(This) +#define IDWriteBitmapRenderTarget2_SetPixelsPerDip(This,pixels_per_dip) (This)->lpVtbl->SetPixelsPerDip(This,pixels_per_dip) +#define IDWriteBitmapRenderTarget2_GetCurrentTransform(This,transform) (This)->lpVtbl->GetCurrentTransform(This,transform) +#define IDWriteBitmapRenderTarget2_SetCurrentTransform(This,transform) (This)->lpVtbl->SetCurrentTransform(This,transform) +#define IDWriteBitmapRenderTarget2_GetSize(This,size) (This)->lpVtbl->GetSize(This,size) +#define IDWriteBitmapRenderTarget2_Resize(This,width,height) (This)->lpVtbl->Resize(This,width,height) +/*** IDWriteBitmapRenderTarget1 methods ***/ +#define IDWriteBitmapRenderTarget2_GetTextAntialiasMode(This) (This)->lpVtbl->GetTextAntialiasMode(This) +#define IDWriteBitmapRenderTarget2_SetTextAntialiasMode(This,mode) (This)->lpVtbl->SetTextAntialiasMode(This,mode) +/*** IDWriteBitmapRenderTarget2 methods ***/ +#define IDWriteBitmapRenderTarget2_GetBitmapData(This,bitmap_data) (This)->lpVtbl->GetBitmapData(This,bitmap_data) +#else +/*** IUnknown methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget2_QueryInterface(IDWriteBitmapRenderTarget2* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IDWriteBitmapRenderTarget2_AddRef(IDWriteBitmapRenderTarget2* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IDWriteBitmapRenderTarget2_Release(IDWriteBitmapRenderTarget2* This) { + return This->lpVtbl->Release(This); +} +/*** IDWriteBitmapRenderTarget methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget2_DrawGlyphRun(IDWriteBitmapRenderTarget2* This,FLOAT baselineOriginX,FLOAT baselineOriginY,DWRITE_MEASURING_MODE measuring_mode,const DWRITE_GLYPH_RUN *glyph_run,IDWriteRenderingParams *params,COLORREF textColor,RECT *blackbox_rect) { + return This->lpVtbl->DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect); +} +static inline HDC IDWriteBitmapRenderTarget2_GetMemoryDC(IDWriteBitmapRenderTarget2* This) { + return This->lpVtbl->GetMemoryDC(This); +} +static inline FLOAT IDWriteBitmapRenderTarget2_GetPixelsPerDip(IDWriteBitmapRenderTarget2* This) { + return This->lpVtbl->GetPixelsPerDip(This); +} +static inline HRESULT IDWriteBitmapRenderTarget2_SetPixelsPerDip(IDWriteBitmapRenderTarget2* This,FLOAT pixels_per_dip) { + return This->lpVtbl->SetPixelsPerDip(This,pixels_per_dip); +} +static inline HRESULT IDWriteBitmapRenderTarget2_GetCurrentTransform(IDWriteBitmapRenderTarget2* This,DWRITE_MATRIX *transform) { + return This->lpVtbl->GetCurrentTransform(This,transform); +} +static inline HRESULT IDWriteBitmapRenderTarget2_SetCurrentTransform(IDWriteBitmapRenderTarget2* This,const DWRITE_MATRIX *transform) { + return This->lpVtbl->SetCurrentTransform(This,transform); +} +static inline HRESULT IDWriteBitmapRenderTarget2_GetSize(IDWriteBitmapRenderTarget2* This,SIZE *size) { + return This->lpVtbl->GetSize(This,size); +} +static inline HRESULT IDWriteBitmapRenderTarget2_Resize(IDWriteBitmapRenderTarget2* This,UINT32 width,UINT32 height) { + return This->lpVtbl->Resize(This,width,height); +} +/*** IDWriteBitmapRenderTarget1 methods ***/ +static inline DWRITE_TEXT_ANTIALIAS_MODE IDWriteBitmapRenderTarget2_GetTextAntialiasMode(IDWriteBitmapRenderTarget2* This) { + return This->lpVtbl->GetTextAntialiasMode(This); +} +static inline HRESULT IDWriteBitmapRenderTarget2_SetTextAntialiasMode(IDWriteBitmapRenderTarget2* This,DWRITE_TEXT_ANTIALIAS_MODE mode) { + return This->lpVtbl->SetTextAntialiasMode(This,mode); +} +/*** IDWriteBitmapRenderTarget2 methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget2_GetBitmapData(IDWriteBitmapRenderTarget2* This,DWRITE_BITMAP_DATA_BGRA32 *bitmap_data) { + return This->lpVtbl->GetBitmapData(This,bitmap_data); +} +#endif +#endif + +#endif + + +#endif /* __IDWriteBitmapRenderTarget2_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IDWriteBitmapRenderTarget3 interface + */ +#ifndef __IDWriteBitmapRenderTarget3_INTERFACE_DEFINED__ +#define __IDWriteBitmapRenderTarget3_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IDWriteBitmapRenderTarget3, 0xaeec37db, 0xc337, 0x40f1, 0x8e,0x2a, 0x9a,0x41,0xb1,0x67,0xb2,0x38); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("aeec37db-c337-40f1-8e2a-9a41b167b238") +IDWriteBitmapRenderTarget3 : public IDWriteBitmapRenderTarget2 +{ + virtual DWRITE_PAINT_FEATURE_LEVEL STDMETHODCALLTYPE GetPaintFeatureLevel( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE DrawPaintGlyphRun( + FLOAT origin_x, + FLOAT origin_y, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *run, + DWRITE_GLYPH_IMAGE_FORMATS image_format, + COLORREF text_color, + UINT32 palette_index, + RECT *black_box) = 0; + + virtual HRESULT STDMETHODCALLTYPE DrawGlyphRunWithColorSupport( + FLOAT origin_x, + FLOAT origin_y, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *run, + IDWriteRenderingParams *params, + COLORREF text_color, + UINT32 palette_index, + RECT *black_box) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDWriteBitmapRenderTarget3, 0xaeec37db, 0xc337, 0x40f1, 0x8e,0x2a, 0x9a,0x41,0xb1,0x67,0xb2,0x38) +#endif +#else +typedef struct IDWriteBitmapRenderTarget3Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IDWriteBitmapRenderTarget3 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IDWriteBitmapRenderTarget3 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IDWriteBitmapRenderTarget3 *This); + + /*** IDWriteBitmapRenderTarget methods ***/ + HRESULT (STDMETHODCALLTYPE *DrawGlyphRun)( + IDWriteBitmapRenderTarget3 *This, + FLOAT baselineOriginX, + FLOAT baselineOriginY, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *glyph_run, + IDWriteRenderingParams *params, + COLORREF textColor, + RECT *blackbox_rect); + + HDC (STDMETHODCALLTYPE *GetMemoryDC)( + IDWriteBitmapRenderTarget3 *This); + + FLOAT (STDMETHODCALLTYPE *GetPixelsPerDip)( + IDWriteBitmapRenderTarget3 *This); + + HRESULT (STDMETHODCALLTYPE *SetPixelsPerDip)( + IDWriteBitmapRenderTarget3 *This, + FLOAT pixels_per_dip); + + HRESULT (STDMETHODCALLTYPE *GetCurrentTransform)( + IDWriteBitmapRenderTarget3 *This, + DWRITE_MATRIX *transform); + + HRESULT (STDMETHODCALLTYPE *SetCurrentTransform)( + IDWriteBitmapRenderTarget3 *This, + const DWRITE_MATRIX *transform); + + HRESULT (STDMETHODCALLTYPE *GetSize)( + IDWriteBitmapRenderTarget3 *This, + SIZE *size); + + HRESULT (STDMETHODCALLTYPE *Resize)( + IDWriteBitmapRenderTarget3 *This, + UINT32 width, + UINT32 height); + + /*** IDWriteBitmapRenderTarget1 methods ***/ + DWRITE_TEXT_ANTIALIAS_MODE (STDMETHODCALLTYPE *GetTextAntialiasMode)( + IDWriteBitmapRenderTarget3 *This); + + HRESULT (STDMETHODCALLTYPE *SetTextAntialiasMode)( + IDWriteBitmapRenderTarget3 *This, + DWRITE_TEXT_ANTIALIAS_MODE mode); + + /*** IDWriteBitmapRenderTarget2 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetBitmapData)( + IDWriteBitmapRenderTarget3 *This, + DWRITE_BITMAP_DATA_BGRA32 *bitmap_data); + + /*** IDWriteBitmapRenderTarget3 methods ***/ + DWRITE_PAINT_FEATURE_LEVEL (STDMETHODCALLTYPE *GetPaintFeatureLevel)( + IDWriteBitmapRenderTarget3 *This); + + HRESULT (STDMETHODCALLTYPE *DrawPaintGlyphRun)( + IDWriteBitmapRenderTarget3 *This, + FLOAT origin_x, + FLOAT origin_y, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *run, + DWRITE_GLYPH_IMAGE_FORMATS image_format, + COLORREF text_color, + UINT32 palette_index, + RECT *black_box); + + HRESULT (STDMETHODCALLTYPE *DrawGlyphRunWithColorSupport)( + IDWriteBitmapRenderTarget3 *This, + FLOAT origin_x, + FLOAT origin_y, + DWRITE_MEASURING_MODE measuring_mode, + const DWRITE_GLYPH_RUN *run, + IDWriteRenderingParams *params, + COLORREF text_color, + UINT32 palette_index, + RECT *black_box); + + END_INTERFACE +} IDWriteBitmapRenderTarget3Vtbl; + +interface IDWriteBitmapRenderTarget3 { + CONST_VTBL IDWriteBitmapRenderTarget3Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IDWriteBitmapRenderTarget3_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IDWriteBitmapRenderTarget3_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IDWriteBitmapRenderTarget3_Release(This) (This)->lpVtbl->Release(This) +/*** IDWriteBitmapRenderTarget methods ***/ +#define IDWriteBitmapRenderTarget3_DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect) (This)->lpVtbl->DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect) +#define IDWriteBitmapRenderTarget3_GetMemoryDC(This) (This)->lpVtbl->GetMemoryDC(This) +#define IDWriteBitmapRenderTarget3_GetPixelsPerDip(This) (This)->lpVtbl->GetPixelsPerDip(This) +#define IDWriteBitmapRenderTarget3_SetPixelsPerDip(This,pixels_per_dip) (This)->lpVtbl->SetPixelsPerDip(This,pixels_per_dip) +#define IDWriteBitmapRenderTarget3_GetCurrentTransform(This,transform) (This)->lpVtbl->GetCurrentTransform(This,transform) +#define IDWriteBitmapRenderTarget3_SetCurrentTransform(This,transform) (This)->lpVtbl->SetCurrentTransform(This,transform) +#define IDWriteBitmapRenderTarget3_GetSize(This,size) (This)->lpVtbl->GetSize(This,size) +#define IDWriteBitmapRenderTarget3_Resize(This,width,height) (This)->lpVtbl->Resize(This,width,height) +/*** IDWriteBitmapRenderTarget1 methods ***/ +#define IDWriteBitmapRenderTarget3_GetTextAntialiasMode(This) (This)->lpVtbl->GetTextAntialiasMode(This) +#define IDWriteBitmapRenderTarget3_SetTextAntialiasMode(This,mode) (This)->lpVtbl->SetTextAntialiasMode(This,mode) +/*** IDWriteBitmapRenderTarget2 methods ***/ +#define IDWriteBitmapRenderTarget3_GetBitmapData(This,bitmap_data) (This)->lpVtbl->GetBitmapData(This,bitmap_data) +/*** IDWriteBitmapRenderTarget3 methods ***/ +#define IDWriteBitmapRenderTarget3_GetPaintFeatureLevel(This) (This)->lpVtbl->GetPaintFeatureLevel(This) +#define IDWriteBitmapRenderTarget3_DrawPaintGlyphRun(This,origin_x,origin_y,measuring_mode,run,image_format,text_color,palette_index,black_box) (This)->lpVtbl->DrawPaintGlyphRun(This,origin_x,origin_y,measuring_mode,run,image_format,text_color,palette_index,black_box) +#define IDWriteBitmapRenderTarget3_DrawGlyphRunWithColorSupport(This,origin_x,origin_y,measuring_mode,run,params,text_color,palette_index,black_box) (This)->lpVtbl->DrawGlyphRunWithColorSupport(This,origin_x,origin_y,measuring_mode,run,params,text_color,palette_index,black_box) +#else +/*** IUnknown methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget3_QueryInterface(IDWriteBitmapRenderTarget3* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IDWriteBitmapRenderTarget3_AddRef(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IDWriteBitmapRenderTarget3_Release(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->Release(This); +} +/*** IDWriteBitmapRenderTarget methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget3_DrawGlyphRun(IDWriteBitmapRenderTarget3* This,FLOAT baselineOriginX,FLOAT baselineOriginY,DWRITE_MEASURING_MODE measuring_mode,const DWRITE_GLYPH_RUN *glyph_run,IDWriteRenderingParams *params,COLORREF textColor,RECT *blackbox_rect) { + return This->lpVtbl->DrawGlyphRun(This,baselineOriginX,baselineOriginY,measuring_mode,glyph_run,params,textColor,blackbox_rect); +} +static inline HDC IDWriteBitmapRenderTarget3_GetMemoryDC(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->GetMemoryDC(This); +} +static inline FLOAT IDWriteBitmapRenderTarget3_GetPixelsPerDip(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->GetPixelsPerDip(This); +} +static inline HRESULT IDWriteBitmapRenderTarget3_SetPixelsPerDip(IDWriteBitmapRenderTarget3* This,FLOAT pixels_per_dip) { + return This->lpVtbl->SetPixelsPerDip(This,pixels_per_dip); +} +static inline HRESULT IDWriteBitmapRenderTarget3_GetCurrentTransform(IDWriteBitmapRenderTarget3* This,DWRITE_MATRIX *transform) { + return This->lpVtbl->GetCurrentTransform(This,transform); +} +static inline HRESULT IDWriteBitmapRenderTarget3_SetCurrentTransform(IDWriteBitmapRenderTarget3* This,const DWRITE_MATRIX *transform) { + return This->lpVtbl->SetCurrentTransform(This,transform); +} +static inline HRESULT IDWriteBitmapRenderTarget3_GetSize(IDWriteBitmapRenderTarget3* This,SIZE *size) { + return This->lpVtbl->GetSize(This,size); +} +static inline HRESULT IDWriteBitmapRenderTarget3_Resize(IDWriteBitmapRenderTarget3* This,UINT32 width,UINT32 height) { + return This->lpVtbl->Resize(This,width,height); +} +/*** IDWriteBitmapRenderTarget1 methods ***/ +static inline DWRITE_TEXT_ANTIALIAS_MODE IDWriteBitmapRenderTarget3_GetTextAntialiasMode(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->GetTextAntialiasMode(This); +} +static inline HRESULT IDWriteBitmapRenderTarget3_SetTextAntialiasMode(IDWriteBitmapRenderTarget3* This,DWRITE_TEXT_ANTIALIAS_MODE mode) { + return This->lpVtbl->SetTextAntialiasMode(This,mode); +} +/*** IDWriteBitmapRenderTarget2 methods ***/ +static inline HRESULT IDWriteBitmapRenderTarget3_GetBitmapData(IDWriteBitmapRenderTarget3* This,DWRITE_BITMAP_DATA_BGRA32 *bitmap_data) { + return This->lpVtbl->GetBitmapData(This,bitmap_data); +} +/*** IDWriteBitmapRenderTarget3 methods ***/ +static inline DWRITE_PAINT_FEATURE_LEVEL IDWriteBitmapRenderTarget3_GetPaintFeatureLevel(IDWriteBitmapRenderTarget3* This) { + return This->lpVtbl->GetPaintFeatureLevel(This); +} +static inline HRESULT IDWriteBitmapRenderTarget3_DrawPaintGlyphRun(IDWriteBitmapRenderTarget3* This,FLOAT origin_x,FLOAT origin_y,DWRITE_MEASURING_MODE measuring_mode,const DWRITE_GLYPH_RUN *run,DWRITE_GLYPH_IMAGE_FORMATS image_format,COLORREF text_color,UINT32 palette_index,RECT *black_box) { + return This->lpVtbl->DrawPaintGlyphRun(This,origin_x,origin_y,measuring_mode,run,image_format,text_color,palette_index,black_box); +} +static inline HRESULT IDWriteBitmapRenderTarget3_DrawGlyphRunWithColorSupport(IDWriteBitmapRenderTarget3* This,FLOAT origin_x,FLOAT origin_y,DWRITE_MEASURING_MODE measuring_mode,const DWRITE_GLYPH_RUN *run,IDWriteRenderingParams *params,COLORREF text_color,UINT32 palette_index,RECT *black_box) { + return This->lpVtbl->DrawGlyphRunWithColorSupport(This,origin_x,origin_y,measuring_mode,run,params,text_color,palette_index,black_box); +} +#endif +#endif + +#endif + + +#endif /* __IDWriteBitmapRenderTarget3_INTERFACE_DEFINED__ */ + /* Begin additional prototypes for all interfaces */ diff --git a/lib/libc/include/any-windows-any/dxgi.h b/lib/libc/include/any-windows-any/dxgi.h index 67fd8489935d..c66af3d4e1aa 100644 --- a/lib/libc/include/any-windows-any/dxgi.h +++ b/lib/libc/include/any-windows-any/dxgi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgi1_2.h b/lib/libc/include/any-windows-any/dxgi1_2.h index feac638e200e..5afc57589b5e 100644 --- a/lib/libc/include/any-windows-any/dxgi1_2.h +++ b/lib/libc/include/any-windows-any/dxgi1_2.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi1_2.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi1_2.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgi1_3.h b/lib/libc/include/any-windows-any/dxgi1_3.h index 2e7d013e8b72..0c2b22090a91 100644 --- a/lib/libc/include/any-windows-any/dxgi1_3.h +++ b/lib/libc/include/any-windows-any/dxgi1_3.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi1_3.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi1_3.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgi1_4.h b/lib/libc/include/any-windows-any/dxgi1_4.h index 73fe6df60fd6..0de0f1442de0 100644 --- a/lib/libc/include/any-windows-any/dxgi1_4.h +++ b/lib/libc/include/any-windows-any/dxgi1_4.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi1_4.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi1_4.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgi1_5.h b/lib/libc/include/any-windows-any/dxgi1_5.h index b9f95ceaa39f..db444fb0894e 100644 --- a/lib/libc/include/any-windows-any/dxgi1_5.h +++ b/lib/libc/include/any-windows-any/dxgi1_5.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi1_5.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi1_5.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgi1_6.h b/lib/libc/include/any-windows-any/dxgi1_6.h index 55fd0d51c814..fc201877704b 100644 --- a/lib/libc/include/any-windows-any/dxgi1_6.h +++ b/lib/libc/include/any-windows-any/dxgi1_6.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgi1_6.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgi1_6.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgicommon.h b/lib/libc/include/any-windows-any/dxgicommon.h index d99c09a39222..20831332985f 100644 --- a/lib/libc/include/any-windows-any/dxgicommon.h +++ b/lib/libc/include/any-windows-any/dxgicommon.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgicommon.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgicommon.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgidebug.h b/lib/libc/include/any-windows-any/dxgidebug.h index 8205844b15ab..2f1d6f68d529 100644 --- a/lib/libc/include/any-windows-any/dxgidebug.h +++ b/lib/libc/include/any-windows-any/dxgidebug.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgidebug.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgidebug.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgiformat.h b/lib/libc/include/any-windows-any/dxgiformat.h index 5dfde2f61a52..cf594ec43508 100644 --- a/lib/libc/include/any-windows-any/dxgiformat.h +++ b/lib/libc/include/any-windows-any/dxgiformat.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgiformat.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgiformat.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxgitype.h b/lib/libc/include/any-windows-any/dxgitype.h index 38aee1ada9d6..2a2539c6d641 100644 --- a/lib/libc/include/any-windows-any/dxgitype.h +++ b/lib/libc/include/any-windows-any/dxgitype.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxgitype.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxgitype.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxva2api.h b/lib/libc/include/any-windows-any/dxva2api.h index 1729b161159b..1a02f2b9a5bd 100644 --- a/lib/libc/include/any-windows-any/dxva2api.h +++ b/lib/libc/include/any-windows-any/dxva2api.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxva2api.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxva2api.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/dxvahd.h b/lib/libc/include/any-windows-any/dxvahd.h index 98588110a647..65c37d34f3e4 100644 --- a/lib/libc/include/any-windows-any/dxvahd.h +++ b/lib/libc/include/any-windows-any/dxvahd.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/dxvahd.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/dxvahd.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ @@ -415,7 +415,7 @@ typedef struct _DXVAHDSW_CALLBACKS { PDXVAHDSW_DestroyVideoProcessor DestroyVideoProcessor; } DXVAHDSW_CALLBACKS; -HRESULT DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice); +HRESULT WINAPI DXVAHD_CreateDevice(IDirect3DDevice9Ex *pD3DDevice,const DXVAHD_CONTENT_DESC *pContentDesc,DXVAHD_DEVICE_USAGE Usage,PDXVAHDSW_Plugin pPlugin,IDXVAHD_Device **ppDevice); /***************************************************************************** * IDXVAHD_Device interface diff --git a/lib/libc/include/any-windows-any/endpointvolume.h b/lib/libc/include/any-windows-any/endpointvolume.h index 18dd9ffda268..ed7fa33c36f6 100644 --- a/lib/libc/include/any-windows-any/endpointvolume.h +++ b/lib/libc/include/any-windows-any/endpointvolume.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/endpointvolume.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/endpointvolume.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/evr.h b/lib/libc/include/any-windows-any/evr.h index 4d5cf6956fd7..8f6a06a7288f 100644 --- a/lib/libc/include/any-windows-any/evr.h +++ b/lib/libc/include/any-windows-any/evr.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/evr.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/evr.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/evr9.h b/lib/libc/include/any-windows-any/evr9.h index 64bb9893ff59..69cb96508f53 100644 --- a/lib/libc/include/any-windows-any/evr9.h +++ b/lib/libc/include/any-windows-any/evr9.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/evr9.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/evr9.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/exdisp.h b/lib/libc/include/any-windows-any/exdisp.h index 2cc304b874bd..542122ae383c 100644 --- a/lib/libc/include/any-windows-any/exdisp.h +++ b/lib/libc/include/any-windows-any/exdisp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/exdisp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/exdisp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fibersapi.h b/lib/libc/include/any-windows-any/fibersapi.h index 888028f454f6..e0a188924d60 100644 --- a/lib/libc/include/any-windows-any/fibersapi.h +++ b/lib/libc/include/any-windows-any/fibersapi.h @@ -25,6 +25,11 @@ extern "C" { WINBASEAPI WINBOOL WINAPI FlsFree (DWORD dwFlsIndex); WINBASEAPI WINBOOL WINAPI IsThreadAFiber (VOID); #endif + +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10) + WINBASEAPI PVOID WINAPI FlsGetValue2(DWORD dwTlsIndex); +#endif + #endif #ifdef __cplusplus diff --git a/lib/libc/include/any-windows-any/filter.h b/lib/libc/include/any-windows-any/filter.h index fad0799ee56f..8114500a0d4a 100644 --- a/lib/libc/include/any-windows-any/filter.h +++ b/lib/libc/include/any-windows-any/filter.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/filter.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/filter.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fsrm.h b/lib/libc/include/any-windows-any/fsrm.h index 69933596e45d..caeb7146a8b5 100644 --- a/lib/libc/include/any-windows-any/fsrm.h +++ b/lib/libc/include/any-windows-any/fsrm.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fsrm.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fsrm.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fsrmenums.h b/lib/libc/include/any-windows-any/fsrmenums.h index 14830bf69994..1697b1f00ae3 100644 --- a/lib/libc/include/any-windows-any/fsrmenums.h +++ b/lib/libc/include/any-windows-any/fsrmenums.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fsrmenums.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fsrmenums.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fsrmquota.h b/lib/libc/include/any-windows-any/fsrmquota.h index 58b5f681916f..52edfd50625a 100644 --- a/lib/libc/include/any-windows-any/fsrmquota.h +++ b/lib/libc/include/any-windows-any/fsrmquota.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fsrmquota.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fsrmquota.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fsrmreports.h b/lib/libc/include/any-windows-any/fsrmreports.h index ec10c69bfc30..1a2499e5af10 100644 --- a/lib/libc/include/any-windows-any/fsrmreports.h +++ b/lib/libc/include/any-windows-any/fsrmreports.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fsrmreports.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fsrmreports.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fsrmscreen.h b/lib/libc/include/any-windows-any/fsrmscreen.h index 16345f478f6d..817334b37cdb 100644 --- a/lib/libc/include/any-windows-any/fsrmscreen.h +++ b/lib/libc/include/any-windows-any/fsrmscreen.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fsrmscreen.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fsrmscreen.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fusion.h b/lib/libc/include/any-windows-any/fusion.h index 209484a5e50c..24e08a054708 100644 --- a/lib/libc/include/any-windows-any/fusion.h +++ b/lib/libc/include/any-windows-any/fusion.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fusion.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fusion.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/fwptypes.h b/lib/libc/include/any-windows-any/fwptypes.h index e2e2a4e76cbf..7c307f3ed95e 100644 --- a/lib/libc/include/any-windows-any/fwptypes.h +++ b/lib/libc/include/any-windows-any/fwptypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/fwptypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/fwptypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/hstring.h b/lib/libc/include/any-windows-any/hstring.h index c21969014f84..fe94226d0da5 100644 --- a/lib/libc/include/any-windows-any/hstring.h +++ b/lib/libc/include/any-windows-any/hstring.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/hstring.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/hstring.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/icftypes.h b/lib/libc/include/any-windows-any/icftypes.h index 6eabfc985d38..094c79228f2b 100644 --- a/lib/libc/include/any-windows-any/icftypes.h +++ b/lib/libc/include/any-windows-any/icftypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/icftypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/icftypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/icodecapi.h b/lib/libc/include/any-windows-any/icodecapi.h index 8d5878e4cc82..3ca910a71c4e 100644 --- a/lib/libc/include/any-windows-any/icodecapi.h +++ b/lib/libc/include/any-windows-any/icodecapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/icodecapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/icodecapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/iketypes.h b/lib/libc/include/any-windows-any/iketypes.h index d58abb95f886..eab925012188 100644 --- a/lib/libc/include/any-windows-any/iketypes.h +++ b/lib/libc/include/any-windows-any/iketypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/iketypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/iketypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/inputpaneinterop.h b/lib/libc/include/any-windows-any/inputpaneinterop.h index cf345cd7bd5e..f9b644fd9671 100644 --- a/lib/libc/include/any-windows-any/inputpaneinterop.h +++ b/lib/libc/include/any-windows-any/inputpaneinterop.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/inputpaneinterop.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/inputpaneinterop.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/inputscope.h b/lib/libc/include/any-windows-any/inputscope.h index 4cd0e69746d9..f8758ad360c6 100644 --- a/lib/libc/include/any-windows-any/inputscope.h +++ b/lib/libc/include/any-windows-any/inputscope.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/inputscope.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/inputscope.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/inspectable.h b/lib/libc/include/any-windows-any/inspectable.h index 0c61ab5bc48e..f86af4e928ec 100644 --- a/lib/libc/include/any-windows-any/inspectable.h +++ b/lib/libc/include/any-windows-any/inspectable.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/inspectable.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/inspectable.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/intrin.h b/lib/libc/include/any-windows-any/intrin.h index ebd604d88ead..041c20e542bf 100644 --- a/lib/libc/include/any-windows-any/intrin.h +++ b/lib/libc/include/any-windows-any/intrin.h @@ -55,7 +55,7 @@ #endif #if defined(__GNUC__) && \ - (defined(__i386__) || defined(__x86_64__)) + (defined(__i386__) || (defined(__x86_64__) && !defined(__arm64ec__))) #ifndef _MM_MALLOC_H_INCLUDED #include #include @@ -103,7 +103,7 @@ typedef union __m128i { char v[16]; } __m128i; #endif #endif -#if (defined(_X86_) || defined(__x86_64)) +#if (defined(_X86_) || (defined(__x86_64) && !defined(__arm64ec__))) #if defined(__MMX__) || defined(__MINGW_FORCE_SYS_INTRINS) #if defined(__cplusplus) @@ -177,7 +177,7 @@ extern "C" { #define __MACHINEIA32 __MACHINEZ #endif -#if !(defined(_X86_) || defined(__x86_64) || defined(__ia64__)) +#if !(defined(_X86_) || defined(__x86_64) || defined(__ia64__)) || defined(__arm64ec__) #undef __MACHINEIW64 #define __MACHINEIW64 __MACHINEZ #endif @@ -187,17 +187,17 @@ extern "C" { #define __MACHINEIA64 __MACHINEZ #endif -#if !(defined(__ia64__) || defined(__x86_64)) +#if !(defined(__ia64__) || defined(__x86_64)) || defined(__arm64ec__) #undef __MACHINEW64 #define __MACHINEW64 __MACHINEZ #endif -#if !(defined(_X86_) || defined(__x86_64)) +#if !(defined(_X86_) || defined(__x86_64)) || defined(__arm64ec__) #undef __MACHINEI #define __MACHINEI __MACHINEZ #endif -#if !(defined(_X86_) || defined(__x86_64)) +#if !(defined(_X86_) || defined(__x86_64)) || defined(__arm64ec__) #undef __MACHINEX86X #define __MACHINEX86X __MACHINEZ #endif @@ -207,7 +207,7 @@ extern "C" { #define __MACHINEX86X_NOX64 __MACHINEZ #endif -#if !(defined(_X86_) || defined(__x86_64)) || defined(__ia64__) +#if !(defined(_X86_) || defined(__x86_64)) || defined(__ia64__) || defined(__arm64ec__) #undef __MACHINEX86X_NOIA64 #define __MACHINEX86X_NOIA64 __MACHINEZ #endif @@ -228,17 +228,17 @@ extern "C" { #define __MACHINECC __MACHINEZ #endif -#if !(defined(__aarch64__)) +#if !(defined(__aarch64__) || defined(__arm64ec__)) #undef __MACHINEARM64 #define __MACHINEARM64 __MACHINEZ #endif -#if !(defined(__arm__) || defined(__aarch64__)) +#if !(defined(__arm__) || defined(__aarch64__) || defined(__arm64ec__)) #undef __MACHINEARM_ARM64 #define __MACHINEARM_ARM64 __MACHINEZ #endif -#if !(defined(__x86_64)) +#if !(defined(__x86_64)) || defined(__arm64ec__) #undef __MACHINEX64 #define __MACHINEX64 __MACHINEZ #endif diff --git a/lib/libc/include/any-windows-any/io.h b/lib/libc/include/any-windows-any/io.h index 4994191a967d..a6dc2f8a1bb2 100644 --- a/lib/libc/include/any-windows-any/io.h +++ b/lib/libc/include/any-windows-any/io.h @@ -24,7 +24,15 @@ extern "C" { #endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_getcwd") +#undef _getcwd +#endif _CRTIMP char* __cdecl _getcwd (char*, int); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_getcwd") +#endif + #ifndef _FSIZE_T_DEFINED typedef unsigned long _fsize_t; #define _FSIZE_T_DEFINED @@ -278,7 +286,14 @@ _CRTIMP char* __cdecl _getcwd (char*, int); #ifndef NO_OLDNAMES #ifndef _UWIN int __cdecl chdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("getcwd") +#undef getcwd +#endif char *__cdecl getcwd (char *, int) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("getcwd") +#endif int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005; char *__cdecl mktemp(char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl rmdir (const char*) __MINGW_ATTRIB_DEPRECATED_MSVC2005; diff --git a/lib/libc/include/any-windows-any/iwscapi.h b/lib/libc/include/any-windows-any/iwscapi.h index fce27fb25221..02afadb6474a 100644 --- a/lib/libc/include/any-windows-any/iwscapi.h +++ b/lib/libc/include/any-windows-any/iwscapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/iwscapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/iwscapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/locationapi.h b/lib/libc/include/any-windows-any/locationapi.h index 15483b71377c..c39752da778d 100644 --- a/lib/libc/include/any-windows-any/locationapi.h +++ b/lib/libc/include/any-windows-any/locationapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/locationapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/locationapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/malloc.h b/lib/libc/include/any-windows-any/malloc.h index b08f30423a20..9c498c2918bd 100644 --- a/lib/libc/include/any-windows-any/malloc.h +++ b/lib/libc/include/any-windows-any/malloc.h @@ -21,7 +21,13 @@ extern "C" { #endif #ifndef _STATIC_ASSERT -#if defined(_MSC_VER) +#if (defined(__cpp_static_assert) && __cpp_static_assert >= 201411L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) +#define _STATIC_ASSERT(expr) static_assert(expr) +#elif defined(__cpp_static_assert) +#define _STATIC_ASSERT(expr) static_assert(expr, #expr) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#define _STATIC_ASSERT(expr) _Static_assert(expr, #expr) +#elif defined(_MSC_VER) #define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] #else #define _STATIC_ASSERT(expr) extern void __static_assert_t(int [(expr)?1:-1]) @@ -55,6 +61,36 @@ extern "C" { #ifndef _CRT_ALLOCATION_DEFINED #define _CRT_ALLOCATION_DEFINED + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("calloc") +#undef calloc +#pragma push_macro("free") +#undef free +#pragma push_macro("malloc") +#undef malloc +#pragma push_macro("realloc") +#undef realloc +#pragma push_macro("_aligned_free") +#undef _aligned_free +#pragma push_macro("_aligned_malloc") +#undef _aligned_malloc +#pragma push_macro("_aligned_offset_malloc") +#undef _aligned_offset_malloc +#pragma push_macro("_aligned_realloc") +#undef _aligned_realloc +#pragma push_macro("_aligned_offset_realloc") +#undef _aligned_offset_realloc +#pragma push_macro("_recalloc") +#undef _recalloc +#pragma push_macro("_aligned_recalloc") +#undef _aligned_recalloc +#pragma push_macro("_aligned_offset_recalloc") +#undef _aligned_offset_recalloc +#pragma push_macro("_aligned_msize") +#undef _aligned_msize +#endif + void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); void __cdecl free(void *_Memory); void *__cdecl malloc(size_t _Size); @@ -72,6 +108,23 @@ extern "C" { _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); _CRTIMP size_t __cdecl _aligned_msize(void *_Memory,size_t _Alignment,size_t _Offset); # endif + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("calloc") +#pragma pop_macro("free") +#pragma pop_macro("malloc") +#pragma pop_macro("realloc") +#pragma pop_macro("_aligned_free") +#pragma pop_macro("_aligned_malloc") +#pragma pop_macro("_aligned_offset_malloc") +#pragma pop_macro("_aligned_realloc") +#pragma pop_macro("_aligned_offset_realloc") +#pragma pop_macro("_recalloc") +#pragma pop_macro("_aligned_recalloc") +#pragma pop_macro("_aligned_offset_recalloc") +#pragma pop_macro("_aligned_msize") +#endif + #endif /* Users should really use MS provided versions */ @@ -92,8 +145,19 @@ void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */ _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_expand") +#undef _expand +#pragma push_macro("_msize") +#undef _msize +#endif _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize); _CRTIMP size_t __cdecl _msize(void *_Memory); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_expand") +#pragma pop_macro("_msize") +#endif + #ifdef __GNUC__ #undef _alloca #define _alloca(x) __builtin_alloca((x)) @@ -132,11 +196,20 @@ void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); } #endif +#ifdef _DEBUG +#ifndef _CRTDBG_MAP_ALLOC +#undef _malloca +#define _malloca(size) \ + _MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE), _ALLOCA_S_HEAP_MARKER) +#endif +#else #undef _malloca #define _malloca(size) \ ((((size) + _ALLOCA_S_MARKER_SIZE) <= _ALLOCA_S_THRESHOLD) ? \ _MarkAllocaS(_alloca((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_STACK_MARKER) : \ _MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_HEAP_MARKER)) +#endif + #undef _FREEA_INLINE #define _FREEA_INLINE diff --git a/lib/libc/include/any-windows-any/mapi.h b/lib/libc/include/any-windows-any/mapi.h index a279609fac88..f7c1640edbe5 100644 --- a/lib/libc/include/any-windows-any/mapi.h +++ b/lib/libc/include/any-windows-any/mapi.h @@ -35,6 +35,15 @@ extern "C" { LPVOID lpFileType; } MapiFileDesc,*lpMapiFileDesc; + typedef struct { + ULONG ulReserved; + ULONG flFlags; + ULONG nPosition; + PWSTR lpszPathName; + PWSTR lpszFileName; + PVOID lpFileType; + } MapiFileDescW, *lpMapiFileDescW; + #define MAPI_OLE 0x00000001 #define MAPI_OLE_STATIC 0x00000002 @@ -55,6 +64,15 @@ extern "C" { LPVOID lpEntryID; } MapiRecipDesc,*lpMapiRecipDesc; + typedef struct { + ULONG ulReserved; + ULONG ulRecipClass; + PWSTR lpszName; + PWSTR lpszAddress; + ULONG ulEIDSize; + PVOID lpEntryID; + } MapiRecipDescW, *lpMapiRecipDescW; + #ifndef MAPI_ORIG #define MAPI_ORIG 0 #define MAPI_TO 1 @@ -77,6 +95,21 @@ extern "C" { lpMapiFileDesc lpFiles; } MapiMessage,*lpMapiMessage; + typedef struct { + ULONG ulReserved; + PWSTR lpszSubject; + PWSTR lpszNoteText; + PWSTR lpszMessageType; + PWSTR lpszDateReceived; + PWSTR lpszConversationID; + FLAGS flFlags; + lpMapiRecipDescW lpOriginator; + ULONG nRecipCount; + lpMapiRecipDescW lpRecips; + ULONG nFileCount; + lpMapiFileDescW lpFiles; + } MapiMessageW, *lpMapiMessageW; + #define MAPI_UNREAD 0x00000001 #define MAPI_RECEIPT_REQUESTED 0x00000002 #define MAPI_SENT 0x00000004 @@ -93,6 +126,9 @@ extern "C" { #define MAPI_DIALOG 0x00000008 #endif +#define MAPI_DIALOG_MODELESS (0x00000004 | MAPI_DIALOG) +#define MAPI_FORCE_UNICODE 0x00040000 + #define MAPI_UNREAD_ONLY 0x00000020 #define MAPI_GUARANTEE_FIFO 0x00000100 #define MAPI_LONG_MSGID 0x00004000 @@ -116,6 +152,10 @@ extern "C" { typedef MAPISENDMAIL *LPMAPISENDMAIL; MAPISENDMAIL MAPISendMail; + typedef ULONG (WINAPI MAPISENDMAILW)(LHANDLE lhSession,ULONG_PTR ulUIParam,lpMapiMessageW lpMessage,FLAGS flFlags,ULONG ulReserved); + typedef MAPISENDMAILW *LPMAPISENDMAILW; + MAPISENDMAILW MAPISendMailW; + typedef ULONG (WINAPI MAPISENDDOCUMENTS)(ULONG_PTR ulUIParam,LPSTR lpszDelimChar,LPSTR lpszFilePaths,LPSTR lpszFileNames,ULONG ulReserved); typedef MAPISENDDOCUMENTS *LPMAPISENDDOCUMENTS; MAPISENDDOCUMENTS MAPISendDocuments; @@ -183,6 +223,8 @@ extern "C" { #define MAPI_E_INVALID_EDITFIELDS 24 #define MAPI_E_INVALID_RECIPS 25 #define MAPI_E_NOT_SUPPORTED 26 +#define MAPI_E_UNICODE_NOT_SUPPORTED 27 +#define MAPI_E_ATTACHMENT_TOO_LARGE 28 #ifdef MAPIX_H STDMETHODIMP_(SCODE) ScMAPIXFromSMAPI(LHANDLE lhSimpleSession,ULONG ulFlags,LPCIID lpInterface,LPMAPISESSION*lppMAPISession); diff --git a/lib/libc/include/any-windows-any/mbstring.h b/lib/libc/include/any-windows-any/mbstring.h index b6e48a883992..e9e43a13a1e1 100644 --- a/lib/libc/include/any-windows-any/mbstring.h +++ b/lib/libc/include/any-windows-any/mbstring.h @@ -31,7 +31,14 @@ extern "C" { #ifndef _MBSTRING_DEFINED #define _MBSTRING_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_mbsdup") +#undef _mbsdup +#endif _CRTIMP unsigned char *__cdecl _mbsdup(const unsigned char *_Str); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_mbsdup") +#endif _CRTIMP unsigned int __cdecl _mbbtombc(unsigned int _Ch); _CRTIMP unsigned int __cdecl _mbbtombc_l(unsigned int _Ch,_locale_t _Locale); _CRTIMP int __cdecl _mbbtype(unsigned char _Ch,int _CType); diff --git a/lib/libc/include/any-windows-any/mediaobj.h b/lib/libc/include/any-windows-any/mediaobj.h index 818b942c9e9b..0b5380250227 100644 --- a/lib/libc/include/any-windows-any/mediaobj.h +++ b/lib/libc/include/any-windows-any/mediaobj.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mediaobj.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mediaobj.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/medparam.h b/lib/libc/include/any-windows-any/medparam.h index fa19b8f888ac..d214447dbdf5 100644 --- a/lib/libc/include/any-windows-any/medparam.h +++ b/lib/libc/include/any-windows-any/medparam.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/medparam.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/medparam.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfcaptureengine.h b/lib/libc/include/any-windows-any/mfcaptureengine.h index 5342bbb30d9f..eafa112fc7a5 100644 --- a/lib/libc/include/any-windows-any/mfcaptureengine.h +++ b/lib/libc/include/any-windows-any/mfcaptureengine.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfcaptureengine.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfcaptureengine.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfd3d12.h b/lib/libc/include/any-windows-any/mfd3d12.h index 8f8ee0155b64..8032d9e62daf 100644 --- a/lib/libc/include/any-windows-any/mfd3d12.h +++ b/lib/libc/include/any-windows-any/mfd3d12.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfd3d12.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfd3d12.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfidl.h b/lib/libc/include/any-windows-any/mfidl.h index c3a6012d3706..031276a396b9 100644 --- a/lib/libc/include/any-windows-any/mfidl.h +++ b/lib/libc/include/any-windows-any/mfidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfmediacapture.h b/lib/libc/include/any-windows-any/mfmediacapture.h index eefb3408b582..d22d73fff096 100644 --- a/lib/libc/include/any-windows-any/mfmediacapture.h +++ b/lib/libc/include/any-windows-any/mfmediacapture.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfmediacapture.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfmediacapture.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfmediaengine.h b/lib/libc/include/any-windows-any/mfmediaengine.h index bdb34a5e2e57..2b53c0d635f6 100644 --- a/lib/libc/include/any-windows-any/mfmediaengine.h +++ b/lib/libc/include/any-windows-any/mfmediaengine.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfmediaengine.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfmediaengine.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfobjects.h b/lib/libc/include/any-windows-any/mfobjects.h index 09ec8af73da9..50df22a456b3 100644 --- a/lib/libc/include/any-windows-any/mfobjects.h +++ b/lib/libc/include/any-windows-any/mfobjects.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfobjects.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfobjects.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfplay.h b/lib/libc/include/any-windows-any/mfplay.h index 53467d5e0b9d..e9748a7df72f 100644 --- a/lib/libc/include/any-windows-any/mfplay.h +++ b/lib/libc/include/any-windows-any/mfplay.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfplay.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfplay.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mfreadwrite.h b/lib/libc/include/any-windows-any/mfreadwrite.h index 4d935dc30d74..caebaadb5c4b 100644 --- a/lib/libc/include/any-windows-any/mfreadwrite.h +++ b/lib/libc/include/any-windows-any/mfreadwrite.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mfreadwrite.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mfreadwrite.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mftransform.h b/lib/libc/include/any-windows-any/mftransform.h index 3f38678c5f1c..7ab6676eec01 100644 --- a/lib/libc/include/any-windows-any/mftransform.h +++ b/lib/libc/include/any-windows-any/mftransform.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mftransform.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mftransform.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mmdeviceapi.h b/lib/libc/include/any-windows-any/mmdeviceapi.h index 0f226a79abcf..d272da0b721c 100644 --- a/lib/libc/include/any-windows-any/mmdeviceapi.h +++ b/lib/libc/include/any-windows-any/mmdeviceapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mmdeviceapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mmdeviceapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mmstream.h b/lib/libc/include/any-windows-any/mmstream.h index 6a87f0510857..fbee4c0c0b43 100644 --- a/lib/libc/include/any-windows-any/mmstream.h +++ b/lib/libc/include/any-windows-any/mmstream.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mmstream.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mmstream.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mscoree.h b/lib/libc/include/any-windows-any/mscoree.h index e1d48996a051..296142f06249 100644 --- a/lib/libc/include/any-windows-any/mscoree.h +++ b/lib/libc/include/any-windows-any/mscoree.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mscoree.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mscoree.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msctf.h b/lib/libc/include/any-windows-any/msctf.h index 1ef9c92faec2..665bdd3cb6d9 100644 --- a/lib/libc/include/any-windows-any/msctf.h +++ b/lib/libc/include/any-windows-any/msctf.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msctf.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msctf.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mshtmhst.h b/lib/libc/include/any-windows-any/mshtmhst.h index 5a802cb4e2a6..07c54f351da8 100644 --- a/lib/libc/include/any-windows-any/mshtmhst.h +++ b/lib/libc/include/any-windows-any/mshtmhst.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mshtmhst.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mshtmhst.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/mshtml.h b/lib/libc/include/any-windows-any/mshtml.h index cebf65c77859..eeb895bebaae 100644 --- a/lib/libc/include/any-windows-any/mshtml.h +++ b/lib/libc/include/any-windows-any/mshtml.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/mshtml.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/mshtml.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msinkaut.h b/lib/libc/include/any-windows-any/msinkaut.h index c3a96b124c31..b46b0c1cb305 100644 --- a/lib/libc/include/any-windows-any/msinkaut.h +++ b/lib/libc/include/any-windows-any/msinkaut.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msinkaut.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msinkaut.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msinkaut_i.c b/lib/libc/include/any-windows-any/msinkaut_i.c index 3e1fd2e274f8..a6542704427b 100644 --- a/lib/libc/include/any-windows-any/msinkaut_i.c +++ b/lib/libc/include/any-windows-any/msinkaut_i.c @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from msinkaut.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from msinkaut.idl - Do not edit ***/ #include #include diff --git a/lib/libc/include/any-windows-any/msopc.h b/lib/libc/include/any-windows-any/msopc.h index 22fb866b5e5c..cbeeaca3c11a 100644 --- a/lib/libc/include/any-windows-any/msopc.h +++ b/lib/libc/include/any-windows-any/msopc.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msopc.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msopc.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msxml.h b/lib/libc/include/any-windows-any/msxml.h index 310581e3671c..089d93f16525 100644 --- a/lib/libc/include/any-windows-any/msxml.h +++ b/lib/libc/include/any-windows-any/msxml.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msxml.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msxml.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msxml2.h b/lib/libc/include/any-windows-any/msxml2.h index afbbf9322ee8..7ce7bf2d8e3d 100644 --- a/lib/libc/include/any-windows-any/msxml2.h +++ b/lib/libc/include/any-windows-any/msxml2.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msxml2.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msxml2.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/msxml6.h b/lib/libc/include/any-windows-any/msxml6.h index a16b8f2c0a3d..72fdc6e6c339 100644 --- a/lib/libc/include/any-windows-any/msxml6.h +++ b/lib/libc/include/any-windows-any/msxml6.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/msxml6.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/msxml6.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napcertrelyingparty.h b/lib/libc/include/any-windows-any/napcertrelyingparty.h index 59216e91341b..2dd48812d36f 100644 --- a/lib/libc/include/any-windows-any/napcertrelyingparty.h +++ b/lib/libc/include/any-windows-any/napcertrelyingparty.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napcertrelyingparty.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napcertrelyingparty.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napcommon.h b/lib/libc/include/any-windows-any/napcommon.h index 52c9f2f2f01e..9c9cef8e4e10 100644 --- a/lib/libc/include/any-windows-any/napcommon.h +++ b/lib/libc/include/any-windows-any/napcommon.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napcommon.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napcommon.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napenforcementclient.h b/lib/libc/include/any-windows-any/napenforcementclient.h index bb792cb6e288..1c7a57b9c319 100644 --- a/lib/libc/include/any-windows-any/napenforcementclient.h +++ b/lib/libc/include/any-windows-any/napenforcementclient.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napenforcementclient.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napenforcementclient.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napmanagement.h b/lib/libc/include/any-windows-any/napmanagement.h index 4e364cab2fa5..e2d9b4462c70 100644 --- a/lib/libc/include/any-windows-any/napmanagement.h +++ b/lib/libc/include/any-windows-any/napmanagement.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napmanagement.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napmanagement.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napprotocol.h b/lib/libc/include/any-windows-any/napprotocol.h index d0d3c27a31a9..d0e3bdf95550 100644 --- a/lib/libc/include/any-windows-any/napprotocol.h +++ b/lib/libc/include/any-windows-any/napprotocol.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napprotocol.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napprotocol.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napservermanagement.h b/lib/libc/include/any-windows-any/napservermanagement.h index 73d02eb6f299..63d42d606400 100644 --- a/lib/libc/include/any-windows-any/napservermanagement.h +++ b/lib/libc/include/any-windows-any/napservermanagement.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napservermanagement.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napservermanagement.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napsystemhealthagent.h b/lib/libc/include/any-windows-any/napsystemhealthagent.h index 5cd7730bdf28..c8ae4b9e9b4f 100644 --- a/lib/libc/include/any-windows-any/napsystemhealthagent.h +++ b/lib/libc/include/any-windows-any/napsystemhealthagent.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napsystemhealthagent.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napsystemhealthagent.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/napsystemhealthvalidator.h b/lib/libc/include/any-windows-any/napsystemhealthvalidator.h index 3f6f523546f3..7a194231876c 100644 --- a/lib/libc/include/any-windows-any/napsystemhealthvalidator.h +++ b/lib/libc/include/any-windows-any/napsystemhealthvalidator.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/napsystemhealthvalidator.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/napsystemhealthvalidator.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/naptypes.h b/lib/libc/include/any-windows-any/naptypes.h index b1dd1d6a783e..7a26bdbc46e0 100644 --- a/lib/libc/include/any-windows-any/naptypes.h +++ b/lib/libc/include/any-windows-any/naptypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/naptypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/naptypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/netcfgn.h b/lib/libc/include/any-windows-any/netcfgn.h index 9d162708e6c7..0e013f9d8296 100644 --- a/lib/libc/include/any-windows-any/netcfgn.h +++ b/lib/libc/include/any-windows-any/netcfgn.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/netcfgn.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/netcfgn.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/netcfgx.h b/lib/libc/include/any-windows-any/netcfgx.h index 0ed51cd7709c..f3fe8324e1b5 100644 --- a/lib/libc/include/any-windows-any/netcfgx.h +++ b/lib/libc/include/any-windows-any/netcfgx.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/netcfgx.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/netcfgx.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/netfw.h b/lib/libc/include/any-windows-any/netfw.h index 28651661f39f..2aac3ac4a6df 100644 --- a/lib/libc/include/any-windows-any/netfw.h +++ b/lib/libc/include/any-windows-any/netfw.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/netfw.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/netfw.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/netlistmgr.h b/lib/libc/include/any-windows-any/netlistmgr.h index 28e7e8e0fe46..8b7e783a06a6 100644 --- a/lib/libc/include/any-windows-any/netlistmgr.h +++ b/lib/libc/include/any-windows-any/netlistmgr.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/netlistmgr.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/netlistmgr.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/oaidl.h b/lib/libc/include/any-windows-any/oaidl.h index d2f1bf1c70c6..28f4f399556b 100644 --- a/lib/libc/include/any-windows-any/oaidl.h +++ b/lib/libc/include/any-windows-any/oaidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/oaidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/oaidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/objectarray.h b/lib/libc/include/any-windows-any/objectarray.h index e66232c9ff82..a03a8dc462c7 100644 --- a/lib/libc/include/any-windows-any/objectarray.h +++ b/lib/libc/include/any-windows-any/objectarray.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/objectarray.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/objectarray.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/objidl.h b/lib/libc/include/any-windows-any/objidl.h index d21323095eb1..85dc6e82768d 100644 --- a/lib/libc/include/any-windows-any/objidl.h +++ b/lib/libc/include/any-windows-any/objidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/objidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/objidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/objidlbase.h b/lib/libc/include/any-windows-any/objidlbase.h index d641b1e55cdf..3ea0c25a257b 100644 --- a/lib/libc/include/any-windows-any/objidlbase.h +++ b/lib/libc/include/any-windows-any/objidlbase.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/objidlbase.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/objidlbase.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/ocidl.h b/lib/libc/include/any-windows-any/ocidl.h index d54f31e527f3..2ea46593101a 100644 --- a/lib/libc/include/any-windows-any/ocidl.h +++ b/lib/libc/include/any-windows-any/ocidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/ocidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/ocidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/oleacc.h b/lib/libc/include/any-windows-any/oleacc.h index 366156fd1c4a..c5474849eed9 100644 --- a/lib/libc/include/any-windows-any/oleacc.h +++ b/lib/libc/include/any-windows-any/oleacc.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/oleacc.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/oleacc.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/oleidl.h b/lib/libc/include/any-windows-any/oleidl.h index f1cd68401c35..df821e6d8ca6 100644 --- a/lib/libc/include/any-windows-any/oleidl.h +++ b/lib/libc/include/any-windows-any/oleidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/oleidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/oleidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/optary.h b/lib/libc/include/any-windows-any/optary.h index bc3d9c7246d3..8c8c3a076ec3 100644 --- a/lib/libc/include/any-windows-any/optary.h +++ b/lib/libc/include/any-windows-any/optary.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/optary.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/optary.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/portabledeviceapi.h b/lib/libc/include/any-windows-any/portabledeviceapi.h index 454826ac6dbf..cd88501c3bf4 100644 --- a/lib/libc/include/any-windows-any/portabledeviceapi.h +++ b/lib/libc/include/any-windows-any/portabledeviceapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/portabledeviceapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/portabledeviceapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/portabledevicetypes.h b/lib/libc/include/any-windows-any/portabledevicetypes.h index 5b470448800a..36829fac5f1c 100644 --- a/lib/libc/include/any-windows-any/portabledevicetypes.h +++ b/lib/libc/include/any-windows-any/portabledevicetypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/portabledevicetypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/portabledevicetypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/processthreadsapi.h b/lib/libc/include/any-windows-any/processthreadsapi.h index 3344634361ab..95403f2dbbde 100644 --- a/lib/libc/include/any-windows-any/processthreadsapi.h +++ b/lib/libc/include/any-windows-any/processthreadsapi.h @@ -47,7 +47,7 @@ extern "C" { #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) WINBASEAPI WINBOOL WINAPI TerminateProcess (HANDLE hProcess, UINT uExitCode); - + typedef struct _STARTUPINFOA { DWORD cb; LPSTR lpReserved; @@ -111,6 +111,8 @@ extern "C" { ProcessProtectionLevelInfo, ProcessLeapSecondInfo, ProcessMachineTypeInfo, + ProcessOverrideSubsequentPrefetchParameter, + ProcessMaxOverridePrefetchParameter, ProcessInformationClassMax } PROCESS_INFORMATION_CLASS; @@ -136,6 +138,10 @@ DEFINE_ENUM_FLAG_OPERATORS(MACHINE_ATTRIBUTES); MACHINE_ATTRIBUTES MachineAttributes; } PROCESS_MACHINE_INFORMATION; + typedef struct OVERRIDE_PREFETCH_PARAMETER { + UINT32 Value; + } OVERRIDE_PREFETCH_PARAMETER; + #define PME_CURRENT_VERSION 1 typedef enum _PROCESS_MEMORY_EXHAUSTION_TYPE { @@ -309,6 +315,7 @@ DEFINE_ENUM_FLAG_OPERATORS(MACHINE_ATTRIBUTES); #if _WIN32_WINNT >= 0x0A00 WINBASEAPI DWORD WINAPI QueueUserAPC (PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData); WINBASEAPI WINBOOL WINAPI SwitchToThread (VOID); + WINBASEAPI LPVOID WINAPI TlsGetValue2(DWORD dwTlsIndex); #endif WINBASEAPI DWORD WINAPI SuspendThread (HANDLE hThread); WINBASEAPI DWORD WINAPI ResumeThread (HANDLE hThread); @@ -325,8 +332,9 @@ DEFINE_ENUM_FLAG_OPERATORS(MACHINE_ATTRIBUTES); #if NTDDI_VERSION >= NTDDI_WIN10_MN typedef enum _QUEUE_USER_APC_FLAGS { - QUEUE_USER_APC_FLAGS_NONE = 0x0, - QUEUE_USER_APC_FLAGS_SPECIAL_USER_APC = 0x1 + QUEUE_USER_APC_FLAGS_NONE = 0x00000000, + QUEUE_USER_APC_FLAGS_SPECIAL_USER_APC = 0x00000001, + QUEUE_USER_APC_CALLBACK_DATA_CONTEXT = 0x00010000 } QUEUE_USER_APC_FLAGS; typedef struct _APC_CALLBACK_DATA { diff --git a/lib/libc/include/any-windows-any/proofofpossessioncookieinfo.h b/lib/libc/include/any-windows-any/proofofpossessioncookieinfo.h index f24741072b1f..14a2094f67d6 100644 --- a/lib/libc/include/any-windows-any/proofofpossessioncookieinfo.h +++ b/lib/libc/include/any-windows-any/proofofpossessioncookieinfo.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/proofofpossessioncookieinfo.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/proofofpossessioncookieinfo.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/propidl.h b/lib/libc/include/any-windows-any/propidl.h index 56c2ad906b39..786d0bf3fcd7 100644 --- a/lib/libc/include/any-windows-any/propidl.h +++ b/lib/libc/include/any-windows-any/propidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/propidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/propidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/propsys.h b/lib/libc/include/any-windows-any/propsys.h index 7c331dd956bf..737e608c07d9 100644 --- a/lib/libc/include/any-windows-any/propsys.h +++ b/lib/libc/include/any-windows-any/propsys.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/propsys.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/propsys.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/propvarutil.h b/lib/libc/include/any-windows-any/propvarutil.h index 2d87867ccad1..42e658d77d1b 100644 --- a/lib/libc/include/any-windows-any/propvarutil.h +++ b/lib/libc/include/any-windows-any/propvarutil.h @@ -102,6 +102,7 @@ PSSTDAPI PropVariantToUInt32(REFPROPVARIANT propvarIn, ULONG *ret); PSSTDAPI_(ULONG) PropVariantToUInt32WithDefault(REFPROPVARIANT propvarIn, ULONG uLDefault); PSSTDAPI PropVariantToUInt64(REFPROPVARIANT propvarIn, ULONGLONG *ret); PSSTDAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, WINBOOL *ret); +PSSTDAPI PropVariantToBSTR(REFPROPVARIANT propvar, BSTR *bstr); PSSTDAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void *ret, UINT cb); PSSTDAPI PropVariantToString(REFPROPVARIANT propvarIn, PWSTR ret, UINT cch); PSSTDAPI_(PCWSTR) PropVariantToStringWithDefault(REFPROPVARIANT propvarIn, LPCWSTR pszDefault); @@ -113,6 +114,8 @@ PSSTDAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret); PSSTDAPI PropVariantToVariant(const PROPVARIANT *propvar, VARIANT *var); PSSTDAPI VariantToPropVariant(const VARIANT* var, PROPVARIANT* propvar); +PSSTDAPI PropVariantGetStringElem(const PROPVARIANT *propvar, ULONG idx, WCHAR **ret); + #ifdef __cplusplus HRESULT InitPropVariantFromBoolean(WINBOOL fVal, PROPVARIANT *ppropvar); diff --git a/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h b/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h index 872246a445a2..e109c15d06af 100644 --- a/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h +++ b/lib/libc/include/any-windows-any/psdk_inc/intrin-impl.h @@ -134,7 +134,7 @@ __INTRINSICS_USEINLINE FunctionName: Any valid function name DataType: __LONG32 or __int64 OffsetConstraint: either "I" for 32bit data types or "J" for 64. */ -#if defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) +#if (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) || defined(__i386__) || defined(_X86_) #define __buildbittesti(x, y, z, a) unsigned char x(y volatile *Base, y Offset) \ { \ unsigned char old; \ @@ -162,7 +162,7 @@ __INTRINSICS_USEINLINE : "memory", "cc"); \ return (old >> Offset) & 1; \ } -#elif defined(__aarch64__) || defined(_ARM64_) +#elif defined(__aarch64__) || defined(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) #define __buildbittesti(x, y, z, a) unsigned char x(y volatile *Base, y Offset) \ { \ unsigned int old, tmp1, tmp2; \ @@ -198,7 +198,7 @@ __INTRINSICS_USEINLINE : "memory", "cc"); \ return (old >> Offset) & 1; \ } -#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */ +#endif /* (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) || defined(__i386__) || defined(_X86_) */ /* This macro is used by YieldProcessor when compiling x86 w/o SSE2. It generates the same opcodes as _mm_pause. */ @@ -668,8 +668,7 @@ unsigned short _rotr16(unsigned short __X, unsigned char __C) #define __INTRINSIC_DEFINED__rotr16 #endif /* __INTRINSIC_PROLOG */ -#if defined(__x86_64__) || defined(_AMD64_) - +#if (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) #if __INTRINSIC_PROLOG(__faststorefence) void __faststorefence(void); #if !__has_builtin(__faststorefence) @@ -1103,7 +1102,7 @@ unsigned __int64 __shiftright128 (unsigned __int64 LowPart, unsigned __int64 Hi #define __INTRINSIC_DEFINED___shiftright128 #endif /* __INTRINSIC_PROLOG */ -#endif /* defined(__x86_64__) || defined(_AMD64_) */ +#endif /* #(defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) */ /* ***************************************************** */ @@ -1195,7 +1194,7 @@ unsigned char _BitScanReverse(unsigned __LONG32 *Index, unsigned __LONG32 Mask) #endif /* defined(__arm__) || defined(_ARM_) */ -#if defined(__aarch64__) || defined(_ARM64_) +#if defined(__aarch64__) || defined(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) #if __INTRINSIC_PROLOG(_interlockedbittestandset) unsigned char _interlockedbittestandset(__LONG32 volatile *a, __LONG32 b); @@ -1436,9 +1435,9 @@ unsigned char _BitScanReverse64(unsigned __LONG32 *Index, unsigned __int64 Mask) #define __INTRINSIC_DEFINED__BitScanReverse64 #endif /* __INTRINSIC_PROLOG */ -#endif /* defined(__aarch64__) || define(_ARM64_) */ +#endif /* defined(__aarch64__) || define(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) */ -#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) +#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) #if __INTRINSIC_PROLOG(_bittest) unsigned char _bittest(const __LONG32 *__a, __LONG32 __b); @@ -1494,9 +1493,9 @@ unsigned char _bittestandcomplement(__LONG32 *__a, __LONG32 __b) #define __INTRINSIC_DEFINED__bittestandcomplement #endif /* __INTRINSIC_PROLOG */ -#endif /* defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) */ +#endif /* defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) */ -#if defined(__aarch64__) || defined(_ARM64_) +#if defined(__aarch64__) || defined(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) #if __INTRINSIC_PROLOG(_bittest64) unsigned char _bittest64(const __int64 *__a, __int64 __b); @@ -1552,7 +1551,7 @@ unsigned char _bittestandcomplement64(__int64 *__a, __int64 __b) #define __INTRINSIC_DEFINED__bittestandcomplement64 #endif /* __INTRINSIC_PROLOG */ -#endif /* defined(__aarch64__) || define(_ARM64_) */ +#endif /* defined(__aarch64__) || define(_ARM64_) || defined(__arm64ec__) || defined(_ARM64EC_) */ /* ***************************************************** */ @@ -1777,7 +1776,7 @@ void *_InterlockedExchangePointer(void *volatile *Target,void *Value) { #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) */ -#if defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) +#if (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) || defined(__i386__) || defined(_X86_) #if __INTRINSIC_PROLOG(__int2c) void __int2c(void); @@ -2157,7 +2156,7 @@ unsigned __int64 _xgetbv(unsigned int index) #endif /* __INTRINSIC_PROLOG */ #endif /* __GNUC__ < 8 */ -#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */ +#endif /* (defined(__x86_64__) && !defined(__arm64ec__)) || (defined(_AMD64_) && !defined(_ARM64EC_)) || defined(__i386__) || defined(_X86_) */ /* ***************************************************** */ diff --git a/lib/libc/include/any-windows-any/pthread.h b/lib/libc/include/any-windows-any/pthread.h index b1b5c8165016..bc9735924e5a 100644 --- a/lib/libc/include/any-windows-any/pthread.h +++ b/lib/libc/include/any-windows-any/pthread.h @@ -68,9 +68,12 @@ #include #include -#include - #include "pthread_compat.h" +#include "sched.h" + +#ifdef _MSC_VER +#include "pthread_time.h" +#endif #ifdef __cplusplus extern "C" { @@ -83,36 +86,11 @@ extern "C" { /* MSB 8-bit major version, 8-bit minor version, 16-bit patch level. */ #define __WINPTHREADS_VERSION 0x00050000 -#if defined(IN_WINPTHREAD) -# if defined(DLL_EXPORT) -# define WINPTHREAD_API __declspec(dllexport) /* building the DLL */ -# else -# define WINPTHREAD_API /* building the static library */ -# endif -#else -# if defined(WINPTHREADS_USE_DLLIMPORT) -# define WINPTHREAD_API __declspec(dllimport) /* user wants explicit `dllimport` */ -# else -# define WINPTHREAD_API /* the default; auto imported in case of DLL */ -# endif -#endif - /* #define WINPTHREAD_DBG 1 */ /* Compatibility stuff: */ #define RWLS_PER_THREAD 8 -/* Error-codes. */ -#ifndef ETIMEDOUT -#define ETIMEDOUT 138 -#endif -#ifndef ENOTSUP -#define ENOTSUP 129 -#endif -#ifndef EWOULDBLOCK -#define EWOULDBLOCK 140 -#endif - /* pthread specific defines. */ #define PTHREAD_CANCEL_DISABLE 0 @@ -234,26 +212,6 @@ struct _pthread_cleanup if ((E)) _pthread_cup.func((pthread_once_t *)_pthread_cup.arg); \ } while (0) -#ifndef SCHED_OTHER -/* Some POSIX realtime extensions, mostly stubbed */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 -#define SCHED_MIN SCHED_OTHER -#define SCHED_MAX SCHED_RR - -struct sched_param { - int sched_priority; -}; - -WINPTHREAD_API int sched_yield(void); -WINPTHREAD_API int sched_get_priority_min(int pol); -WINPTHREAD_API int sched_get_priority_max(int pol); -WINPTHREAD_API int sched_getscheduler(pid_t pid); -WINPTHREAD_API int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param); - -#endif - typedef struct pthread_attr_t pthread_attr_t; struct pthread_attr_t { @@ -393,11 +351,6 @@ WINPTHREAD_API int pthread_condattr_init(pthread_condattr_t *a); WINPTHREAD_API int pthread_condattr_getpshared(const pthread_condattr_t *a, int *s); WINPTHREAD_API int pthread_condattr_setpshared(pthread_condattr_t *a, int s); -#ifndef __clockid_t_defined -typedef int clockid_t; -#define __clockid_t_defined 1 -#endif /* __clockid_t_defined */ - WINPTHREAD_API int pthread_condattr_getclock (const pthread_condattr_t *attr, clockid_t *clock_id); WINPTHREAD_API int pthread_condattr_setclock(pthread_condattr_t *attr, diff --git a/lib/libc/include/any-windows-any/pthread_compat.h b/lib/libc/include/any-windows-any/pthread_compat.h index 63f5f495fcf4..96118722d5f6 100644 --- a/lib/libc/include/any-windows-any/pthread_compat.h +++ b/lib/libc/include/any-windows-any/pthread_compat.h @@ -60,6 +60,41 @@ #ifndef WIN_PTHREADS_PTHREAD_COMPAT_H #define WIN_PTHREADS_PTHREAD_COMPAT_H +#if defined(IN_WINPTHREAD) +# if defined(DLL_EXPORT) +# define WINPTHREAD_API __declspec(dllexport) /* building the DLL */ +# else +# define WINPTHREAD_API /* building the static library */ +# endif +#else +# if defined(WINPTHREADS_USE_DLLIMPORT) +# define WINPTHREAD_API __declspec(dllimport) /* user wants explicit `dllimport` */ +# else +# define WINPTHREAD_API /* the default; auto imported in case of DLL */ +# endif +#endif + +#ifndef __clockid_t_defined +typedef int clockid_t; +#define __clockid_t_defined 1 +#endif /* __clockid_t_defined */ + +#ifndef _MODE_T_ +#define _MODE_T_ +typedef unsigned short mode_t; +#endif + +/* Error-codes. */ +#ifndef ETIMEDOUT +#define ETIMEDOUT 138 +#endif +#ifndef ENOTSUP +#define ENOTSUP 129 +#endif +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 140 +#endif + #ifdef __GNUC__ #define WINPTHREADS_INLINE inline @@ -68,14 +103,11 @@ #elif _MSC_VER -#include "pthread_time.h" - #ifdef _WIN64 typedef __int64 pid_t; #else typedef int pid_t; #endif -typedef int clockid_t; #define WINPTHREADS_INLINE __inline #define WINPTHREADS_ATTRIBUTE(X) __declspec X diff --git a/lib/libc/include/any-windows-any/pthread_time.h b/lib/libc/include/any-windows-any/pthread_time.h index eec416844a4f..363154d678cb 100644 --- a/lib/libc/include/any-windows-any/pthread_time.h +++ b/lib/libc/include/any-windows-any/pthread_time.h @@ -20,11 +20,11 @@ DEALINGS IN THE SOFTWARE. */ -#include - #ifndef WIN_PTHREADS_TIME_H #define WIN_PTHREADS_TIME_H +#include "pthread_compat.h" + /* Posix timers are supported */ #ifndef _POSIX_TIMERS #define _POSIX_TIMERS 200809L @@ -45,11 +45,6 @@ #define _POSIX_THREAD_CPUTIME 200809L #endif -#ifndef __clockid_t_defined -typedef int clockid_t; -#define __clockid_t_defined 1 -#endif /* __clockid_t_defined */ - #ifndef TIMER_ABSTIME #define TIMER_ABSTIME 1 #endif @@ -78,13 +73,6 @@ typedef int clockid_t; extern "C" { #endif -/* Make sure we provide default for WINPTHREAD_API, if not defined. */ -#pragma push_macro("WINPTHREAD_API") -#ifndef WINPTHREAD_API -#define WINPTHREAD_API -#endif - -/* These should really be dllimport'ed if using winpthread dll */ WINPTHREAD_API int __cdecl nanosleep(const struct timespec *request, struct timespec *remain); WINPTHREAD_API int __cdecl clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *request, struct timespec *remain); @@ -92,11 +80,8 @@ WINPTHREAD_API int __cdecl clock_getres(clockid_t clock_id, struct timespec *res WINPTHREAD_API int __cdecl clock_gettime(clockid_t clock_id, struct timespec *tp); WINPTHREAD_API int __cdecl clock_settime(clockid_t clock_id, const struct timespec *tp); -#pragma pop_macro("WINPTHREAD_API") - #ifdef __cplusplus } #endif #endif /* WIN_PTHREADS_TIME_H */ - diff --git a/lib/libc/include/any-windows-any/qedit.h b/lib/libc/include/any-windows-any/qedit.h index 5b6d1bcefb7b..8e9781a3c767 100644 --- a/lib/libc/include/any-windows-any/qedit.h +++ b/lib/libc/include/any-windows-any/qedit.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/qedit.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/qedit.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/qnetwork.h b/lib/libc/include/any-windows-any/qnetwork.h index cad40dabc94e..66f751052743 100644 --- a/lib/libc/include/any-windows-any/qnetwork.h +++ b/lib/libc/include/any-windows-any/qnetwork.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/qnetwork.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/qnetwork.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/rdpencomapi.h b/lib/libc/include/any-windows-any/rdpencomapi.h index 07215b071de0..21d9a405403b 100644 --- a/lib/libc/include/any-windows-any/rdpencomapi.h +++ b/lib/libc/include/any-windows-any/rdpencomapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/rdpencomapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/rdpencomapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/regbag.h b/lib/libc/include/any-windows-any/regbag.h index b70a66cb0023..264337d55f0c 100644 --- a/lib/libc/include/any-windows-any/regbag.h +++ b/lib/libc/include/any-windows-any/regbag.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/regbag.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/regbag.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/relogger.h b/lib/libc/include/any-windows-any/relogger.h index 9c9599e2ef03..cfe965fc8fd7 100644 --- a/lib/libc/include/any-windows-any/relogger.h +++ b/lib/libc/include/any-windows-any/relogger.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/relogger.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/relogger.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/robuffer.h b/lib/libc/include/any-windows-any/robuffer.h index e47a85e7a340..517a2d5ac0f5 100644 --- a/lib/libc/include/any-windows-any/robuffer.h +++ b/lib/libc/include/any-windows-any/robuffer.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/robuffer.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/robuffer.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/rtworkq.h b/lib/libc/include/any-windows-any/rtworkq.h index c5b860d286ee..1ee55df51e56 100644 --- a/lib/libc/include/any-windows-any/rtworkq.h +++ b/lib/libc/include/any-windows-any/rtworkq.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/rtworkq.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/rtworkq.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/sapi51.h b/lib/libc/include/any-windows-any/sapi51.h index 18613b057c58..868433f96bc5 100644 --- a/lib/libc/include/any-windows-any/sapi51.h +++ b/lib/libc/include/any-windows-any/sapi51.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/sapi51.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/sapi51.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/sapi53.h b/lib/libc/include/any-windows-any/sapi53.h index 6f565f967ae1..000e18fe9055 100644 --- a/lib/libc/include/any-windows-any/sapi53.h +++ b/lib/libc/include/any-windows-any/sapi53.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/sapi53.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/sapi53.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/sapi54.h b/lib/libc/include/any-windows-any/sapi54.h index d708149ad020..31fdff3164c7 100644 --- a/lib/libc/include/any-windows-any/sapi54.h +++ b/lib/libc/include/any-windows-any/sapi54.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/sapi54.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/sapi54.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/sched.h b/lib/libc/include/any-windows-any/sched.h index 14e4c87f511b..abbf5cf0d497 100644 --- a/lib/libc/include/any-windows-any/sched.h +++ b/lib/libc/include/any-windows-any/sched.h @@ -19,6 +19,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef WIN_PTHREADS_SCHED_H +#define WIN_PTHREADS_SCHED_H #include #include @@ -28,14 +30,8 @@ #include #include -#include - #include "pthread_compat.h" -#ifndef WIN_PTHREADS_SCHED_H -#define WIN_PTHREADS_SCHED_H - -#ifndef SCHED_OTHER /* Some POSIX realtime extensions, mostly stubbed */ #define SCHED_OTHER 0 #define SCHED_FIFO 1 @@ -51,32 +47,16 @@ struct sched_param { extern "C" { #endif -#if defined(IN_WINPTHREAD) -# if defined(DLL_EXPORT) && !defined(WINPTHREAD_EXPORT_ALL_DEBUG) -# define WINPTHREAD_SCHED_API __declspec(dllexport) /* building the DLL */ -# else -# define WINPTHREAD_SCHED_API /* building the static library */ -# endif -#else -# if defined(WINPTHREADS_USE_DLLIMPORT) -# define WINPTHREAD_SCHED_API __declspec(dllimport) /* user wants explicit `dllimport` */ -# else -# define WINPTHREAD_SCHED_API /* the default; auto imported in case of DLL */ -# endif -#endif - -WINPTHREAD_SCHED_API int sched_yield(void); -WINPTHREAD_SCHED_API int sched_get_priority_min(int pol); -WINPTHREAD_SCHED_API int sched_get_priority_max(int pol); -WINPTHREAD_SCHED_API int sched_getscheduler(pid_t pid); -WINPTHREAD_SCHED_API int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param); +WINPTHREAD_API int sched_yield(void); +WINPTHREAD_API int sched_get_priority_min(int pol); +WINPTHREAD_API int sched_get_priority_max(int pol); +WINPTHREAD_API int sched_getscheduler(pid_t pid); +WINPTHREAD_API int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param); #ifdef __cplusplus } #endif -#endif - #ifndef sched_rr_get_interval #define sched_rr_get_interval(_p, _i) \ ( errno = ENOTSUP, (int) -1 ) diff --git a/lib/libc/include/any-windows-any/sec_api/stdlib_s.h b/lib/libc/include/any-windows-any/sec_api/stdlib_s.h index f7d76fecb165..32f4767e4d49 100644 --- a/lib/libc/include/any-windows-any/sec_api/stdlib_s.h +++ b/lib/libc/include/any-windows-any/sec_api/stdlib_s.h @@ -12,8 +12,16 @@ extern "C" { #endif - _CRTIMP void * __cdecl bsearch_s(const void *_Key,const void *_Base,rsize_t _NumOfElements,rsize_t _SizeOfElements,int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void *_Context); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_dupenv_s") +#undef _dupenv_s +#endif _CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_dupenv_s") +#endif + + _CRTIMP void * __cdecl bsearch_s(const void *_Key,const void *_Base,rsize_t _NumOfElements,rsize_t _SizeOfElements,int (__cdecl * _PtFuncCompare)(void *, const void *, const void *), void *_Context); _CRTIMP errno_t __cdecl getenv_s(size_t *_ReturnSize,char *_DstBuf,rsize_t _DstSize,const char *_VarName); __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(errno_t, getenv_s, size_t *, _ReturnSize, char, _Dest, const char *, _VarName) _CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); diff --git a/lib/libc/include/any-windows-any/semaphore.h b/lib/libc/include/any-windows-any/semaphore.h index 8e3fa6f513e3..50630ea5e4b4 100644 --- a/lib/libc/include/any-windows-any/semaphore.h +++ b/lib/libc/include/any-windows-any/semaphore.h @@ -23,60 +23,43 @@ #ifndef WIN_PTHREADS_SEMAPHORE_H #define WIN_PTHREADS_SEMAPHORE_H +#include "pthread_compat.h" + #ifdef __cplusplus extern "C" { #endif -#if defined(IN_WINPTHREAD) -# if defined(DLL_EXPORT) && !defined(WINPTHREAD_EXPORT_ALL_DEBUG) -# define WINPTHREAD_SEMA_API __declspec(dllexport) /* building the DLL */ -# else -# define WINPTHREAD_SEMA_API /* building the static library */ -# endif -#else -# if defined(WINPTHREADS_USE_DLLIMPORT) -# define WINPTHREAD_SEMA_API __declspec(dllimport) /* user wants explicit `dllimport` */ -# else -# define WINPTHREAD_SEMA_API /* the default; auto imported in case of DLL */ -# endif -#endif - /* Set this to 0 to disable it */ #define USE_SEM_CriticalSection_SpinCount 100 #define SEM_VALUE_MAX INT_MAX -#ifndef _MODE_T_ -#define _MODE_T_ -typedef unsigned short mode_t; -#endif - typedef void *sem_t; #define SEM_FAILED NULL -WINPTHREAD_SEMA_API int sem_init(sem_t * sem, int pshared, unsigned int value); +WINPTHREAD_API int sem_init(sem_t * sem, int pshared, unsigned int value); -WINPTHREAD_SEMA_API int sem_destroy(sem_t *sem); +WINPTHREAD_API int sem_destroy(sem_t *sem); -WINPTHREAD_SEMA_API int sem_trywait(sem_t *sem); +WINPTHREAD_API int sem_trywait(sem_t *sem); -WINPTHREAD_SEMA_API int sem_wait(sem_t *sem); +WINPTHREAD_API int sem_wait(sem_t *sem); -WINPTHREAD_SEMA_API int sem_timedwait(sem_t * sem, const struct timespec *t); +WINPTHREAD_API int sem_timedwait(sem_t * sem, const struct timespec *t); -WINPTHREAD_SEMA_API int sem_post(sem_t *sem); +WINPTHREAD_API int sem_post(sem_t *sem); -WINPTHREAD_SEMA_API int sem_post_multiple(sem_t *sem, int count); +WINPTHREAD_API int sem_post_multiple(sem_t *sem, int count); /* yes, it returns a semaphore (or SEM_FAILED) */ -WINPTHREAD_SEMA_API sem_t * sem_open(const char * name, int oflag, mode_t mode, unsigned int value); +WINPTHREAD_API sem_t * sem_open(const char * name, int oflag, mode_t mode, unsigned int value); -WINPTHREAD_SEMA_API int sem_close(sem_t * sem); +WINPTHREAD_API int sem_close(sem_t * sem); -WINPTHREAD_SEMA_API int sem_unlink(const char * name); +WINPTHREAD_API int sem_unlink(const char * name); -WINPTHREAD_SEMA_API int sem_getvalue(sem_t * sem, int * sval); +WINPTHREAD_API int sem_getvalue(sem_t * sem, int * sval); #ifdef __cplusplus } diff --git a/lib/libc/include/any-windows-any/sensorsapi.h b/lib/libc/include/any-windows-any/sensorsapi.h index e37c2af817a6..fa9055105143 100644 --- a/lib/libc/include/any-windows-any/sensorsapi.h +++ b/lib/libc/include/any-windows-any/sensorsapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/sensorsapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/sensorsapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/servprov.h b/lib/libc/include/any-windows-any/servprov.h index 64713412d564..b1a311cefad0 100644 --- a/lib/libc/include/any-windows-any/servprov.h +++ b/lib/libc/include/any-windows-any/servprov.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/servprov.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/servprov.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/shldisp.h b/lib/libc/include/any-windows-any/shldisp.h index 641528a22e64..d8c9e29e5614 100644 --- a/lib/libc/include/any-windows-any/shldisp.h +++ b/lib/libc/include/any-windows-any/shldisp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/shldisp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/shldisp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/shlwapi.h b/lib/libc/include/any-windows-any/shlwapi.h index 131f56a356c4..0d742c58cde3 100644 --- a/lib/libc/include/any-windows-any/shlwapi.h +++ b/lib/libc/include/any-windows-any/shlwapi.h @@ -438,8 +438,8 @@ extern "C" { LWSTDAPI_(WINBOOL) PathMatchSpecW(LPCWSTR pszFile,LPCWSTR pszSpec); LWSTDAPI_(int) PathParseIconLocationA(LPSTR pszIconFile); LWSTDAPI_(int) PathParseIconLocationW(LPWSTR pszIconFile); - LWSTDAPI_(void) PathQuoteSpacesA(LPSTR lpsz); - LWSTDAPI_(void) PathQuoteSpacesW(LPWSTR lpsz); + LWSTDAPI_(WINBOOL) PathQuoteSpacesA(LPSTR lpsz); + LWSTDAPI_(WINBOOL) PathQuoteSpacesW(LPWSTR lpsz); LWSTDAPI_(WINBOOL) PathRelativePathToA(LPSTR pszPath,LPCSTR pszFrom,DWORD dwAttrFrom,LPCSTR pszTo,DWORD dwAttrTo); LWSTDAPI_(WINBOOL) PathRelativePathToW(LPWSTR pszPath,LPCWSTR pszFrom,DWORD dwAttrFrom,LPCWSTR pszTo,DWORD dwAttrTo); LWSTDAPI_(void) PathRemoveArgsA(LPSTR pszPath); diff --git a/lib/libc/include/any-windows-any/shobjidl.h b/lib/libc/include/any-windows-any/shobjidl.h index 5c9cac68cea3..bb5d9a2febaa 100644 --- a/lib/libc/include/any-windows-any/shobjidl.h +++ b/lib/libc/include/any-windows-any/shobjidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/shobjidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/shobjidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/shtypes.h b/lib/libc/include/any-windows-any/shtypes.h index d333cb07a19b..c62de4426084 100644 --- a/lib/libc/include/any-windows-any/shtypes.h +++ b/lib/libc/include/any-windows-any/shtypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/shtypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/shtypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/spatialaudioclient.h b/lib/libc/include/any-windows-any/spatialaudioclient.h index 801c8102bb55..05c8e5e985ff 100644 --- a/lib/libc/include/any-windows-any/spatialaudioclient.h +++ b/lib/libc/include/any-windows-any/spatialaudioclient.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/spatialaudioclient.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/spatialaudioclient.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/spellcheck.h b/lib/libc/include/any-windows-any/spellcheck.h index 627405903fe2..49a1106c1cf9 100644 --- a/lib/libc/include/any-windows-any/spellcheck.h +++ b/lib/libc/include/any-windows-any/spellcheck.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/spellcheck.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/spellcheck.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/stdio.h b/lib/libc/include/any-windows-any/stdio.h index a8f5c978000e..7e0d3d9175f0 100644 --- a/lib/libc/include/any-windows-any/stdio.h +++ b/lib/libc/include/any-windows-any/stdio.h @@ -540,8 +540,15 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li _CRTIMP int __cdecl _fileno(FILE *_File); #ifdef _POSIX_ int __cdecl fileno(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_tempnam") +#undef _tempnam #endif _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_tempnam") +#endif _CRTIMP int __cdecl _flushall(void); FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode); @@ -915,10 +922,10 @@ int vsprintf (char * __restrict__ __stream, const char * __restrict__ __format, int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); -/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); -/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __mingw_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...); +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list); /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) int __cdecl __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); @@ -935,10 +942,10 @@ int vsprintf (char * __restrict__ __stream, const char * __restrict__ __format, int __cdecl __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); /*__attribute__((__format__ (ms_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) int __cdecl __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); -/* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); -/* __attribute__((__format__ (ms_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +/* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __ms_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...); +/* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __ms_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list); #ifdef _UCRT int __cdecl __stdio_common_vswprintf(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist); @@ -996,6 +1003,32 @@ __MINGW_ASM_CALL(__mingw_vfwprintf); int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) __MINGW_ASM_CALL(__mingw_vwprintf); +/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) +int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) +__MINGW_ASM_CALL(__mingw_swprintf); + +#if __MINGW_FORTIFY_VA_ARG + +__mingw_bos_extern_ovr +/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) +int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) +{ + __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); + return __mingw_swprintf( __stream, __n, __format, __builtin_va_arg_pack() ); +} + +#endif /* __MINGW_FORTIFY_VA_ARG */ + +__mingw_bos_ovr +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) +int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +{ +#if __MINGW_FORTIFY_LEVEL > 0 + __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1); +#endif + return __mingw_vswprintf( __stream, __n, __format, __local_argv ); +} + #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) @@ -1023,6 +1056,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #endif return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); } + #endif /* __NO_ISOCEXT */ #else /* !__USE_MINGW_ANSI_STDIO */ @@ -1170,7 +1204,45 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #if __USE_MINGW_ANSI_STDIO == 0 __mingw_ovr - int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) + int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + /* + * __stdio_common_vswprintf() for case _Dest == NULL and _Count == 0 and + * without _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR option, is + * executed in "standard snprintf behavior" and returns number of (wide) + * chars required to allocate. For all other cases it is executed in a way + * that returns negative value on error. But C95+ compliant swprintf() for + * case _Count == 0 returns negative value, so handle this case specially. + */ + if (_Dest == NULL && _Count == 0) + return -1; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, _Count, _Format, NULL, __ap); + __builtin_va_end(__ap); + return __ret < 0 ? -1 : __ret; + } + __mingw_ovr + int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) + { + int __ret; + /* + * __stdio_common_vswprintf() for case _Dest == NULL and _Count == 0 and + * without _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR option, is + * executed in "standard snprintf behavior" and returns number of (wide) + * chars required to allocate. For all other cases it is executed in a way + * that returns negative value on error. But C95+ compliant vswprintf() for + * case _Count == 0 returns negative value, so handle this case specially. + */ + if (_Dest == NULL && _Count == 0) + return -1; + __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, _Count, _Format, NULL, _Args); + return __ret < 0 ? -1 : __ret; + } + + __mingw_ovr + int __cdecl snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) { __builtin_va_list __ap; int __ret; @@ -1182,8 +1254,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti __mingw_ovr int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) { - int __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, s, n, format, NULL, arg); - return __ret < 0 ? -1 : __ret; + return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, s, n, format, NULL, arg); } #endif @@ -1222,26 +1293,16 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #if __USE_MINGW_ANSI_STDIO == 0 int __cdecl __ms_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); int __cdecl __ms_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); - __mingw_ovr - int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) - { - int r; - va_list argp; - __builtin_va_start (argp, format); - r = _vsnwprintf (s, n, format, argp); - __builtin_va_end (argp); - return r; - } - __mingw_ovr - int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) - { - return _vsnwprintf(s,n,format,arg); - } + int __cdecl snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) __MINGW_ASM_CALL(__ms_snwprintf); + int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) __MINGW_ASM_CALL(__ms_vsnwprintf); #endif #endif /* ! __NO_ISOCEXT */ _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...); _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args); + + int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...); + int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args); #endif /* _UCRT */ #ifndef RC_INVOKED @@ -1255,7 +1316,14 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #endif #endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wtempnam") +#undef _wtempnam +#endif _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wtempnam") +#endif _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode); _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; @@ -1333,7 +1401,14 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #define P_tmpdir _P_tmpdir #define SYS_OPEN _SYS_OPEN +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("tempnam") +#undef tempnam +#endif char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("tempnam") +#endif int __cdecl fcloseall(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005; FILE *__cdecl fdopen(int _FileHandle,const char *_Format) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl fgetchar(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005; diff --git a/lib/libc/include/any-windows-any/stdlib.h b/lib/libc/include/any-windows-any/stdlib.h index dabeb3cdb61a..d43fa33b7f2c 100644 --- a/lib/libc/include/any-windows-any/stdlib.h +++ b/lib/libc/include/any-windows-any/stdlib.h @@ -419,6 +419,36 @@ float __cdecl __MINGW_NOTHROW strtof(const char * __restrict__ _Str,char ** __re #ifndef _CRT_ALLOCATION_DEFINED #define _CRT_ALLOCATION_DEFINED + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("calloc") +#undef calloc +#pragma push_macro("free") +#undef free +#pragma push_macro("malloc") +#undef malloc +#pragma push_macro("realloc") +#undef realloc +#pragma push_macro("_aligned_free") +#undef _aligned_free +#pragma push_macro("_aligned_malloc") +#undef _aligned_malloc +#pragma push_macro("_aligned_offset_malloc") +#undef _aligned_offset_malloc +#pragma push_macro("_aligned_realloc") +#undef _aligned_realloc +#pragma push_macro("_aligned_offset_realloc") +#undef _aligned_offset_realloc +#pragma push_macro("_recalloc") +#undef _recalloc +#pragma push_macro("_aligned_recalloc") +#undef _aligned_recalloc +#pragma push_macro("_aligned_offset_recalloc") +#undef _aligned_offset_recalloc +#pragma push_macro("_aligned_msize") +#undef _aligned_msize +#endif + void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); void __cdecl free(void *_Memory); void *__cdecl malloc(size_t _Size); @@ -434,6 +464,23 @@ float __cdecl __MINGW_NOTHROW strtof(const char * __restrict__ _Str,char ** __re _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); _CRTIMP size_t __cdecl _aligned_msize(void *_Memory,size_t _Alignment,size_t _Offset); # endif + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("calloc") +#pragma pop_macro("free") +#pragma pop_macro("malloc") +#pragma pop_macro("realloc") +#pragma pop_macro("_aligned_free") +#pragma pop_macro("_aligned_malloc") +#pragma pop_macro("_aligned_offset_malloc") +#pragma pop_macro("_aligned_realloc") +#pragma pop_macro("_aligned_offset_realloc") +#pragma pop_macro("_recalloc") +#pragma pop_macro("_aligned_recalloc") +#pragma pop_macro("_aligned_offset_recalloc") +#pragma pop_macro("_aligned_msize") +#endif + #endif #ifndef _WSTDLIB_DEFINED @@ -497,7 +544,16 @@ float __cdecl __MINGW_NOTHROW strtof(const char * __restrict__ _Str,char ** __re #ifndef _POSIX_ #define _CVTBUFSIZE (309+40) + +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_fullpath") +#undef _fullpath +#endif _CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_fullpath") +#endif + _CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; _CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; _CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; @@ -559,7 +615,14 @@ unsigned long __cdecl _lrotr(unsigned long,int); #ifndef _WSTDLIBP_DEFINED #define _WSTDLIBP_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wfullpath") +#undef _wfullpath +#endif _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wfullpath") +#endif _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); #ifndef _CRT_WPERROR_DEFINED #define _CRT_WPERROR_DEFINED diff --git a/lib/libc/include/any-windows-any/string.h b/lib/libc/include/any-windows-any/string.h index 813cd5bec593..1832e38ed85a 100644 --- a/lib/libc/include/any-windows-any/string.h +++ b/lib/libc/include/any-windows-any/string.h @@ -64,7 +64,14 @@ extern "C" { size_t __cdecl strlen(const char *_Str); size_t __cdecl strnlen(const char *_Str,size_t _MaxCount); void *__cdecl memmove(void *_Dst,const void *_Src,size_t _Size) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_strdup") +#undef _strdup +#endif _CRTIMP char *__cdecl _strdup(const char *_Src); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_strdup") +#endif _CONST_RETURN char *__cdecl strchr(const char *_Str,int _Val); _CRTIMP int __cdecl _stricmp(const char *_Str1,const char *_Str2); _CRTIMP int __cdecl _strcmpi(const char *_Str1,const char *_Str2); @@ -105,7 +112,14 @@ extern "C" { _CRTIMP size_t __cdecl _strxfrm_l(char * __restrict__ _Dst,const char * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale); #ifndef NO_OLDNAMES +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("strdup") +#undef strdup +#endif char *__cdecl strdup(const char *_Src) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("strdup") +#endif int __cdecl strcmpi(const char *_Str1,const char *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl stricmp(const char *_Str1,const char *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005; char *__cdecl strlwr(char *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005; @@ -128,7 +142,14 @@ extern "C" { #ifndef _WSTRING_DEFINED #define _WSTRING_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wcsdup") +#undef _wcsdup +#endif _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wcsdup") +#endif wchar_t *__cdecl wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch); int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); @@ -177,7 +198,14 @@ extern "C" { _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); #ifndef NO_OLDNAMES +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("wcsdup") +#undef wcsdup +#endif wchar_t *__cdecl wcsdup(const wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("wcsdup") +#endif #define wcswcs wcsstr int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005; diff --git a/lib/libc/include/any-windows-any/strmif.h b/lib/libc/include/any-windows-any/strmif.h index 74986b3f76ee..6c8658afe8d8 100644 --- a/lib/libc/include/any-windows-any/strmif.h +++ b/lib/libc/include/any-windows-any/strmif.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/strmif.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/strmif.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/structuredquerycondition.h b/lib/libc/include/any-windows-any/structuredquerycondition.h index bec32ccf4088..abb285e15701 100644 --- a/lib/libc/include/any-windows-any/structuredquerycondition.h +++ b/lib/libc/include/any-windows-any/structuredquerycondition.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/structuredquerycondition.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/structuredquerycondition.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/swprintf.inl b/lib/libc/include/any-windows-any/swprintf.inl index d990d428c5a1..3fe7712c0c61 100644 --- a/lib/libc/include/any-windows-any/swprintf.inl +++ b/lib/libc/include/any-windows-any/swprintf.inl @@ -9,26 +9,6 @@ #include -__mingw_ovr -/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) -int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) -{ - return vsnwprintf( __stream, __count, __format, __local_argv ); -} - -__mingw_ovr -/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) -int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) -{ - int __retval; - __builtin_va_list __local_argv; - - __builtin_va_start( __local_argv, __format ); - __retval = vswprintf( __stream, __count, __format, __local_argv ); - __builtin_va_end( __local_argv ); - return __retval; -} - #ifdef __cplusplus extern "C++" { @@ -37,17 +17,15 @@ __mingw_ovr /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) { -#if __USE_MINGW_ANSI_STDIO - return __mingw_vswprintf( __stream, __format, __local_argv ); -#else return _vswprintf( __stream, __format, __local_argv ); -#endif } __mingw_ovr /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) int swprintf (wchar_t *__stream, const wchar_t *__format, ...) { +#ifdef __clang__ + /* clang does not support __builtin_va_arg_pack(), so forward swprintf() to vswprintf() */ int __retval; __builtin_va_list __local_argv; @@ -55,19 +33,17 @@ int swprintf (wchar_t *__stream, const wchar_t *__format, ...) __retval = vswprintf( __stream, __format, __local_argv ); __builtin_va_end( __local_argv ); return __retval; +#else + return _swprintf( __stream, __format, __builtin_va_arg_pack() ); +#endif } } #elif defined(_CRT_NON_CONFORMING_SWPRINTFS) -#if __USE_MINGW_ANSI_STDIO -#define swprintf __mingw_swprintf -#define vswprintf __mingw_vswprintf -#else #define swprintf _swprintf #define vswprintf _vswprintf -#endif #endif /* __cplusplus */ diff --git a/lib/libc/include/any-windows-any/systemmediatransportcontrolsinterop.h b/lib/libc/include/any-windows-any/systemmediatransportcontrolsinterop.h index b1a27316c960..71f031c2a7f4 100644 --- a/lib/libc/include/any-windows-any/systemmediatransportcontrolsinterop.h +++ b/lib/libc/include/any-windows-any/systemmediatransportcontrolsinterop.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/systemmediatransportcontrolsinterop.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/systemmediatransportcontrolsinterop.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/taskschd.h b/lib/libc/include/any-windows-any/taskschd.h index 3ed161d513be..801080b9a92b 100644 --- a/lib/libc/include/any-windows-any/taskschd.h +++ b/lib/libc/include/any-windows-any/taskschd.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/taskschd.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/taskschd.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tchar.h b/lib/libc/include/any-windows-any/tchar.h index e0ce3f4741e2..42d6b1ae353c 100644 --- a/lib/libc/include/any-windows-any/tchar.h +++ b/lib/libc/include/any-windows-any/tchar.h @@ -133,7 +133,7 @@ extern "C" { #define _tenviron _wenviron #define __targv __wargv -#define _tprintf wprintf +#define _tprintf __ms_wprintf #define _tprintf_l _wprintf_l #define _tprintf_p _wprintf_p #define _tprintf_p_l _wprintf_p_l @@ -145,11 +145,11 @@ extern "C" { #define _vtcprintf_l _vcwprintf_l #define _vtcprintf_p _vcwprintf_p #define _vtcprintf_p_l _vcwprintf_p_l -#define _ftprintf fwprintf +#define _ftprintf __ms_fwprintf #define _ftprintf_l _fwprintf_l #define _ftprintf_p _fwprintf_p #define _ftprintf_p_l _fwprintf_p_l -#define _stprintf swprintf +#define _stprintf _swprintf #define _stprintf_l __swprintf_l #define _stprintf_p _swprintf_p #define _stprintf_p_l _swprintf_p_l @@ -159,15 +159,15 @@ extern "C" { #define _sctprintf_p_l _scwprintf_p_l #define _sntprintf _snwprintf #define _sntprintf_l _snwprintf_l -#define _vtprintf vwprintf +#define _vtprintf __ms_vwprintf #define _vtprintf_l _vwprintf_l #define _vtprintf_p _vwprintf_p #define _vtprintf_p_l _vwprintf_p_l -#define _vftprintf vfwprintf +#define _vftprintf __ms_vfwprintf #define _vftprintf_l _vfwprintf_l #define _vftprintf_p _vfwprintf_p #define _vftprintf_p_l _vfwprintf_p_l -#define _vstprintf vswprintf +#define _vstprintf _vswprintf #define _vstprintf_l _vswprintf_l #define _vstprintf_p _vswprintf_p #define _vstprintf_p_l _vswprintf_p_l @@ -178,13 +178,13 @@ extern "C" { #define _vsntprintf _vsnwprintf #define _vsntprintf_l _vsnwprintf_l -#define _tscanf wscanf +#define _tscanf __ms_wscanf #define _tscanf_l _wscanf_l #define _tcscanf _cwscanf #define _tcscanf_l _cwscanf_l -#define _ftscanf fwscanf +#define _ftscanf __ms_fwscanf #define _ftscanf_l _fwscanf_l -#define _stscanf swscanf +#define _stscanf __ms_swscanf #define _stscanf_l _swscanf_l #define _sntscanf _snwscanf #define _sntscanf_l _snwscanf_l @@ -404,6 +404,21 @@ extern "C" { #define _tsetlocale _wsetlocale +#if __MSVCRT_VERSION__ >= 0x800 +#define _fgettc_nolock _fgetwc_nolock +#define _fputtc_nolock _fputwc_nolock +#define _gettc_nolock _getwc_nolock +#define _gettch_nolock _getwch_nolock +#define _gettche_nolock _getwche_nolock +#define _gettchar_nolock _getwchar_nolock +#define _puttc_nolock _putwc_nolock +#define _puttchar_nolock _putwchar_nolock +#define _puttch_nolock _putwch_nolock +#define _ungettc_nolock _ungetwc_nolock +#define _ungettch_nolock _ungetwch_nolock +#define _tgetdcwd_nolock _wgetdcwd_nolock +#endif + #define _tcsclen wcslen #define _tcscnlen wcsnlen #define _tcsclen_l(_String,_Locale) wcslen(_String) @@ -457,6 +472,10 @@ extern "C" { #define _istupper_l _iswupper_l #define _istxdigit iswxdigit #define _istxdigit_l _iswxdigit_l +#define _istblank iswblank +#if __MSVCRT_VERSION__ >= 0xC00 +#define _istblank_l _iswblank_l +#endif /* msvcr120 */ #define _totupper towupper #define _totupper_l _towupper_l @@ -493,7 +512,7 @@ extern "C" { #endif /* __CYGWIN__ */ -#else +#else /* _UNICODE */ #ifdef __cplusplus } @@ -520,7 +539,7 @@ extern "C" { #endif #define __targv __argv -#define _tprintf printf +#define _tprintf __ms_printf #define _tprintf_l _printf_l #define _tprintf_p _printf_p #define _tprintf_p_l _printf_p_l @@ -532,11 +551,11 @@ extern "C" { #define _vtcprintf_l _vcprintf_l #define _vtcprintf_p _vcprintf_p #define _vtcprintf_p_l _vcprintf_p_l -#define _ftprintf fprintf +#define _ftprintf __ms_fprintf #define _ftprintf_l _fprintf_l #define _ftprintf_p _fprintf_p #define _ftprintf_p_l _fprintf_p_l -#define _stprintf sprintf +#define _stprintf __ms_sprintf #define _stprintf_l _sprintf_l #define _stprintf_p _sprintf_p #define _stprintf_p_l _sprintf_p_l @@ -546,15 +565,15 @@ extern "C" { #define _sctprintf_p_l _scprintf_p_l #define _sntprintf _snprintf #define _sntprintf_l _snprintf_l -#define _vtprintf vprintf +#define _vtprintf __ms_vprintf #define _vtprintf_l _vprintf_l #define _vtprintf_p _vprintf_p #define _vtprintf_p_l _vprintf_p_l -#define _vftprintf vfprintf +#define _vftprintf __ms_vfprintf #define _vftprintf_l _vfprintf_l #define _vftprintf_p _vfprintf_p #define _vftprintf_p_l _vfprintf_p_l -#define _vstprintf vsprintf +#define _vstprintf __ms_vsprintf #define _vstprintf_l _vsprintf_l #define _vstprintf_p _vsprintf_p #define _vstprintf_p_l _vsprintf_p_l @@ -565,13 +584,13 @@ extern "C" { #define _vsntprintf _vsnprintf #define _vsntprintf_l _vsnprintf_l -#define _tscanf scanf +#define _tscanf __ms_scanf #define _tscanf_l _scanf_l #define _tcscanf _cscanf #define _tcscanf_l _cscanf_l -#define _ftscanf fscanf +#define _ftscanf __ms_fscanf #define _ftscanf_l _fscanf_l -#define _stscanf sscanf +#define _stscanf __ms_sscanf #define _stscanf_l _sscanf_l #define _sntscanf _snscanf #define _sntscanf_l _snscanf_l @@ -769,18 +788,6 @@ extern "C" { #define _tsetlocale setlocale #if __MSVCRT_VERSION__ >= 0x800 -#define _fgettc_nolock _fgetwc_nolock -#define _fputtc_nolock _fputwc_nolock -#define _gettc_nolock _getwc_nolock -#define _gettch_nolock _getwch_nolock -#define _gettche_nolock _getwche_nolock -#define _gettchar_nolock _getwchar_nolock -#define _puttc_nolock _putwc_nolock -#define _puttchar_nolock _putwchar_nolock -#define _puttch_nolock _putwch_nolock -#define _ungettc_nolock _ungetwc_nolock -#define _ungettch_nolock _ungetwch_nolock -#define _tgetdcwd_nolock _wgetdcwd_nolock #define _fgettc_nolock _fgetc_nolock #define _fputtc_nolock _fputc_nolock #define _gettc_nolock _getc_nolock @@ -997,6 +1004,10 @@ extern "C" { #define _istspace_l _ismbcspace_l #define _istupper _ismbcupper #define _istupper_l _ismbcupper_l +#define _istblank _ismbcblank +#if __MSVCRT_VERSION__ >= 0xC00 +#define _istblank_l _ismbcblank_l +#endif /* msvcr120 */ #define _totupper _mbctoupper #define _totupper_l _mbctoupper_l @@ -1009,7 +1020,7 @@ extern "C" { #endif /* __CYGWIN__ */ -#else +#else /* _MBCS */ #ifndef __TCHAR_DEFINED #define __TCHAR_DEFINED @@ -1134,6 +1145,10 @@ extern "C" { #define _istspace_l _isspace_l #define _istupper isupper #define _istupper_l _isupper_l +#define _istblank isblank +#if __MSVCRT_VERSION__ >= 0xC00 +#define _istblank_l _isblank_l +#endif /* msvcr120 */ #define _totupper toupper #define _totupper_l _toupper_l @@ -1168,9 +1183,9 @@ extern "C" { #define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count)) #define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value)) #endif -#endif +#endif /* _MBCS */ -#endif /* __CYGWIN__ */ +#endif /* _UNICODE */ #define _T(x) __T(x) #define _TEXT(x) __T(x) diff --git a/lib/libc/include/any-windows-any/textstor.h b/lib/libc/include/any-windows-any/textstor.h index bce92a065e42..fff21396f824 100644 --- a/lib/libc/include/any-windows-any/textstor.h +++ b/lib/libc/include/any-windows-any/textstor.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/textstor.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/textstor.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/thumbcache.h b/lib/libc/include/any-windows-any/thumbcache.h index cb1872c9178f..6bf6c4656318 100644 --- a/lib/libc/include/any-windows-any/thumbcache.h +++ b/lib/libc/include/any-windows-any/thumbcache.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/thumbcache.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/thumbcache.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tlbref.h b/lib/libc/include/any-windows-any/tlbref.h index 2f3b6e1424f3..7d285dc2ced8 100644 --- a/lib/libc/include/any-windows-any/tlbref.h +++ b/lib/libc/include/any-windows-any/tlbref.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/tlbref.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/tlbref.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tlogstg.h b/lib/libc/include/any-windows-any/tlogstg.h index e27e02913e9e..26104fe0446d 100644 --- a/lib/libc/include/any-windows-any/tlogstg.h +++ b/lib/libc/include/any-windows-any/tlogstg.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/tlogstg.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/tlogstg.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tpcshrd.h b/lib/libc/include/any-windows-any/tpcshrd.h index da3c5f7e904a..b471a77a793e 100644 --- a/lib/libc/include/any-windows-any/tpcshrd.h +++ b/lib/libc/include/any-windows-any/tpcshrd.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/tpcshrd.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/tpcshrd.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tsvirtualchannels.h b/lib/libc/include/any-windows-any/tsvirtualchannels.h index 6fca09e5746c..7d8339b8ee5d 100644 --- a/lib/libc/include/any-windows-any/tsvirtualchannels.h +++ b/lib/libc/include/any-windows-any/tsvirtualchannels.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/tsvirtualchannels.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/tsvirtualchannels.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/tuner.h b/lib/libc/include/any-windows-any/tuner.h index 1865e8fc2f06..e34cb57c403a 100644 --- a/lib/libc/include/any-windows-any/tuner.h +++ b/lib/libc/include/any-windows-any/tuner.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/tuner.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/tuner.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/uianimation.h b/lib/libc/include/any-windows-any/uianimation.h index cd75b7b7ea8c..df02ca0cd6f3 100644 --- a/lib/libc/include/any-windows-any/uianimation.h +++ b/lib/libc/include/any-windows-any/uianimation.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/uianimation.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/uianimation.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/uiautomationclient.h b/lib/libc/include/any-windows-any/uiautomationclient.h index ebc4f0e4d79e..bff5b3e176c9 100644 --- a/lib/libc/include/any-windows-any/uiautomationclient.h +++ b/lib/libc/include/any-windows-any/uiautomationclient.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/uiautomationclient.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/uiautomationclient.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ @@ -1344,6 +1344,96 @@ DEFINE_GUID(LIBID_UIAutomationClient, 0x944de083, 0x8fb8, 0x45cf, 0xbc,0xb7, 0xc #define UIA_AppBarControlTypeId (50040) #endif /* __UIA_ControlTypeIds_MODULE_DEFINED__ */ +#ifndef __UIA_AnnotationTypes_MODULE_DEFINED__ +#define __UIA_AnnotationTypes_MODULE_DEFINED__ +#define AnnotationType_Unknown (60000) + +#define AnnotationType_SpellingError (60001) + +#define AnnotationType_GrammarError (60002) + +#define AnnotationType_Comment (60003) + +#define AnnotationType_FormulaError (60004) + +#define AnnotationType_TrackChanges (60005) + +#define AnnotationType_Header (60006) + +#define AnnotationType_Footer (60007) + +#define AnnotationType_Highlighted (60008) + +#define AnnotationType_Endnote (60009) + +#define AnnotationType_Footnote (60010) + +#define AnnotationType_InsertionChange (60011) + +#define AnnotationType_DeletionChange (60012) + +#define AnnotationType_MoveChange (60013) + +#define AnnotationType_FormatChange (60014) + +#define AnnotationType_UnsyncedChange (60015) + +#define AnnotationType_EditingLockedChange (60016) + +#define AnnotationType_ExternalChange (60017) + +#define AnnotationType_ConflictingChange (60018) + +#define AnnotationType_Author (60019) + +#define AnnotationType_AdvancedProofingIssue (60020) + +#define AnnotationType_DataValidationError (60021) + +#define AnnotationType_CircularReferenceError (60022) + +#define AnnotationType_Mathematics (60023) + +#define AnnotationType_Sensitive (60024) + +#endif /* __UIA_AnnotationTypes_MODULE_DEFINED__ */ +#ifndef __UIA_StyleIds_MODULE_DEFINED__ +#define __UIA_StyleIds_MODULE_DEFINED__ +#define StyleId_Custom (70000) + +#define StyleId_Heading1 (70001) + +#define StyleId_Heading2 (70002) + +#define StyleId_Heading3 (70003) + +#define StyleId_Heading4 (70004) + +#define StyleId_Heading5 (70005) + +#define StyleId_Heading6 (70006) + +#define StyleId_Heading7 (70007) + +#define StyleId_Heading8 (70008) + +#define StyleId_Heading9 (70009) + +#define StyleId_Title (70010) + +#define StyleId_Subtitle (70011) + +#define StyleId_Normal (70012) + +#define StyleId_Emphasis (70013) + +#define StyleId_Quote (70014) + +#define StyleId_BulletedList (70015) + +#define StyleId_NumberedList (70016) + +#endif /* __UIA_StyleIds_MODULE_DEFINED__ */ #ifndef __UIA_LandmarkTypeIds_MODULE_DEFINED__ #define __UIA_LandmarkTypeIds_MODULE_DEFINED__ #define UIA_CustomLandmarkTypeId (80000) diff --git a/lib/libc/include/any-windows-any/uiautomationcore.h b/lib/libc/include/any-windows-any/uiautomationcore.h index 1e6a1e0e499e..775e5e2504f0 100644 --- a/lib/libc/include/any-windows-any/uiautomationcore.h +++ b/lib/libc/include/any-windows-any/uiautomationcore.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/uiautomationcore.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/uiautomationcore.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/uiviewsettingsinterop.h b/lib/libc/include/any-windows-any/uiviewsettingsinterop.h index 582eed364bd8..eeefdd5b2849 100644 --- a/lib/libc/include/any-windows-any/uiviewsettingsinterop.h +++ b/lib/libc/include/any-windows-any/uiviewsettingsinterop.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/uiviewsettingsinterop.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/uiviewsettingsinterop.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/unknwn.h b/lib/libc/include/any-windows-any/unknwn.h index fd99c861cc2e..a2cc43d23ceb 100644 --- a/lib/libc/include/any-windows-any/unknwn.h +++ b/lib/libc/include/any-windows-any/unknwn.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/unknwn.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/unknwn.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/unknwnbase.h b/lib/libc/include/any-windows-any/unknwnbase.h index 8962d7723c63..b587289d1c83 100644 --- a/lib/libc/include/any-windows-any/unknwnbase.h +++ b/lib/libc/include/any-windows-any/unknwnbase.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/unknwnbase.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/unknwnbase.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/urlhist.h b/lib/libc/include/any-windows-any/urlhist.h index 93eea689789f..5dc1ad9fd5fc 100644 --- a/lib/libc/include/any-windows-any/urlhist.h +++ b/lib/libc/include/any-windows-any/urlhist.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/urlhist.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/urlhist.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/urlmon.h b/lib/libc/include/any-windows-any/urlmon.h index 89f36f5c16d2..015c7342dbc9 100644 --- a/lib/libc/include/any-windows-any/urlmon.h +++ b/lib/libc/include/any-windows-any/urlmon.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/urlmon.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/urlmon.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vdslun.h b/lib/libc/include/any-windows-any/vdslun.h index 66a6bd641795..409e74f03c2e 100644 --- a/lib/libc/include/any-windows-any/vdslun.h +++ b/lib/libc/include/any-windows-any/vdslun.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vdslun.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vdslun.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vidcap.h b/lib/libc/include/any-windows-any/vidcap.h index 226fb8f7684f..38dda1ad1fce 100644 --- a/lib/libc/include/any-windows-any/vidcap.h +++ b/lib/libc/include/any-windows-any/vidcap.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vidcap.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vidcap.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vmr9.h b/lib/libc/include/any-windows-any/vmr9.h index e991e2dbf7ce..c968813984c9 100644 --- a/lib/libc/include/any-windows-any/vmr9.h +++ b/lib/libc/include/any-windows-any/vmr9.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vmr9.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vmr9.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vsadmin.h b/lib/libc/include/any-windows-any/vsadmin.h index f093a0cfa48e..54627433c621 100644 --- a/lib/libc/include/any-windows-any/vsadmin.h +++ b/lib/libc/include/any-windows-any/vsadmin.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vsadmin.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vsadmin.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vsbackup.h b/lib/libc/include/any-windows-any/vsbackup.h index 401a8f70d98e..7c62b7457e57 100644 --- a/lib/libc/include/any-windows-any/vsbackup.h +++ b/lib/libc/include/any-windows-any/vsbackup.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vsbackup.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vsbackup.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vsmgmt.h b/lib/libc/include/any-windows-any/vsmgmt.h index 4f920fe98c9f..14eadea44e97 100644 --- a/lib/libc/include/any-windows-any/vsmgmt.h +++ b/lib/libc/include/any-windows-any/vsmgmt.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vsmgmt.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vsmgmt.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vsprov.h b/lib/libc/include/any-windows-any/vsprov.h index 428e1fbd367a..54d5de6f4518 100644 --- a/lib/libc/include/any-windows-any/vsprov.h +++ b/lib/libc/include/any-windows-any/vsprov.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vsprov.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vsprov.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vss.h b/lib/libc/include/any-windows-any/vss.h index 5a50809107a7..c6e9e1f9e9eb 100644 --- a/lib/libc/include/any-windows-any/vss.h +++ b/lib/libc/include/any-windows-any/vss.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vss.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vss.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/vswriter.h b/lib/libc/include/any-windows-any/vswriter.h index edd2e866741b..814a3c011ad9 100644 --- a/lib/libc/include/any-windows-any/vswriter.h +++ b/lib/libc/include/any-windows-any/vswriter.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/vswriter.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/vswriter.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wbemads.h b/lib/libc/include/any-windows-any/wbemads.h index bc415195a812..994f3cf96338 100644 --- a/lib/libc/include/any-windows-any/wbemads.h +++ b/lib/libc/include/any-windows-any/wbemads.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wbemads.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wbemads.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wbemcli.h b/lib/libc/include/any-windows-any/wbemcli.h index 6a27d3e704d6..1f5d7ba70be2 100644 --- a/lib/libc/include/any-windows-any/wbemcli.h +++ b/lib/libc/include/any-windows-any/wbemcli.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wbemcli.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wbemcli.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wbemdisp.h b/lib/libc/include/any-windows-any/wbemdisp.h index be844e17e861..9ee50d7909bf 100644 --- a/lib/libc/include/any-windows-any/wbemdisp.h +++ b/lib/libc/include/any-windows-any/wbemdisp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wbemdisp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wbemdisp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wbemprov.h b/lib/libc/include/any-windows-any/wbemprov.h index 83298a2970f1..11718bd70d04 100644 --- a/lib/libc/include/any-windows-any/wbemprov.h +++ b/lib/libc/include/any-windows-any/wbemprov.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wbemprov.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wbemprov.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wbemtran.h b/lib/libc/include/any-windows-any/wbemtran.h index 343c69e2277a..7f3f61de7af8 100644 --- a/lib/libc/include/any-windows-any/wbemtran.h +++ b/lib/libc/include/any-windows-any/wbemtran.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wbemtran.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wbemtran.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wchar.h b/lib/libc/include/any-windows-any/wchar.h index 6aa1daf995d2..ca2c1fc70cb3 100644 --- a/lib/libc/include/any-windows-any/wchar.h +++ b/lib/libc/include/any-windows-any/wchar.h @@ -213,8 +213,9 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); wint_t __cdecl towupper(wint_t _C); wint_t __cdecl towlower(wint_t _C); int __cdecl iswctype(wint_t _C,wctype_t _Type); -#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x700 && _WIN32_WINNT >= 0x0600) - /* These are available since msvcr80.dll, and in msvcrt.dll since Vista. */ +#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) + /* These are available since msvcr80.dll (__MSVCRT_VERSION__ >= 0x800), and in + * msvcrt.dll (__MSVCRT_VERSION__ == 0x600) since Vista (_WIN32_WINNT >= 0x0600). */ _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale); _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale); _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale); @@ -253,10 +254,23 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); #ifndef _WDIRECT_DEFINED #define _WDIRECT_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wgetcwd") +#undef _wgetcwd +#pragma push_macro("_wgetdcwd") +#undef _wgetdcwd +#pragma push_macro("_wgetdcwd_nolock") +#undef _wgetdcwd_nolock +#endif _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); #if __MSVCRT_VERSION__ >= 0x800 wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords); +#endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wgetcwd") +#pragma pop_macro("_wgetdcwd") +#pragma pop_macro("_wgetdcwd_nolock") #endif _CRTIMP int __cdecl _wchdir(const wchar_t *_Path); _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path); @@ -336,7 +350,7 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT)) #define iswcntrl(_c) (iswctype(_c,_CONTROL)) #define iswascii(_c) ((unsigned)(_c) < 0x80) -#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x700 && _WIN32_WINNT >= 0x0600) +#if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) # define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p)) # define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p)) # define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p)) @@ -452,10 +466,10 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); -/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); -/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __mingw_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...); +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list); /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) int __cdecl __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); @@ -472,10 +486,10 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); int __cdecl __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); /*__attribute__((__format__ (ms_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1) int __cdecl __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); -/* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); -/* __attribute__((__format__ (ms_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) - int __cdecl __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +/* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __ms_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...); +/* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) + int __cdecl __ms_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list); #ifdef _UCRT int __cdecl __stdio_common_vswprintf(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist); @@ -533,7 +547,16 @@ __MINGW_ASM_CALL(__mingw_vfwprintf); int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) __MINGW_ASM_CALL(__mingw_vwprintf); -/*#ifndef __NO_ISOCEXT */ /* externs in libmingwex.a */ +/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) +int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) +__MINGW_ASM_CALL(__mingw_swprintf); + +/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) +int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +__MINGW_ASM_CALL(__mingw_vswprintf); + +#ifndef __NO_ISOCEXT /* externs in libmingwex.a */ + /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) __MINGW_ASM_CALL(__mingw_snwprintf); @@ -541,7 +564,9 @@ __MINGW_ASM_CALL(__mingw_snwprintf); /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) __MINGW_ASM_CALL(__mingw_vsnwprintf); -/* #endif */ /* __NO_ISOCEXT */ + +#endif /* __NO_ISOCEXT */ + #else /* !__USE_MINGW_ANSI_STDIO */ #ifdef _UCRT @@ -616,6 +641,44 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); { return __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, _Format, NULL, _ArgList); } + + __mingw_ovr + int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) + { + __builtin_va_list __ap; + int __ret; + /* + * __stdio_common_vswprintf() for case _Dest == NULL and _Count == 0 and + * without _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR option, is + * executed in "standard snprintf behavior" and returns number of (wide) + * chars required to allocate. For all other cases it is executed in a way + * that returns negative value on error. But C95+ compliant swprintf() for + * case _Count == 0 returns negative value, so handle this case specially. + */ + if (_Dest == NULL && _Count == 0) + return -1; + __builtin_va_start(__ap, _Format); + __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, _Count, _Format, NULL, __ap); + __builtin_va_end(__ap); + return __ret < 0 ? -1 : __ret; + } + __mingw_ovr + int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) + { + int __ret; + /* + * __stdio_common_vswprintf() for case _Dest == NULL and _Count == 0 and + * without _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR option, is + * executed in "standard snprintf behavior" and returns number of (wide) + * chars required to allocate. For all other cases it is executed in a way + * that returns negative value on error. But C95+ compliant vswprintf() for + * case _Count == 0 returns negative value, so handle this case specially. + */ + if (_Dest == NULL && _Count == 0) + return -1; + __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, _Count, _Format, NULL, _Args); + return __ret < 0 ? -1 : __ret; + } #else int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; @@ -652,6 +715,9 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); int __cdecl wprintf(const wchar_t * __restrict__ _Format,...); int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + + int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...); + int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args); #endif /* _UCRT */ #endif /* __USE_MINGW_ANSI_STDIO */ @@ -707,12 +773,12 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); __builtin_va_start(__ap, format); __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, s, n, format, NULL, __ap); __builtin_va_end(__ap); - return __ret; + return __ret < 0 ? -1 : __ret; } __mingw_ovr int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) { - int __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, s, n, format, NULL, arg); + int __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, s, n, format, NULL, arg); return __ret < 0 ? -1 : __ret; } #endif @@ -734,21 +800,8 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); # undef vsnwprintf int __cdecl __ms_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); int __cdecl __ms_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); - __mingw_ovr - int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) - { - int r; - va_list argp; - __builtin_va_start (argp, format); - r = _vsnwprintf (s, n, format, argp); - __builtin_va_end (argp); - return r; - } - __mingw_ovr - int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) - { - return _vsnwprintf(s,n,format,arg); - } + int __cdecl snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...) __MINGW_ASM_CALL(__ms_snwprintf); + int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg) __MINGW_ASM_CALL(__ms_vsnwprintf); #pragma pop_macro ("vsnwprintf") #pragma pop_macro ("snwprintf") #endif @@ -1078,7 +1131,15 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); #endif #endif +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wtempnam") +#undef _wtempnam +#endif _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wtempnam") +#endif + #ifndef _UCRT _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); @@ -1184,7 +1245,14 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); #ifndef _POSIX_ #ifndef _WSTDLIBP_DEFINED #define _WSTDLIBP_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wfullpath") +#undef _wfullpath +#endif _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wfullpath") +#endif _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); #ifndef _CRT_WPERROR_DEFINED #define _CRT_WPERROR_DEFINED @@ -1198,7 +1266,14 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); #ifndef _WSTRING_DEFINED #define _WSTRING_DEFINED +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("_wcsdup") +#undef _wcsdup +#endif _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str); +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("_wcsdup") +#endif wchar_t *__cdecl wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch); int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); @@ -1247,7 +1322,14 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); #ifndef NO_OLDNAMES +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma push_macro("wcsdup") +#undef wcsdup +#endif wchar_t *__cdecl wcsdup(const wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005; +#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) +#pragma pop_macro("wcsdup") +#endif #define wcswcs wcsstr int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005; int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005; diff --git a/lib/libc/include/any-windows-any/wdstptmgmt.h b/lib/libc/include/any-windows-any/wdstptmgmt.h index e13f9727b378..0e73ec654024 100644 --- a/lib/libc/include/any-windows-any/wdstptmgmt.h +++ b/lib/libc/include/any-windows-any/wdstptmgmt.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wdstptmgmt.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wdstptmgmt.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/weakreference.h b/lib/libc/include/any-windows-any/weakreference.h index 8b82722b065d..de9c7bec4ff6 100644 --- a/lib/libc/include/any-windows-any/weakreference.h +++ b/lib/libc/include/any-windows-any/weakreference.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/weakreference.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/weakreference.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wia.h b/lib/libc/include/any-windows-any/wia.h index d3d79ad2c942..3a0497e6d838 100644 --- a/lib/libc/include/any-windows-any/wia.h +++ b/lib/libc/include/any-windows-any/wia.h @@ -1,1035 +1,28 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. +/* + * Copyright (C) 2009 Damjan Jovanovic + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 475 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error This stub requires an updated version of -#endif - -#ifndef COM_NO_WINDOWS_H -#include "windows.h" -#include "ole2.h" -#endif - -#ifndef __wia_h__ -#define __wia_h__ - -#ifndef __IWiaDevMgr_FWD_DEFINED__ -#define __IWiaDevMgr_FWD_DEFINED__ -typedef struct IWiaDevMgr IWiaDevMgr; -#endif - -#ifndef __IEnumWIA_DEV_INFO_FWD_DEFINED__ -#define __IEnumWIA_DEV_INFO_FWD_DEFINED__ -typedef struct IEnumWIA_DEV_INFO IEnumWIA_DEV_INFO; -#endif - -#ifndef __IWiaEventCallback_FWD_DEFINED__ -#define __IWiaEventCallback_FWD_DEFINED__ -typedef struct IWiaEventCallback IWiaEventCallback; -#endif - -#ifndef __IWiaDataCallback_FWD_DEFINED__ -#define __IWiaDataCallback_FWD_DEFINED__ -typedef struct IWiaDataCallback IWiaDataCallback; -#endif - -#ifndef __IWiaDataTransfer_FWD_DEFINED__ -#define __IWiaDataTransfer_FWD_DEFINED__ -typedef struct IWiaDataTransfer IWiaDataTransfer; -#endif - -#ifndef __IWiaItem_FWD_DEFINED__ -#define __IWiaItem_FWD_DEFINED__ -typedef struct IWiaItem IWiaItem; -#endif - -#ifndef __IWiaPropertyStorage_FWD_DEFINED__ -#define __IWiaPropertyStorage_FWD_DEFINED__ -typedef struct IWiaPropertyStorage IWiaPropertyStorage; -#endif - -#ifndef __IEnumWiaItem_FWD_DEFINED__ -#define __IEnumWiaItem_FWD_DEFINED__ -typedef struct IEnumWiaItem IEnumWiaItem; -#endif - -#ifndef __IEnumWIA_DEV_CAPS_FWD_DEFINED__ -#define __IEnumWIA_DEV_CAPS_FWD_DEFINED__ -typedef struct IEnumWIA_DEV_CAPS IEnumWIA_DEV_CAPS; -#endif - -#ifndef __IEnumWIA_FORMAT_INFO_FWD_DEFINED__ -#define __IEnumWIA_FORMAT_INFO_FWD_DEFINED__ -typedef struct IEnumWIA_FORMAT_INFO IEnumWIA_FORMAT_INFO; -#endif - -#ifndef __IWiaLog_FWD_DEFINED__ -#define __IWiaLog_FWD_DEFINED__ -typedef struct IWiaLog IWiaLog; -#endif - -#ifndef __IWiaLogEx_FWD_DEFINED__ -#define __IWiaLogEx_FWD_DEFINED__ -typedef struct IWiaLogEx IWiaLogEx; -#endif -#ifndef __IWiaNotifyDevMgr_FWD_DEFINED__ -#define __IWiaNotifyDevMgr_FWD_DEFINED__ -typedef struct IWiaNotifyDevMgr IWiaNotifyDevMgr; -#endif - -#ifndef __IWiaItemExtras_FWD_DEFINED__ -#define __IWiaItemExtras_FWD_DEFINED__ -typedef struct IWiaItemExtras IWiaItemExtras; -#endif - -#ifndef __WiaDevMgr_FWD_DEFINED__ -#define __WiaDevMgr_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class WiaDevMgr WiaDevMgr; -#else -typedef struct WiaDevMgr WiaDevMgr; -#endif -#endif - -#ifndef __WiaLog_FWD_DEFINED__ -#define __WiaLog_FWD_DEFINED__ -#ifdef __cplusplus -typedef class WiaLog WiaLog; -#else -typedef struct WiaLog WiaLog; +#ifdef __WINESRC__ +#error Specify wia_lh.h or wia_xp.h explicitly in Wine #endif -#endif - -#include "unknwn.h" -#include "oaidl.h" -#include "propidl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __MIDL_user_allocate_free_DEFINED__ -#define __MIDL_user_allocate_free_DEFINED__ - void *__RPC_API MIDL_user_allocate(size_t); - void __RPC_API MIDL_user_free(void *); -#endif - - typedef struct _WIA_DITHER_PATTERN_DATA { - LONG lSize; - BSTR bstrPatternName; - LONG lPatternWidth; - LONG lPatternLength; - LONG cbPattern; - BYTE *pbPattern; - } WIA_DITHER_PATTERN_DATA; - - typedef struct _WIA_DITHER_PATTERN_DATA *PWIA_DITHER_PATTERN_DATA; - typedef struct _WIA_PROPID_TO_NAME { - PROPID propid; - LPOLESTR pszName; - } WIA_PROPID_TO_NAME; - - typedef struct _WIA_PROPID_TO_NAME *PWIA_PROPID_TO_NAME; - - typedef struct _WIA_FORMAT_INFO { - GUID guidFormatID; - LONG lTymed; - } WIA_FORMAT_INFO; - - typedef struct _WIA_FORMAT_INFO *PWIA_FORMAT_INFO; - -#include "wiadef.h" - - extern RPC_IF_HANDLE __MIDL_itf_wia_0000_v0_0_c_ifspec; - extern RPC_IF_HANDLE __MIDL_itf_wia_0000_v0_0_s_ifspec; -#ifndef __IWiaDevMgr_INTERFACE_DEFINED__ -#define __IWiaDevMgr_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaDevMgr; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaDevMgr : public IUnknown { - public: - virtual HRESULT WINAPI EnumDeviceInfo(LONG lFlag,IEnumWIA_DEV_INFO **ppIEnum) = 0; - virtual HRESULT WINAPI CreateDevice(BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot) = 0; - virtual HRESULT WINAPI SelectDeviceDlg(HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot) = 0; - virtual HRESULT WINAPI SelectDeviceDlgID(HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID) = 0; - virtual HRESULT WINAPI GetImageDlg(HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat) = 0; - virtual HRESULT WINAPI RegisterEventCallbackProgram(LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) = 0; - virtual HRESULT WINAPI RegisterEventCallbackInterface(LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject) = 0; - virtual HRESULT WINAPI RegisterEventCallbackCLSID(LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) = 0; - virtual HRESULT WINAPI AddDeviceDlg(HWND hwndParent,LONG lFlags) = 0; - }; -#else - typedef struct IWiaDevMgrVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaDevMgr *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaDevMgr *This); - ULONG (WINAPI *Release)(IWiaDevMgr *This); - HRESULT (WINAPI *EnumDeviceInfo)(IWiaDevMgr *This,LONG lFlag,IEnumWIA_DEV_INFO **ppIEnum); - HRESULT (WINAPI *CreateDevice)(IWiaDevMgr *This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot); - HRESULT (WINAPI *SelectDeviceDlg)(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot); - HRESULT (WINAPI *SelectDeviceDlgID)(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID); - HRESULT (WINAPI *GetImageDlg)(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat); - HRESULT (WINAPI *RegisterEventCallbackProgram)(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT (WINAPI *RegisterEventCallbackInterface)(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject); - HRESULT (WINAPI *RegisterEventCallbackCLSID)(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT (WINAPI *AddDeviceDlg)(IWiaDevMgr *This,HWND hwndParent,LONG lFlags); - END_INTERFACE - } IWiaDevMgrVtbl; - struct IWiaDevMgr { - CONST_VTBL struct IWiaDevMgrVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaDevMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaDevMgr_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaDevMgr_Release(This) (This)->lpVtbl->Release(This) -#define IWiaDevMgr_EnumDeviceInfo(This,lFlag,ppIEnum) (This)->lpVtbl->EnumDeviceInfo(This,lFlag,ppIEnum) -#define IWiaDevMgr_CreateDevice(This,bstrDeviceID,ppWiaItemRoot) (This)->lpVtbl->CreateDevice(This,bstrDeviceID,ppWiaItemRoot) -#define IWiaDevMgr_SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) (This)->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) -#define IWiaDevMgr_SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) (This)->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) -#define IWiaDevMgr_GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) (This)->lpVtbl->GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) -#define IWiaDevMgr_RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) -#define IWiaDevMgr_RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) (This)->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) -#define IWiaDevMgr_RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) -#define IWiaDevMgr_AddDeviceDlg(This,hwndParent,lFlags) (This)->lpVtbl->AddDeviceDlg(This,hwndParent,lFlags) -#endif -#endif - HRESULT WINAPI IWiaDevMgr_EnumDeviceInfo_Proxy(IWiaDevMgr *This,LONG lFlag,IEnumWIA_DEV_INFO **ppIEnum); - void __RPC_STUB IWiaDevMgr_EnumDeviceInfo_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalCreateDevice_Proxy(IWiaDevMgr *This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot); - void __RPC_STUB IWiaDevMgr_LocalCreateDevice_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalSelectDeviceDlg_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot); - void __RPC_STUB IWiaDevMgr_LocalSelectDeviceDlg_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalSelectDeviceDlgID_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID); - void __RPC_STUB IWiaDevMgr_LocalSelectDeviceDlgID_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalGetImageDlg_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat); - void __RPC_STUB IWiaDevMgr_LocalGetImageDlg_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalRegisterEventCallbackProgram_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - void __RPC_STUB IWiaDevMgr_LocalRegisterEventCallbackProgram_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalRegisterEventCallbackInterface_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject); - void __RPC_STUB IWiaDevMgr_LocalRegisterEventCallbackInterface_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_LocalRegisterEventCallbackCLSID_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - void __RPC_STUB IWiaDevMgr_LocalRegisterEventCallbackCLSID_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDevMgr_AddDeviceDlg_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lFlags); - void __RPC_STUB IWiaDevMgr_AddDeviceDlg_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ -#define __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IEnumWIA_DEV_INFO; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IEnumWIA_DEV_INFO : public IUnknown { - public: - virtual HRESULT WINAPI Next(ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched) = 0; - virtual HRESULT WINAPI Skip(ULONG celt) = 0; - virtual HRESULT WINAPI Reset(void) = 0; - virtual HRESULT WINAPI Clone(IEnumWIA_DEV_INFO **ppIEnum) = 0; - virtual HRESULT WINAPI GetCount(ULONG *celt) = 0; - }; -#else - typedef struct IEnumWIA_DEV_INFOVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEnumWIA_DEV_INFO *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IEnumWIA_DEV_INFO *This); - ULONG (WINAPI *Release)(IEnumWIA_DEV_INFO *This); - HRESULT (WINAPI *Next)(IEnumWIA_DEV_INFO *This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched); - HRESULT (WINAPI *Skip)(IEnumWIA_DEV_INFO *This,ULONG celt); - HRESULT (WINAPI *Reset)(IEnumWIA_DEV_INFO *This); - HRESULT (WINAPI *Clone)(IEnumWIA_DEV_INFO *This,IEnumWIA_DEV_INFO **ppIEnum); - HRESULT (WINAPI *GetCount)(IEnumWIA_DEV_INFO *This,ULONG *celt); - END_INTERFACE - } IEnumWIA_DEV_INFOVtbl; - struct IEnumWIA_DEV_INFO { - CONST_VTBL struct IEnumWIA_DEV_INFOVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IEnumWIA_DEV_INFO_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IEnumWIA_DEV_INFO_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IEnumWIA_DEV_INFO_Release(This) (This)->lpVtbl->Release(This) -#define IEnumWIA_DEV_INFO_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) -#define IEnumWIA_DEV_INFO_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) -#define IEnumWIA_DEV_INFO_Reset(This) (This)->lpVtbl->Reset(This) -#define IEnumWIA_DEV_INFO_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) -#define IEnumWIA_DEV_INFO_GetCount(This,celt) (This)->lpVtbl->GetCount(This,celt) -#endif -#endif - HRESULT WINAPI IEnumWIA_DEV_INFO_RemoteNext_Proxy(IEnumWIA_DEV_INFO *This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched); - void __RPC_STUB IEnumWIA_DEV_INFO_RemoteNext_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_INFO_Skip_Proxy(IEnumWIA_DEV_INFO *This,ULONG celt); - void __RPC_STUB IEnumWIA_DEV_INFO_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_INFO_Reset_Proxy(IEnumWIA_DEV_INFO *This); - void __RPC_STUB IEnumWIA_DEV_INFO_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_INFO_Clone_Proxy(IEnumWIA_DEV_INFO *This,IEnumWIA_DEV_INFO **ppIEnum); - void __RPC_STUB IEnumWIA_DEV_INFO_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_INFO_GetCount_Proxy(IEnumWIA_DEV_INFO *This,ULONG *celt); - void __RPC_STUB IEnumWIA_DEV_INFO_GetCount_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaEventCallback_INTERFACE_DEFINED__ -#define __IWiaEventCallback_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaEventCallback; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaEventCallback : public IUnknown { - public: - virtual HRESULT WINAPI ImageEventCallback(const GUID *pEventGUID,BSTR bstrEventDescription,BSTR bstrDeviceID,BSTR bstrDeviceDescription,DWORD dwDeviceType,BSTR bstrFullItemName,ULONG *pulEventType,ULONG ulReserved) = 0; - }; -#else - typedef struct IWiaEventCallbackVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaEventCallback *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaEventCallback *This); - ULONG (WINAPI *Release)(IWiaEventCallback *This); - HRESULT (WINAPI *ImageEventCallback)(IWiaEventCallback *This,const GUID *pEventGUID,BSTR bstrEventDescription,BSTR bstrDeviceID,BSTR bstrDeviceDescription,DWORD dwDeviceType,BSTR bstrFullItemName,ULONG *pulEventType,ULONG ulReserved); - END_INTERFACE - } IWiaEventCallbackVtbl; - struct IWiaEventCallback { - CONST_VTBL struct IWiaEventCallbackVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaEventCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaEventCallback_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaEventCallback_Release(This) (This)->lpVtbl->Release(This) -#define IWiaEventCallback_ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) (This)->lpVtbl->ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) -#endif -#endif - HRESULT WINAPI IWiaEventCallback_ImageEventCallback_Proxy(IWiaEventCallback *This,const GUID *pEventGUID,BSTR bstrEventDescription,BSTR bstrDeviceID,BSTR bstrDeviceDescription,DWORD dwDeviceType,BSTR bstrFullItemName,ULONG *pulEventType,ULONG ulReserved); - void __RPC_STUB IWiaEventCallback_ImageEventCallback_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - - typedef struct _WIA_DATA_CALLBACK_HEADER { - LONG lSize; - GUID guidFormatID; - LONG lBufferSize; - LONG lPageCount; - } WIA_DATA_CALLBACK_HEADER; - - typedef struct _WIA_DATA_CALLBACK_HEADER *PWIA_DATA_CALLBACK_HEADER; - - extern RPC_IF_HANDLE __MIDL_itf_wia_0125_v0_0_c_ifspec; - extern RPC_IF_HANDLE __MIDL_itf_wia_0125_v0_0_s_ifspec; -#ifndef __IWiaDataCallback_INTERFACE_DEFINED__ -#define __IWiaDataCallback_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaDataCallback; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaDataCallback : public IUnknown { - public: - virtual HRESULT WINAPI BandedDataCallback(LONG lMessage,LONG lStatus,LONG lPercentComplete,LONG lOffset,LONG lLength,LONG lReserved,LONG lResLength,BYTE *pbBuffer) = 0; - }; -#else - typedef struct IWiaDataCallbackVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaDataCallback *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaDataCallback *This); - ULONG (WINAPI *Release)(IWiaDataCallback *This); - HRESULT (WINAPI *BandedDataCallback)(IWiaDataCallback *This,LONG lMessage,LONG lStatus,LONG lPercentComplete,LONG lOffset,LONG lLength,LONG lReserved,LONG lResLength,BYTE *pbBuffer); - END_INTERFACE - } IWiaDataCallbackVtbl; - struct IWiaDataCallback { - CONST_VTBL struct IWiaDataCallbackVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaDataCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaDataCallback_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaDataCallback_Release(This) (This)->lpVtbl->Release(This) -#define IWiaDataCallback_BandedDataCallback(This,lMessage,lStatus,lPercentComplete,lOffset,lLength,lReserved,lResLength,pbBuffer) (This)->lpVtbl->BandedDataCallback(This,lMessage,lStatus,lPercentComplete,lOffset,lLength,lReserved,lResLength,pbBuffer) -#endif -#endif - HRESULT WINAPI IWiaDataCallback_RemoteBandedDataCallback_Proxy(IWiaDataCallback *This,LONG lMessage,LONG lStatus,LONG lPercentComplete,LONG lOffset,LONG lLength,LONG lReserved,LONG lResLength,BYTE *pbBuffer); - void __RPC_STUB IWiaDataCallback_RemoteBandedDataCallback_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - - typedef struct _WIA_DATA_TRANSFER_INFO { - ULONG ulSize; - ULONG ulSection; - ULONG ulBufferSize; - WINBOOL bDoubleBuffer; - ULONG ulReserved1; - ULONG ulReserved2; - ULONG ulReserved3; - } WIA_DATA_TRANSFER_INFO; - - typedef struct _WIA_DATA_TRANSFER_INFO *PWIA_DATA_TRANSFER_INFO; - - typedef struct _WIA_EXTENDED_TRANSFER_INFO { - ULONG ulSize; - ULONG ulMinBufferSize; - ULONG ulOptimalBufferSize; - ULONG ulMaxBufferSize; - ULONG ulNumBuffers; - } WIA_EXTENDED_TRANSFER_INFO; - - typedef struct _WIA_EXTENDED_TRANSFER_INFO *PWIA_EXTENDED_TRANSFER_INFO; - - extern RPC_IF_HANDLE __MIDL_itf_wia_0126_v0_0_c_ifspec; - extern RPC_IF_HANDLE __MIDL_itf_wia_0126_v0_0_s_ifspec; -#ifndef __IWiaDataTransfer_INTERFACE_DEFINED__ -#define __IWiaDataTransfer_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaDataTransfer; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaDataTransfer : public IUnknown { - public: - virtual HRESULT WINAPI idtGetData(LPSTGMEDIUM pMedium,IWiaDataCallback *pIWiaDataCallback) = 0; - virtual HRESULT WINAPI idtGetBandedData(PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,IWiaDataCallback *pIWiaDataCallback) = 0; - virtual HRESULT WINAPI idtQueryGetData(WIA_FORMAT_INFO *pfe) = 0; - virtual HRESULT WINAPI idtEnumWIA_FORMAT_INFO(IEnumWIA_FORMAT_INFO **ppEnum) = 0; - virtual HRESULT WINAPI idtGetExtendedTransferInfo(PWIA_EXTENDED_TRANSFER_INFO pExtendedTransferInfo) = 0; - }; -#else - typedef struct IWiaDataTransferVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaDataTransfer *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaDataTransfer *This); - ULONG (WINAPI *Release)(IWiaDataTransfer *This); - HRESULT (WINAPI *idtGetData)(IWiaDataTransfer *This,LPSTGMEDIUM pMedium,IWiaDataCallback *pIWiaDataCallback); - HRESULT (WINAPI *idtGetBandedData)(IWiaDataTransfer *This,PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,IWiaDataCallback *pIWiaDataCallback); - HRESULT (WINAPI *idtQueryGetData)(IWiaDataTransfer *This,WIA_FORMAT_INFO *pfe); - HRESULT (WINAPI *idtEnumWIA_FORMAT_INFO)(IWiaDataTransfer *This,IEnumWIA_FORMAT_INFO **ppEnum); - HRESULT (WINAPI *idtGetExtendedTransferInfo)(IWiaDataTransfer *This,PWIA_EXTENDED_TRANSFER_INFO pExtendedTransferInfo); - END_INTERFACE - } IWiaDataTransferVtbl; - struct IWiaDataTransfer { - CONST_VTBL struct IWiaDataTransferVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaDataTransfer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaDataTransfer_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaDataTransfer_Release(This) (This)->lpVtbl->Release(This) -#define IWiaDataTransfer_idtGetData(This,pMedium,pIWiaDataCallback) (This)->lpVtbl->idtGetData(This,pMedium,pIWiaDataCallback) -#define IWiaDataTransfer_idtGetBandedData(This,pWiaDataTransInfo,pIWiaDataCallback) (This)->lpVtbl->idtGetBandedData(This,pWiaDataTransInfo,pIWiaDataCallback) -#define IWiaDataTransfer_idtQueryGetData(This,pfe) (This)->lpVtbl->idtQueryGetData(This,pfe) -#define IWiaDataTransfer_idtEnumWIA_FORMAT_INFO(This,ppEnum) (This)->lpVtbl->idtEnumWIA_FORMAT_INFO(This,ppEnum) -#define IWiaDataTransfer_idtGetExtendedTransferInfo(This,pExtendedTransferInfo) (This)->lpVtbl->idtGetExtendedTransferInfo(This,pExtendedTransferInfo) -#endif -#endif - HRESULT WINAPI IWiaDataTransfer_idtGetDataEx_Proxy(IWiaDataTransfer *This,LPSTGMEDIUM pMedium,IWiaDataCallback *pIWiaDataCallback); - void __RPC_STUB IWiaDataTransfer_idtGetDataEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDataTransfer_idtGetBandedDataEx_Proxy(IWiaDataTransfer *This,PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,IWiaDataCallback *pIWiaDataCallback); - void __RPC_STUB IWiaDataTransfer_idtGetBandedDataEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDataTransfer_idtQueryGetData_Proxy(IWiaDataTransfer *This,WIA_FORMAT_INFO *pfe); - void __RPC_STUB IWiaDataTransfer_idtQueryGetData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDataTransfer_idtEnumWIA_FORMAT_INFO_Proxy(IWiaDataTransfer *This,IEnumWIA_FORMAT_INFO **ppEnum); - void __RPC_STUB IWiaDataTransfer_idtEnumWIA_FORMAT_INFO_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaDataTransfer_idtGetExtendedTransferInfo_Proxy(IWiaDataTransfer *This,PWIA_EXTENDED_TRANSFER_INFO pExtendedTransferInfo); - void __RPC_STUB IWiaDataTransfer_idtGetExtendedTransferInfo_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaItem_INTERFACE_DEFINED__ -#define __IWiaItem_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaItem; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaItem : public IUnknown { - public: - virtual HRESULT WINAPI GetItemType(LONG *pItemType) = 0; - virtual HRESULT WINAPI AnalyzeItem(LONG lFlags) = 0; - virtual HRESULT WINAPI EnumChildItems(IEnumWiaItem **ppIEnumWiaItem) = 0; - virtual HRESULT WINAPI DeleteItem(LONG lFlags) = 0; - virtual HRESULT WINAPI CreateChildItem(LONG lFlags,BSTR bstrItemName,BSTR bstrFullItemName,IWiaItem **ppIWiaItem) = 0; - virtual HRESULT WINAPI EnumRegisterEventInfo(LONG lFlags,const GUID *pEventGUID,IEnumWIA_DEV_CAPS **ppIEnum) = 0; - virtual HRESULT WINAPI FindItemByName(LONG lFlags,BSTR bstrFullItemName,IWiaItem **ppIWiaItem) = 0; - virtual HRESULT WINAPI DeviceDlg(HWND hwndParent,LONG lFlags,LONG lIntent,LONG *plItemCount,IWiaItem ***ppIWiaItem) = 0; - virtual HRESULT WINAPI DeviceCommand(LONG lFlags,const GUID *pCmdGUID,IWiaItem **pIWiaItem) = 0; - virtual HRESULT WINAPI GetRootItem(IWiaItem **ppIWiaItem) = 0; - virtual HRESULT WINAPI EnumDeviceCapabilities(LONG lFlags,IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS) = 0; - virtual HRESULT WINAPI DumpItemData(BSTR *bstrData) = 0; - virtual HRESULT WINAPI DumpDrvItemData(BSTR *bstrData) = 0; - virtual HRESULT WINAPI DumpTreeItemData(BSTR *bstrData) = 0; - virtual HRESULT WINAPI Diagnostic(ULONG ulSize,BYTE *pBuffer) = 0; - }; -#else - typedef struct IWiaItemVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaItem *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaItem *This); - ULONG (WINAPI *Release)(IWiaItem *This); - HRESULT (WINAPI *GetItemType)(IWiaItem *This,LONG *pItemType); - HRESULT (WINAPI *AnalyzeItem)(IWiaItem *This,LONG lFlags); - HRESULT (WINAPI *EnumChildItems)(IWiaItem *This,IEnumWiaItem **ppIEnumWiaItem); - HRESULT (WINAPI *DeleteItem)(IWiaItem *This,LONG lFlags); - HRESULT (WINAPI *CreateChildItem)(IWiaItem *This,LONG lFlags,BSTR bstrItemName,BSTR bstrFullItemName,IWiaItem **ppIWiaItem); - HRESULT (WINAPI *EnumRegisterEventInfo)(IWiaItem *This,LONG lFlags,const GUID *pEventGUID,IEnumWIA_DEV_CAPS **ppIEnum); - HRESULT (WINAPI *FindItemByName)(IWiaItem *This,LONG lFlags,BSTR bstrFullItemName,IWiaItem **ppIWiaItem); - HRESULT (WINAPI *DeviceDlg)(IWiaItem *This,HWND hwndParent,LONG lFlags,LONG lIntent,LONG *plItemCount,IWiaItem ***ppIWiaItem); - HRESULT (WINAPI *DeviceCommand)(IWiaItem *This,LONG lFlags,const GUID *pCmdGUID,IWiaItem **pIWiaItem); - HRESULT (WINAPI *GetRootItem)(IWiaItem *This,IWiaItem **ppIWiaItem); - HRESULT (WINAPI *EnumDeviceCapabilities)(IWiaItem *This,LONG lFlags,IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS); - HRESULT (WINAPI *DumpItemData)(IWiaItem *This,BSTR *bstrData); - HRESULT (WINAPI *DumpDrvItemData)(IWiaItem *This,BSTR *bstrData); - HRESULT (WINAPI *DumpTreeItemData)(IWiaItem *This,BSTR *bstrData); - HRESULT (WINAPI *Diagnostic)(IWiaItem *This,ULONG ulSize,BYTE *pBuffer); - END_INTERFACE - } IWiaItemVtbl; - struct IWiaItem { - CONST_VTBL struct IWiaItemVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaItem_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaItem_Release(This) (This)->lpVtbl->Release(This) -#define IWiaItem_GetItemType(This,pItemType) (This)->lpVtbl->GetItemType(This,pItemType) -#define IWiaItem_AnalyzeItem(This,lFlags) (This)->lpVtbl->AnalyzeItem(This,lFlags) -#define IWiaItem_EnumChildItems(This,ppIEnumWiaItem) (This)->lpVtbl->EnumChildItems(This,ppIEnumWiaItem) -#define IWiaItem_DeleteItem(This,lFlags) (This)->lpVtbl->DeleteItem(This,lFlags) -#define IWiaItem_CreateChildItem(This,lFlags,bstrItemName,bstrFullItemName,ppIWiaItem) (This)->lpVtbl->CreateChildItem(This,lFlags,bstrItemName,bstrFullItemName,ppIWiaItem) -#define IWiaItem_EnumRegisterEventInfo(This,lFlags,pEventGUID,ppIEnum) (This)->lpVtbl->EnumRegisterEventInfo(This,lFlags,pEventGUID,ppIEnum) -#define IWiaItem_FindItemByName(This,lFlags,bstrFullItemName,ppIWiaItem) (This)->lpVtbl->FindItemByName(This,lFlags,bstrFullItemName,ppIWiaItem) -#define IWiaItem_DeviceDlg(This,hwndParent,lFlags,lIntent,plItemCount,ppIWiaItem) (This)->lpVtbl->DeviceDlg(This,hwndParent,lFlags,lIntent,plItemCount,ppIWiaItem) -#define IWiaItem_DeviceCommand(This,lFlags,pCmdGUID,pIWiaItem) (This)->lpVtbl->DeviceCommand(This,lFlags,pCmdGUID,pIWiaItem) -#define IWiaItem_GetRootItem(This,ppIWiaItem) (This)->lpVtbl->GetRootItem(This,ppIWiaItem) -#define IWiaItem_EnumDeviceCapabilities(This,lFlags,ppIEnumWIA_DEV_CAPS) (This)->lpVtbl->EnumDeviceCapabilities(This,lFlags,ppIEnumWIA_DEV_CAPS) -#define IWiaItem_DumpItemData(This,bstrData) (This)->lpVtbl->DumpItemData(This,bstrData) -#define IWiaItem_DumpDrvItemData(This,bstrData) (This)->lpVtbl->DumpDrvItemData(This,bstrData) -#define IWiaItem_DumpTreeItemData(This,bstrData) (This)->lpVtbl->DumpTreeItemData(This,bstrData) -#define IWiaItem_Diagnostic(This,ulSize,pBuffer) (This)->lpVtbl->Diagnostic(This,ulSize,pBuffer) -#endif -#endif - HRESULT WINAPI IWiaItem_GetItemType_Proxy(IWiaItem *This,LONG *pItemType); - void __RPC_STUB IWiaItem_GetItemType_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_AnalyzeItem_Proxy(IWiaItem *This,LONG lFlags); - void __RPC_STUB IWiaItem_AnalyzeItem_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_EnumChildItems_Proxy(IWiaItem *This,IEnumWiaItem **ppIEnumWiaItem); - void __RPC_STUB IWiaItem_EnumChildItems_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_DeleteItem_Proxy(IWiaItem *This,LONG lFlags); - void __RPC_STUB IWiaItem_DeleteItem_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_CreateChildItem_Proxy(IWiaItem *This,LONG lFlags,BSTR bstrItemName,BSTR bstrFullItemName,IWiaItem **ppIWiaItem); - void __RPC_STUB IWiaItem_CreateChildItem_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_EnumRegisterEventInfo_Proxy(IWiaItem *This,LONG lFlags,const GUID *pEventGUID,IEnumWIA_DEV_CAPS **ppIEnum); - void __RPC_STUB IWiaItem_EnumRegisterEventInfo_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_FindItemByName_Proxy(IWiaItem *This,LONG lFlags,BSTR bstrFullItemName,IWiaItem **ppIWiaItem); - void __RPC_STUB IWiaItem_FindItemByName_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_LocalDeviceDlg_Proxy(IWiaItem *This,HWND hwndParent,LONG lFlags,LONG lIntent,LONG *plItemCount,IWiaItem ***pIWiaItem); - void __RPC_STUB IWiaItem_LocalDeviceDlg_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_DeviceCommand_Proxy(IWiaItem *This,LONG lFlags,const GUID *pCmdGUID,IWiaItem **pIWiaItem); - void __RPC_STUB IWiaItem_DeviceCommand_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_GetRootItem_Proxy(IWiaItem *This,IWiaItem **ppIWiaItem); - void __RPC_STUB IWiaItem_GetRootItem_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_EnumDeviceCapabilities_Proxy(IWiaItem *This,LONG lFlags,IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS); - void __RPC_STUB IWiaItem_EnumDeviceCapabilities_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_DumpItemData_Proxy(IWiaItem *This,BSTR *bstrData); - void __RPC_STUB IWiaItem_DumpItemData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_DumpDrvItemData_Proxy(IWiaItem *This,BSTR *bstrData); - void __RPC_STUB IWiaItem_DumpDrvItemData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_DumpTreeItemData_Proxy(IWiaItem *This,BSTR *bstrData); - void __RPC_STUB IWiaItem_DumpTreeItemData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItem_Diagnostic_Proxy(IWiaItem *This,ULONG ulSize,BYTE *pBuffer); - void __RPC_STUB IWiaItem_Diagnostic_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaPropertyStorage_INTERFACE_DEFINED__ -#define __IWiaPropertyStorage_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaPropertyStorage; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaPropertyStorage : public IUnknown { - public: - virtual HRESULT WINAPI ReadMultiple(ULONG cpspec,const PROPSPEC rgpspec[],PROPVARIANT rgpropvar[]) = 0; - virtual HRESULT WINAPI WriteMultiple(ULONG cpspec,const PROPSPEC rgpspec[],const PROPVARIANT rgpropvar[],PROPID propidNameFirst) = 0; - virtual HRESULT WINAPI DeleteMultiple(ULONG cpspec,const PROPSPEC rgpspec[]) = 0; - virtual HRESULT WINAPI ReadPropertyNames(ULONG cpropid,const PROPID rgpropid[],LPOLESTR rglpwstrName[]) = 0; - virtual HRESULT WINAPI WritePropertyNames(ULONG cpropid,const PROPID rgpropid[],const LPOLESTR rglpwstrName[]) = 0; - virtual HRESULT WINAPI DeletePropertyNames(ULONG cpropid,const PROPID rgpropid[]) = 0; - virtual HRESULT WINAPI Commit(DWORD grfCommitFlags) = 0; - virtual HRESULT WINAPI Revert(void) = 0; - virtual HRESULT WINAPI Enum(IEnumSTATPROPSTG **ppenum) = 0; - virtual HRESULT WINAPI SetTimes(const FILETIME *pctime,const FILETIME *patime,const FILETIME *pmtime) = 0; - virtual HRESULT WINAPI SetClass(REFCLSID clsid) = 0; - virtual HRESULT WINAPI Stat(STATPROPSETSTG *pstatpsstg) = 0; - virtual HRESULT WINAPI GetPropertyAttributes(ULONG cpspec,PROPSPEC rgpspec[],ULONG rgflags[],PROPVARIANT rgpropvar[]) = 0; - virtual HRESULT WINAPI GetCount(ULONG *pulNumProps) = 0; - virtual HRESULT WINAPI GetPropertyStream(GUID *pCompatibilityId,IStream **ppIStream) = 0; - virtual HRESULT WINAPI SetPropertyStream(GUID *pCompatibilityId,IStream *pIStream) = 0; - }; -#else - typedef struct IWiaPropertyStorageVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaPropertyStorage *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaPropertyStorage *This); - ULONG (WINAPI *Release)(IWiaPropertyStorage *This); - HRESULT (WINAPI *ReadMultiple)(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[],PROPVARIANT rgpropvar[]); - HRESULT (WINAPI *WriteMultiple)(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[],const PROPVARIANT rgpropvar[],PROPID propidNameFirst); - HRESULT (WINAPI *DeleteMultiple)(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[]); - HRESULT (WINAPI *ReadPropertyNames)(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[],LPOLESTR rglpwstrName[]); - HRESULT (WINAPI *WritePropertyNames)(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[],const LPOLESTR rglpwstrName[]); - HRESULT (WINAPI *DeletePropertyNames)(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[]); - HRESULT (WINAPI *Commit)(IWiaPropertyStorage *This,DWORD grfCommitFlags); - HRESULT (WINAPI *Revert)(IWiaPropertyStorage *This); - HRESULT (WINAPI *Enum)(IWiaPropertyStorage *This,IEnumSTATPROPSTG **ppenum); - HRESULT (WINAPI *SetTimes)(IWiaPropertyStorage *This,const FILETIME *pctime,const FILETIME *patime,const FILETIME *pmtime); - HRESULT (WINAPI *SetClass)(IWiaPropertyStorage *This,REFCLSID clsid); - HRESULT (WINAPI *Stat)(IWiaPropertyStorage *This,STATPROPSETSTG *pstatpsstg); - HRESULT (WINAPI *GetPropertyAttributes)(IWiaPropertyStorage *This,ULONG cpspec,PROPSPEC rgpspec[],ULONG rgflags[],PROPVARIANT rgpropvar[]); - HRESULT (WINAPI *GetCount)(IWiaPropertyStorage *This,ULONG *pulNumProps); - HRESULT (WINAPI *GetPropertyStream)(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream **ppIStream); - HRESULT (WINAPI *SetPropertyStream)(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream *pIStream); - END_INTERFACE - } IWiaPropertyStorageVtbl; - struct IWiaPropertyStorage { - CONST_VTBL struct IWiaPropertyStorageVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaPropertyStorage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaPropertyStorage_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaPropertyStorage_Release(This) (This)->lpVtbl->Release(This) -#define IWiaPropertyStorage_ReadMultiple(This,cpspec,rgpspec,rgpropvar) (This)->lpVtbl->ReadMultiple(This,cpspec,rgpspec,rgpropvar) -#define IWiaPropertyStorage_WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) (This)->lpVtbl->WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) -#define IWiaPropertyStorage_DeleteMultiple(This,cpspec,rgpspec) (This)->lpVtbl->DeleteMultiple(This,cpspec,rgpspec) -#define IWiaPropertyStorage_ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) (This)->lpVtbl->ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) -#define IWiaPropertyStorage_WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) (This)->lpVtbl->WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) -#define IWiaPropertyStorage_DeletePropertyNames(This,cpropid,rgpropid) (This)->lpVtbl->DeletePropertyNames(This,cpropid,rgpropid) -#define IWiaPropertyStorage_Commit(This,grfCommitFlags) (This)->lpVtbl->Commit(This,grfCommitFlags) -#define IWiaPropertyStorage_Revert(This) (This)->lpVtbl->Revert(This) -#define IWiaPropertyStorage_Enum(This,ppenum) (This)->lpVtbl->Enum(This,ppenum) -#define IWiaPropertyStorage_SetTimes(This,pctime,patime,pmtime) (This)->lpVtbl->SetTimes(This,pctime,patime,pmtime) -#define IWiaPropertyStorage_SetClass(This,clsid) (This)->lpVtbl->SetClass(This,clsid) -#define IWiaPropertyStorage_Stat(This,pstatpsstg) (This)->lpVtbl->Stat(This,pstatpsstg) -#define IWiaPropertyStorage_GetPropertyAttributes(This,cpspec,rgpspec,rgflags,rgpropvar) (This)->lpVtbl->GetPropertyAttributes(This,cpspec,rgpspec,rgflags,rgpropvar) -#define IWiaPropertyStorage_GetCount(This,pulNumProps) (This)->lpVtbl->GetCount(This,pulNumProps) -#define IWiaPropertyStorage_GetPropertyStream(This,pCompatibilityId,ppIStream) (This)->lpVtbl->GetPropertyStream(This,pCompatibilityId,ppIStream) -#define IWiaPropertyStorage_SetPropertyStream(This,pCompatibilityId,pIStream) (This)->lpVtbl->SetPropertyStream(This,pCompatibilityId,pIStream) -#endif -#endif - HRESULT WINAPI IWiaPropertyStorage_ReadMultiple_Proxy(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[],PROPVARIANT rgpropvar[]); - void __RPC_STUB IWiaPropertyStorage_ReadMultiple_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_RemoteWriteMultiple_Proxy(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC *rgpspec,const PROPVARIANT *rgpropvar,PROPID propidNameFirst); - void __RPC_STUB IWiaPropertyStorage_RemoteWriteMultiple_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_DeleteMultiple_Proxy(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[]); - void __RPC_STUB IWiaPropertyStorage_DeleteMultiple_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_ReadPropertyNames_Proxy(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[],LPOLESTR rglpwstrName[]); - void __RPC_STUB IWiaPropertyStorage_ReadPropertyNames_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_WritePropertyNames_Proxy(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[],const LPOLESTR rglpwstrName[]); - void __RPC_STUB IWiaPropertyStorage_WritePropertyNames_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_DeletePropertyNames_Proxy(IWiaPropertyStorage *This,ULONG cpropid,const PROPID rgpropid[]); - void __RPC_STUB IWiaPropertyStorage_DeletePropertyNames_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_Commit_Proxy(IWiaPropertyStorage *This,DWORD grfCommitFlags); - void __RPC_STUB IWiaPropertyStorage_Commit_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_Revert_Proxy(IWiaPropertyStorage *This); - void __RPC_STUB IWiaPropertyStorage_Revert_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_Enum_Proxy(IWiaPropertyStorage *This,IEnumSTATPROPSTG **ppenum); - void __RPC_STUB IWiaPropertyStorage_Enum_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_SetTimes_Proxy(IWiaPropertyStorage *This,const FILETIME *pctime,const FILETIME *patime,const FILETIME *pmtime); - void __RPC_STUB IWiaPropertyStorage_SetTimes_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_SetClass_Proxy(IWiaPropertyStorage *This,REFCLSID clsid); - void __RPC_STUB IWiaPropertyStorage_SetClass_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_Stat_Proxy(IWiaPropertyStorage *This,STATPROPSETSTG *pstatpsstg); - void __RPC_STUB IWiaPropertyStorage_Stat_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_GetPropertyAttributes_Proxy(IWiaPropertyStorage *This,ULONG cpspec,PROPSPEC rgpspec[],ULONG rgflags[],PROPVARIANT rgpropvar[]); - void __RPC_STUB IWiaPropertyStorage_GetPropertyAttributes_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_GetCount_Proxy(IWiaPropertyStorage *This,ULONG *pulNumProps); - void __RPC_STUB IWiaPropertyStorage_GetCount_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_GetPropertyStream_Proxy(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream **ppIStream); - void __RPC_STUB IWiaPropertyStorage_GetPropertyStream_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaPropertyStorage_RemoteSetPropertyStream_Proxy(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream *pIStream); - void __RPC_STUB IWiaPropertyStorage_RemoteSetPropertyStream_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IEnumWiaItem_INTERFACE_DEFINED__ -#define __IEnumWiaItem_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IEnumWiaItem; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IEnumWiaItem : public IUnknown { - public: - virtual HRESULT WINAPI Next(ULONG celt,IWiaItem **ppIWiaItem,ULONG *pceltFetched) = 0; - virtual HRESULT WINAPI Skip(ULONG celt) = 0; - virtual HRESULT WINAPI Reset(void) = 0; - virtual HRESULT WINAPI Clone(IEnumWiaItem **ppIEnum) = 0; - virtual HRESULT WINAPI GetCount(ULONG *celt) = 0; - }; -#else - typedef struct IEnumWiaItemVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEnumWiaItem *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IEnumWiaItem *This); - ULONG (WINAPI *Release)(IEnumWiaItem *This); - HRESULT (WINAPI *Next)(IEnumWiaItem *This,ULONG celt,IWiaItem **ppIWiaItem,ULONG *pceltFetched); - HRESULT (WINAPI *Skip)(IEnumWiaItem *This,ULONG celt); - HRESULT (WINAPI *Reset)(IEnumWiaItem *This); - HRESULT (WINAPI *Clone)(IEnumWiaItem *This,IEnumWiaItem **ppIEnum); - HRESULT (WINAPI *GetCount)(IEnumWiaItem *This,ULONG *celt); - END_INTERFACE - } IEnumWiaItemVtbl; - struct IEnumWiaItem { - CONST_VTBL struct IEnumWiaItemVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IEnumWiaItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IEnumWiaItem_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IEnumWiaItem_Release(This) (This)->lpVtbl->Release(This) -#define IEnumWiaItem_Next(This,celt,ppIWiaItem,pceltFetched) (This)->lpVtbl->Next(This,celt,ppIWiaItem,pceltFetched) -#define IEnumWiaItem_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) -#define IEnumWiaItem_Reset(This) (This)->lpVtbl->Reset(This) -#define IEnumWiaItem_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) -#define IEnumWiaItem_GetCount(This,celt) (This)->lpVtbl->GetCount(This,celt) -#endif -#endif - HRESULT WINAPI IEnumWiaItem_RemoteNext_Proxy(IEnumWiaItem *This,ULONG celt,IWiaItem **ppIWiaItem,ULONG *pceltFetched); - void __RPC_STUB IEnumWiaItem_RemoteNext_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWiaItem_Skip_Proxy(IEnumWiaItem *This,ULONG celt); - void __RPC_STUB IEnumWiaItem_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWiaItem_Reset_Proxy(IEnumWiaItem *This); - void __RPC_STUB IEnumWiaItem_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWiaItem_Clone_Proxy(IEnumWiaItem *This,IEnumWiaItem **ppIEnum); - void __RPC_STUB IEnumWiaItem_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWiaItem_GetCount_Proxy(IEnumWiaItem *This,ULONG *celt); - void __RPC_STUB IEnumWiaItem_GetCount_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - - typedef struct _WIA_DEV_CAP { - GUID guid; - ULONG ulFlags; - BSTR bstrName; - BSTR bstrDescription; - BSTR bstrIcon; - BSTR bstrCommandline; - } WIA_DEV_CAP; - - typedef struct _WIA_DEV_CAP *PWIA_DEV_CAP; - typedef struct _WIA_DEV_CAP WIA_EVENT_HANDLER; - typedef struct _WIA_DEV_CAP *PWIA_EVENT_HANDLER; - - extern RPC_IF_HANDLE __MIDL_itf_wia_0130_v0_0_c_ifspec; - extern RPC_IF_HANDLE __MIDL_itf_wia_0130_v0_0_s_ifspec; -#ifndef __IEnumWIA_DEV_CAPS_INTERFACE_DEFINED__ -#define __IEnumWIA_DEV_CAPS_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IEnumWIA_DEV_CAPS; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IEnumWIA_DEV_CAPS : public IUnknown { - public: - virtual HRESULT WINAPI Next(ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched) = 0; - virtual HRESULT WINAPI Skip(ULONG celt) = 0; - virtual HRESULT WINAPI Reset(void) = 0; - virtual HRESULT WINAPI Clone(IEnumWIA_DEV_CAPS **ppIEnum) = 0; - virtual HRESULT WINAPI GetCount(ULONG *pcelt) = 0; - }; -#else - typedef struct IEnumWIA_DEV_CAPSVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEnumWIA_DEV_CAPS *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IEnumWIA_DEV_CAPS *This); - ULONG (WINAPI *Release)(IEnumWIA_DEV_CAPS *This); - HRESULT (WINAPI *Next)(IEnumWIA_DEV_CAPS *This,ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched); - HRESULT (WINAPI *Skip)(IEnumWIA_DEV_CAPS *This,ULONG celt); - HRESULT (WINAPI *Reset)(IEnumWIA_DEV_CAPS *This); - HRESULT (WINAPI *Clone)(IEnumWIA_DEV_CAPS *This,IEnumWIA_DEV_CAPS **ppIEnum); - HRESULT (WINAPI *GetCount)(IEnumWIA_DEV_CAPS *This,ULONG *pcelt); - END_INTERFACE - } IEnumWIA_DEV_CAPSVtbl; - struct IEnumWIA_DEV_CAPS { - CONST_VTBL struct IEnumWIA_DEV_CAPSVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IEnumWIA_DEV_CAPS_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IEnumWIA_DEV_CAPS_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IEnumWIA_DEV_CAPS_Release(This) (This)->lpVtbl->Release(This) -#define IEnumWIA_DEV_CAPS_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) -#define IEnumWIA_DEV_CAPS_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) -#define IEnumWIA_DEV_CAPS_Reset(This) (This)->lpVtbl->Reset(This) -#define IEnumWIA_DEV_CAPS_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) -#define IEnumWIA_DEV_CAPS_GetCount(This,pcelt) (This)->lpVtbl->GetCount(This,pcelt) -#endif -#endif - HRESULT WINAPI IEnumWIA_DEV_CAPS_RemoteNext_Proxy(IEnumWIA_DEV_CAPS *This,ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched); - void __RPC_STUB IEnumWIA_DEV_CAPS_RemoteNext_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_CAPS_Skip_Proxy(IEnumWIA_DEV_CAPS *This,ULONG celt); - void __RPC_STUB IEnumWIA_DEV_CAPS_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_CAPS_Reset_Proxy(IEnumWIA_DEV_CAPS *This); - void __RPC_STUB IEnumWIA_DEV_CAPS_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_CAPS_Clone_Proxy(IEnumWIA_DEV_CAPS *This,IEnumWIA_DEV_CAPS **ppIEnum); - void __RPC_STUB IEnumWIA_DEV_CAPS_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_DEV_CAPS_GetCount_Proxy(IEnumWIA_DEV_CAPS *This,ULONG *pcelt); - void __RPC_STUB IEnumWIA_DEV_CAPS_GetCount_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IEnumWIA_FORMAT_INFO_INTERFACE_DEFINED__ -#define __IEnumWIA_FORMAT_INFO_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IEnumWIA_FORMAT_INFO; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IEnumWIA_FORMAT_INFO : public IUnknown { - public: - virtual HRESULT WINAPI Next(ULONG celt,WIA_FORMAT_INFO *rgelt,ULONG *pceltFetched) = 0; - virtual HRESULT WINAPI Skip(ULONG celt) = 0; - virtual HRESULT WINAPI Reset(void) = 0; - virtual HRESULT WINAPI Clone(IEnumWIA_FORMAT_INFO **ppIEnum) = 0; - virtual HRESULT WINAPI GetCount(ULONG *pcelt) = 0; - }; -#else - typedef struct IEnumWIA_FORMAT_INFOVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEnumWIA_FORMAT_INFO *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IEnumWIA_FORMAT_INFO *This); - ULONG (WINAPI *Release)(IEnumWIA_FORMAT_INFO *This); - HRESULT (WINAPI *Next)(IEnumWIA_FORMAT_INFO *This,ULONG celt,WIA_FORMAT_INFO *rgelt,ULONG *pceltFetched); - HRESULT (WINAPI *Skip)(IEnumWIA_FORMAT_INFO *This,ULONG celt); - HRESULT (WINAPI *Reset)(IEnumWIA_FORMAT_INFO *This); - HRESULT (WINAPI *Clone)(IEnumWIA_FORMAT_INFO *This,IEnumWIA_FORMAT_INFO **ppIEnum); - HRESULT (WINAPI *GetCount)(IEnumWIA_FORMAT_INFO *This,ULONG *pcelt); - END_INTERFACE - } IEnumWIA_FORMAT_INFOVtbl; - struct IEnumWIA_FORMAT_INFO { - CONST_VTBL struct IEnumWIA_FORMAT_INFOVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IEnumWIA_FORMAT_INFO_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IEnumWIA_FORMAT_INFO_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IEnumWIA_FORMAT_INFO_Release(This) (This)->lpVtbl->Release(This) -#define IEnumWIA_FORMAT_INFO_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) -#define IEnumWIA_FORMAT_INFO_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) -#define IEnumWIA_FORMAT_INFO_Reset(This) (This)->lpVtbl->Reset(This) -#define IEnumWIA_FORMAT_INFO_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) -#define IEnumWIA_FORMAT_INFO_GetCount(This,pcelt) (This)->lpVtbl->GetCount(This,pcelt) -#endif -#endif - HRESULT WINAPI IEnumWIA_FORMAT_INFO_RemoteNext_Proxy(IEnumWIA_FORMAT_INFO *This,ULONG celt,WIA_FORMAT_INFO *rgelt,ULONG *pceltFetched); - void __RPC_STUB IEnumWIA_FORMAT_INFO_RemoteNext_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_Skip_Proxy(IEnumWIA_FORMAT_INFO *This,ULONG celt); - void __RPC_STUB IEnumWIA_FORMAT_INFO_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_Reset_Proxy(IEnumWIA_FORMAT_INFO *This); - void __RPC_STUB IEnumWIA_FORMAT_INFO_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_Clone_Proxy(IEnumWIA_FORMAT_INFO *This,IEnumWIA_FORMAT_INFO **ppIEnum); - void __RPC_STUB IEnumWIA_FORMAT_INFO_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_GetCount_Proxy(IEnumWIA_FORMAT_INFO *This,ULONG *pcelt); - void __RPC_STUB IEnumWIA_FORMAT_INFO_GetCount_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaLog_INTERFACE_DEFINED__ -#define __IWiaLog_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaLog; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaLog : public IUnknown { - public: - virtual HRESULT WINAPI InitializeLog(LONG hInstance) = 0; - virtual HRESULT WINAPI hResult(HRESULT hResult) = 0; - virtual HRESULT WINAPI Log(LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText) = 0; - }; -#else - typedef struct IWiaLogVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaLog *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaLog *This); - ULONG (WINAPI *Release)(IWiaLog *This); - HRESULT (WINAPI *InitializeLog)(IWiaLog *This,LONG hInstance); - HRESULT (WINAPI *hResult)(IWiaLog *This,HRESULT hResult); - HRESULT (WINAPI *Log)(IWiaLog *This,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - END_INTERFACE - } IWiaLogVtbl; - struct IWiaLog { - CONST_VTBL struct IWiaLogVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaLog_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaLog_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaLog_Release(This) (This)->lpVtbl->Release(This) -#define IWiaLog_InitializeLog(This,hInstance) (This)->lpVtbl->InitializeLog(This,hInstance) -#define IWiaLog_hResult(This,hResult) (This)->lpVtbl->hResult(This,hResult) -#define IWiaLog_Log(This,lFlags,lResID,lDetail,bstrText) (This)->lpVtbl->Log(This,lFlags,lResID,lDetail,bstrText) -#endif -#endif - HRESULT WINAPI IWiaLog_InitializeLog_Proxy(IWiaLog *This,LONG hInstance); - void __RPC_STUB IWiaLog_InitializeLog_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLog_hResult_Proxy(IWiaLog *This,HRESULT hResult); - void __RPC_STUB IWiaLog_hResult_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLog_Log_Proxy(IWiaLog *This,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - void __RPC_STUB IWiaLog_Log_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaLogEx_INTERFACE_DEFINED__ -#define __IWiaLogEx_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaLogEx; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaLogEx : public IUnknown { - public: - virtual HRESULT WINAPI InitializeLogEx(BYTE *hInstance) = 0; - virtual HRESULT WINAPI hResult(HRESULT hResult) = 0; - virtual HRESULT WINAPI Log(LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText) = 0; - virtual HRESULT WINAPI hResultEx(LONG lMethodId,HRESULT hResult) = 0; - virtual HRESULT WINAPI LogEx(LONG lMethodId,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText) = 0; - }; -#else - typedef struct IWiaLogExVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaLogEx *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaLogEx *This); - ULONG (WINAPI *Release)(IWiaLogEx *This); - HRESULT (WINAPI *InitializeLogEx)(IWiaLogEx *This,BYTE *hInstance); - HRESULT (WINAPI *hResult)(IWiaLogEx *This,HRESULT hResult); - HRESULT (WINAPI *Log)(IWiaLogEx *This,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - HRESULT (WINAPI *hResultEx)(IWiaLogEx *This,LONG lMethodId,HRESULT hResult); - HRESULT (WINAPI *LogEx)(IWiaLogEx *This,LONG lMethodId,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - END_INTERFACE - } IWiaLogExVtbl; - struct IWiaLogEx { - CONST_VTBL struct IWiaLogExVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaLogEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaLogEx_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaLogEx_Release(This) (This)->lpVtbl->Release(This) -#define IWiaLogEx_InitializeLogEx(This,hInstance) (This)->lpVtbl->InitializeLogEx(This,hInstance) -#define IWiaLogEx_hResult(This,hResult) (This)->lpVtbl->hResult(This,hResult) -#define IWiaLogEx_Log(This,lFlags,lResID,lDetail,bstrText) (This)->lpVtbl->Log(This,lFlags,lResID,lDetail,bstrText) -#define IWiaLogEx_hResultEx(This,lMethodId,hResult) (This)->lpVtbl->hResultEx(This,lMethodId,hResult) -#define IWiaLogEx_LogEx(This,lMethodId,lFlags,lResID,lDetail,bstrText) (This)->lpVtbl->LogEx(This,lMethodId,lFlags,lResID,lDetail,bstrText) -#endif -#endif - HRESULT WINAPI IWiaLogEx_InitializeLogEx_Proxy(IWiaLogEx *This,BYTE *hInstance); - void __RPC_STUB IWiaLogEx_InitializeLogEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLogEx_hResult_Proxy(IWiaLogEx *This,HRESULT hResult); - void __RPC_STUB IWiaLogEx_hResult_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLogEx_Log_Proxy(IWiaLogEx *This,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - void __RPC_STUB IWiaLogEx_Log_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLogEx_hResultEx_Proxy(IWiaLogEx *This,LONG lMethodId,HRESULT hResult); - void __RPC_STUB IWiaLogEx_hResultEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaLogEx_LogEx_Proxy(IWiaLogEx *This,LONG lMethodId,LONG lFlags,LONG lResID,LONG lDetail,BSTR bstrText); - void __RPC_STUB IWiaLogEx_LogEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaNotifyDevMgr_INTERFACE_DEFINED__ -#define __IWiaNotifyDevMgr_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaNotifyDevMgr; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaNotifyDevMgr : public IUnknown { - public: - virtual HRESULT WINAPI NewDeviceArrival(void) = 0; - }; -#else - typedef struct IWiaNotifyDevMgrVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaNotifyDevMgr *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaNotifyDevMgr *This); - ULONG (WINAPI *Release)(IWiaNotifyDevMgr *This); - HRESULT (WINAPI *NewDeviceArrival)(IWiaNotifyDevMgr *This); - END_INTERFACE - } IWiaNotifyDevMgrVtbl; - struct IWiaNotifyDevMgr { - CONST_VTBL struct IWiaNotifyDevMgrVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaNotifyDevMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaNotifyDevMgr_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaNotifyDevMgr_Release(This) (This)->lpVtbl->Release(This) -#define IWiaNotifyDevMgr_NewDeviceArrival(This) (This)->lpVtbl->NewDeviceArrival(This) -#endif -#endif - HRESULT WINAPI IWiaNotifyDevMgr_NewDeviceArrival_Proxy(IWiaNotifyDevMgr *This); - void __RPC_STUB IWiaNotifyDevMgr_NewDeviceArrival_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __IWiaItemExtras_INTERFACE_DEFINED__ -#define __IWiaItemExtras_INTERFACE_DEFINED__ - EXTERN_C const IID IID_IWiaItemExtras; -#if defined(__cplusplus) && !defined(CINTERFACE) - struct IWiaItemExtras : public IUnknown { - public: - virtual HRESULT WINAPI GetExtendedErrorInfo(BSTR *bstrErrorText) = 0; - virtual HRESULT WINAPI Escape(DWORD dwEscapeCode,BYTE *lpInData,DWORD cbInDataSize,BYTE *pOutData,DWORD dwOutDataSize,DWORD *pdwActualDataSize) = 0; - virtual HRESULT WINAPI CancelPendingIO(void) = 0; - }; -#else - typedef struct IWiaItemExtrasVtbl { - BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IWiaItemExtras *This,REFIID riid,void **ppvObject); - ULONG (WINAPI *AddRef)(IWiaItemExtras *This); - ULONG (WINAPI *Release)(IWiaItemExtras *This); - HRESULT (WINAPI *GetExtendedErrorInfo)(IWiaItemExtras *This,BSTR *bstrErrorText); - HRESULT (WINAPI *Escape)(IWiaItemExtras *This,DWORD dwEscapeCode,BYTE *lpInData,DWORD cbInDataSize,BYTE *pOutData,DWORD dwOutDataSize,DWORD *pdwActualDataSize); - HRESULT (WINAPI *CancelPendingIO)(IWiaItemExtras *This); - END_INTERFACE - } IWiaItemExtrasVtbl; - struct IWiaItemExtras { - CONST_VTBL struct IWiaItemExtrasVtbl *lpVtbl; - }; -#ifdef COBJMACROS -#define IWiaItemExtras_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) -#define IWiaItemExtras_AddRef(This) (This)->lpVtbl->AddRef(This) -#define IWiaItemExtras_Release(This) (This)->lpVtbl->Release(This) -#define IWiaItemExtras_GetExtendedErrorInfo(This,bstrErrorText) (This)->lpVtbl->GetExtendedErrorInfo(This,bstrErrorText) -#define IWiaItemExtras_Escape(This,dwEscapeCode,lpInData,cbInDataSize,pOutData,dwOutDataSize,pdwActualDataSize) (This)->lpVtbl->Escape(This,dwEscapeCode,lpInData,cbInDataSize,pOutData,dwOutDataSize,pdwActualDataSize) -#define IWiaItemExtras_CancelPendingIO(This) (This)->lpVtbl->CancelPendingIO(This) -#endif -#endif - HRESULT WINAPI IWiaItemExtras_GetExtendedErrorInfo_Proxy(IWiaItemExtras *This,BSTR *bstrErrorText); - void __RPC_STUB IWiaItemExtras_GetExtendedErrorInfo_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItemExtras_Escape_Proxy(IWiaItemExtras *This,DWORD dwEscapeCode,BYTE *lpInData,DWORD cbInDataSize,BYTE *pOutData,DWORD dwOutDataSize,DWORD *pdwActualDataSize); - void __RPC_STUB IWiaItemExtras_Escape_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); - HRESULT WINAPI IWiaItemExtras_CancelPendingIO_Proxy(IWiaItemExtras *This); - void __RPC_STUB IWiaItemExtras_CancelPendingIO_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase); -#endif - -#ifndef __WiaDevMgr_LIBRARY_DEFINED__ -#define __WiaDevMgr_LIBRARY_DEFINED__ - EXTERN_C const IID LIBID_WiaDevMgr; - EXTERN_C const CLSID CLSID_WiaDevMgr; -#ifdef __cplusplus - class WiaDevMgr; -#endif - EXTERN_C const CLSID CLSID_WiaLog; -#ifdef __cplusplus - class WiaLog; -#endif -#endif - - ULONG __RPC_API BSTR_UserSize(ULONG *,ULONG,BSTR *); - unsigned char *__RPC_API BSTR_UserMarshal(ULONG *,unsigned char *,BSTR *); - unsigned char *__RPC_API BSTR_UserUnmarshal(ULONG *,unsigned char *,BSTR *); - void __RPC_API BSTR_UserFree(ULONG *,BSTR *); - ULONG __RPC_API HWND_UserSize(ULONG *,ULONG,HWND *); - unsigned char *__RPC_API HWND_UserMarshal(ULONG *,unsigned char *,HWND *); - unsigned char *__RPC_API HWND_UserUnmarshal(ULONG *,unsigned char *,HWND *); - void __RPC_API HWND_UserFree(ULONG *,HWND *); - ULONG __RPC_API LPSAFEARRAY_UserSize(ULONG *,ULONG,LPSAFEARRAY *); - unsigned char *__RPC_API LPSAFEARRAY_UserMarshal(ULONG *,unsigned char *,LPSAFEARRAY *); - unsigned char *__RPC_API LPSAFEARRAY_UserUnmarshal(ULONG *,unsigned char *,LPSAFEARRAY *); - void __RPC_API LPSAFEARRAY_UserFree(ULONG *,LPSAFEARRAY *); - ULONG __RPC_API STGMEDIUM_UserSize(ULONG *,ULONG,STGMEDIUM *); - unsigned char *__RPC_API STGMEDIUM_UserMarshal(ULONG *,unsigned char *,STGMEDIUM *); - unsigned char *__RPC_API STGMEDIUM_UserUnmarshal(ULONG *,unsigned char *,STGMEDIUM *); - void __RPC_API STGMEDIUM_UserFree(ULONG *,STGMEDIUM *); - - HRESULT WINAPI IWiaDevMgr_CreateDevice_Proxy(IWiaDevMgr *This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot); - HRESULT WINAPI IWiaDevMgr_CreateDevice_Stub(IWiaDevMgr *This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot); - HRESULT WINAPI IWiaDevMgr_SelectDeviceDlg_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot); - HRESULT WINAPI IWiaDevMgr_SelectDeviceDlg_Stub(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot); - HRESULT WINAPI IWiaDevMgr_SelectDeviceDlgID_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID); - HRESULT WINAPI IWiaDevMgr_SelectDeviceDlgID_Stub(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID); - HRESULT WINAPI IWiaDevMgr_GetImageDlg_Proxy(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat); - HRESULT WINAPI IWiaDevMgr_GetImageDlg_Stub(IWiaDevMgr *This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackProgram_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackProgram_Stub(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackInterface_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackInterface_Stub(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackCLSID_Proxy(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT WINAPI IWiaDevMgr_RegisterEventCallbackCLSID_Stub(IWiaDevMgr *This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon); - HRESULT WINAPI IEnumWIA_DEV_INFO_Next_Proxy(IEnumWIA_DEV_INFO *This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched); - HRESULT WINAPI IEnumWIA_DEV_INFO_Next_Stub(IEnumWIA_DEV_INFO *This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched); - HRESULT WINAPI IWiaDataCallback_BandedDataCallback_Proxy(IWiaDataCallback *This,LONG lMessage,LONG lStatus,LONG lPercentComplete,LONG lOffset,LONG lLength,LONG lReserved,LONG lResLength,BYTE *pbBuffer); - HRESULT WINAPI IWiaDataCallback_BandedDataCallback_Stub(IWiaDataCallback *This,LONG lMessage,LONG lStatus,LONG lPercentComplete,LONG lOffset,LONG lLength,LONG lReserved,LONG lResLength,BYTE *pbBuffer); - HRESULT WINAPI IWiaDataTransfer_idtGetData_Proxy(IWiaDataTransfer *This,LPSTGMEDIUM pMedium,IWiaDataCallback *pIWiaDataCallback); - HRESULT WINAPI IWiaDataTransfer_idtGetData_Stub(IWiaDataTransfer *This,LPSTGMEDIUM pMedium,IWiaDataCallback *pIWiaDataCallback); - HRESULT WINAPI IWiaDataTransfer_idtGetBandedData_Proxy(IWiaDataTransfer *This,PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,IWiaDataCallback *pIWiaDataCallback); - HRESULT WINAPI IWiaDataTransfer_idtGetBandedData_Stub(IWiaDataTransfer *This,PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,IWiaDataCallback *pIWiaDataCallback); - HRESULT WINAPI IWiaItem_DeviceDlg_Proxy(IWiaItem *This,HWND hwndParent,LONG lFlags,LONG lIntent,LONG *plItemCount,IWiaItem ***ppIWiaItem); - HRESULT WINAPI IWiaItem_DeviceDlg_Stub(IWiaItem *This,HWND hwndParent,LONG lFlags,LONG lIntent,LONG *plItemCount,IWiaItem ***pIWiaItem); - HRESULT WINAPI IWiaPropertyStorage_WriteMultiple_Proxy(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC rgpspec[],const PROPVARIANT rgpropvar[],PROPID propidNameFirst); - HRESULT WINAPI IWiaPropertyStorage_WriteMultiple_Stub(IWiaPropertyStorage *This,ULONG cpspec,const PROPSPEC *rgpspec,const PROPVARIANT *rgpropvar,PROPID propidNameFirst); - HRESULT WINAPI IWiaPropertyStorage_SetPropertyStream_Proxy(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream *pIStream); - HRESULT WINAPI IWiaPropertyStorage_SetPropertyStream_Stub(IWiaPropertyStorage *This,GUID *pCompatibilityId,IStream *pIStream); - HRESULT WINAPI IEnumWiaItem_Next_Proxy(IEnumWiaItem *This,ULONG celt,IWiaItem **ppIWiaItem,ULONG *pceltFetched); - HRESULT WINAPI IEnumWiaItem_Next_Stub(IEnumWiaItem *This,ULONG celt,IWiaItem **ppIWiaItem,ULONG *pceltFetched); - HRESULT WINAPI IEnumWIA_DEV_CAPS_Next_Proxy(IEnumWIA_DEV_CAPS *This,ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched); - HRESULT WINAPI IEnumWIA_DEV_CAPS_Next_Stub(IEnumWIA_DEV_CAPS *This,ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_Next_Proxy(IEnumWIA_FORMAT_INFO *This,ULONG celt,WIA_FORMAT_INFO *rgelt,ULONG *pceltFetched); - HRESULT WINAPI IEnumWIA_FORMAT_INFO_Next_Stub(IEnumWIA_FORMAT_INFO *This,ULONG celt,WIA_FORMAT_INFO *rgelt,ULONG *pceltFetched); - -#ifdef __cplusplus -} -#endif +#if (_WIN32_WINNT >= 0x0600) +#include +#elif (_WIN32_WINNT >= 0x0501) +#include #endif diff --git a/lib/libc/include/any-windows-any/wia_lh.h b/lib/libc/include/any-windows-any/wia_lh.h new file mode 100644 index 000000000000..a3e99f042d50 --- /dev/null +++ b/lib/libc/include/any-windows-any/wia_lh.h @@ -0,0 +1,1821 @@ +/*** Autogenerated by WIDL 10.0-rc1 from include/wia_lh.idl - Do not edit ***/ + +#ifdef _WIN32 +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif +#include +#include +#endif + +#ifndef COM_NO_WINDOWS_H +#include +#include +#endif + +#ifndef __wia_lh_h__ +#define __wia_lh_h__ + +/* Forward declarations */ + +#ifndef __IWiaDevMgr_FWD_DEFINED__ +#define __IWiaDevMgr_FWD_DEFINED__ +typedef interface IWiaDevMgr IWiaDevMgr; +#ifdef __cplusplus +interface IWiaDevMgr; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWIA_DEV_INFO_FWD_DEFINED__ +#define __IEnumWIA_DEV_INFO_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_INFO IEnumWIA_DEV_INFO; +#ifdef __cplusplus +interface IEnumWIA_DEV_INFO; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPropertyStorage_FWD_DEFINED__ +#define __IWiaPropertyStorage_FWD_DEFINED__ +typedef interface IWiaPropertyStorage IWiaPropertyStorage; +#ifdef __cplusplus +interface IWiaPropertyStorage; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem_FWD_DEFINED__ +#define __IWiaItem_FWD_DEFINED__ +typedef interface IWiaItem IWiaItem; +#ifdef __cplusplus +interface IWiaItem; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaEventCallback_FWD_DEFINED__ +#define __IWiaEventCallback_FWD_DEFINED__ +typedef interface IWiaEventCallback IWiaEventCallback; +#ifdef __cplusplus +interface IWiaEventCallback; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWIA_DEV_CAPS_FWD_DEFINED__ +#define __IEnumWIA_DEV_CAPS_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_CAPS IEnumWIA_DEV_CAPS; +#ifdef __cplusplus +interface IEnumWIA_DEV_CAPS; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaTransferCallback_FWD_DEFINED__ +#define __IWiaTransferCallback_FWD_DEFINED__ +typedef interface IWiaTransferCallback IWiaTransferCallback; +#ifdef __cplusplus +interface IWiaTransferCallback; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPreview_FWD_DEFINED__ +#define __IWiaPreview_FWD_DEFINED__ +typedef interface IWiaPreview IWiaPreview; +#ifdef __cplusplus +interface IWiaPreview; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWiaItem2_FWD_DEFINED__ +#define __IEnumWiaItem2_FWD_DEFINED__ +typedef interface IEnumWiaItem2 IEnumWiaItem2; +#ifdef __cplusplus +interface IEnumWiaItem2; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem2_FWD_DEFINED__ +#define __IWiaItem2_FWD_DEFINED__ +typedef interface IWiaItem2 IWiaItem2; +#ifdef __cplusplus +interface IWiaItem2; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaDevMgr2_FWD_DEFINED__ +#define __IWiaDevMgr2_FWD_DEFINED__ +typedef interface IWiaDevMgr2 IWiaDevMgr2; +#ifdef __cplusplus +interface IWiaDevMgr2; +#endif /* __cplusplus */ +#endif + +#ifndef __WiaDevMgr2_FWD_DEFINED__ +#define __WiaDevMgr2_FWD_DEFINED__ +#ifdef __cplusplus +typedef class WiaDevMgr2 WiaDevMgr2; +#else +typedef struct WiaDevMgr2 WiaDevMgr2; +#endif /* defined __cplusplus */ +#endif /* defined __WiaDevMgr2_FWD_DEFINED__ */ + +/* Headers for imported files */ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _WIA_DITHER_PATTERN_DATA { + LONG lSize; + BSTR bstrPatternName; + LONG lPatternWidth; + LONG lPatternLength; + LONG cbPattern; + BYTE *pbPattern; +} WIA_DITHER_PATTERN_DATA; +typedef struct _WIA_DITHER_PATTERN_DATA *PWIA_DITHER_PATTERN_DATA; +typedef struct _WIA_PROPID_TO_NAME { + PROPID propid; + LPOLESTR pszName; +} WIA_PROPID_TO_NAME; +typedef struct _WIA_PROPID_TO_NAME *PWIA_PROPID_TO_NAME; +typedef struct _WIA_FORMAT_INFO { + GUID guidFormatID; + LONG lTymed; +} WIA_FORMAT_INFO; +typedef struct _WIA_FORMAT_INFO *PWIA_FORMAT_INFO; +#include +#ifndef __IEnumWIA_DEV_INFO_FWD_DEFINED__ +#define __IEnumWIA_DEV_INFO_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_INFO IEnumWIA_DEV_INFO; +#ifdef __cplusplus +interface IEnumWIA_DEV_INFO; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPropertyStorage_FWD_DEFINED__ +#define __IWiaPropertyStorage_FWD_DEFINED__ +typedef interface IWiaPropertyStorage IWiaPropertyStorage; +#ifdef __cplusplus +interface IWiaPropertyStorage; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem_FWD_DEFINED__ +#define __IWiaItem_FWD_DEFINED__ +typedef interface IWiaItem IWiaItem; +#ifdef __cplusplus +interface IWiaItem; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaEventCallback_FWD_DEFINED__ +#define __IWiaEventCallback_FWD_DEFINED__ +typedef interface IWiaEventCallback IWiaEventCallback; +#ifdef __cplusplus +interface IWiaEventCallback; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWIA_DEV_CAPS_FWD_DEFINED__ +#define __IEnumWIA_DEV_CAPS_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_CAPS IEnumWIA_DEV_CAPS; +#ifdef __cplusplus +interface IEnumWIA_DEV_CAPS; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaTransferCallback_FWD_DEFINED__ +#define __IWiaTransferCallback_FWD_DEFINED__ +typedef interface IWiaTransferCallback IWiaTransferCallback; +#ifdef __cplusplus +interface IWiaTransferCallback; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPreview_FWD_DEFINED__ +#define __IWiaPreview_FWD_DEFINED__ +typedef interface IWiaPreview IWiaPreview; +#ifdef __cplusplus +interface IWiaPreview; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWiaItem2_FWD_DEFINED__ +#define __IEnumWiaItem2_FWD_DEFINED__ +typedef interface IEnumWiaItem2 IEnumWiaItem2; +#ifdef __cplusplus +interface IEnumWiaItem2; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem2_FWD_DEFINED__ +#define __IWiaItem2_FWD_DEFINED__ +typedef interface IWiaItem2 IWiaItem2; +#ifdef __cplusplus +interface IWiaItem2; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaDevMgr2_FWD_DEFINED__ +#define __IWiaDevMgr2_FWD_DEFINED__ +typedef interface IWiaDevMgr2 IWiaDevMgr2; +#ifdef __cplusplus +interface IWiaDevMgr2; +#endif /* __cplusplus */ +#endif + +DEFINE_GUID(CLSID_WiaDevMgr, 0xa1f4e726,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11); +/***************************************************************************** + * IWiaDevMgr interface + */ +#ifndef __IWiaDevMgr_INTERFACE_DEFINED__ +#define __IWiaDevMgr_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaDevMgr, 0x5eb2502a, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("5eb2502a-8cf1-11d1-bf92-0060081ed811") +IWiaDevMgr : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE EnumDeviceInfo( + LONG lFlag, + IEnumWIA_DEV_INFO **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDevice( + BSTR bstrDeviceID, + IWiaItem **ppWiaItemRoot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlg( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem **ppItemRoot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlgID( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetImageDlg( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + LONG lIntent, + IWiaItem *pItemRoot, + BSTR bstrFilename, + GUID *pguidFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackProgram( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrCommandline, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackInterface( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackCLSID( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddDeviceDlg( + HWND hwndParent, + LONG lFlags) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaDevMgr, 0x5eb2502a, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11) +#endif +#else +typedef struct IWiaDevMgrVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaDevMgr *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaDevMgr *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaDevMgr *This); + + /*** IWiaDevMgr methods ***/ + HRESULT (STDMETHODCALLTYPE *EnumDeviceInfo)( + IWiaDevMgr *This, + LONG lFlag, + IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *CreateDevice)( + IWiaDevMgr *This, + BSTR bstrDeviceID, + IWiaItem **ppWiaItemRoot); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem **ppItemRoot); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlgID)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID); + + HRESULT (STDMETHODCALLTYPE *GetImageDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + LONG lIntent, + IWiaItem *pItemRoot, + BSTR bstrFilename, + GUID *pguidFormat); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackProgram)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrCommandline, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackInterface)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackCLSID)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *AddDeviceDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lFlags); + + END_INTERFACE +} IWiaDevMgrVtbl; + +interface IWiaDevMgr { + CONST_VTBL IWiaDevMgrVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaDevMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaDevMgr_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaDevMgr_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaDevMgr methods ***/ +#define IWiaDevMgr_EnumDeviceInfo(This,lFlag,ppIEnum) (This)->lpVtbl->EnumDeviceInfo(This,lFlag,ppIEnum) +#define IWiaDevMgr_CreateDevice(This,bstrDeviceID,ppWiaItemRoot) (This)->lpVtbl->CreateDevice(This,bstrDeviceID,ppWiaItemRoot) +#define IWiaDevMgr_SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) (This)->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) +#define IWiaDevMgr_SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) (This)->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) +#define IWiaDevMgr_GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) (This)->lpVtbl->GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) +#define IWiaDevMgr_RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr_RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) (This)->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) +#define IWiaDevMgr_RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr_AddDeviceDlg(This,hwndParent,lFlags) (This)->lpVtbl->AddDeviceDlg(This,hwndParent,lFlags) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaDevMgr_QueryInterface(IWiaDevMgr* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaDevMgr_AddRef(IWiaDevMgr* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaDevMgr_Release(IWiaDevMgr* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaDevMgr methods ***/ +static inline HRESULT IWiaDevMgr_EnumDeviceInfo(IWiaDevMgr* This,LONG lFlag,IEnumWIA_DEV_INFO **ppIEnum) { + return This->lpVtbl->EnumDeviceInfo(This,lFlag,ppIEnum); +} +static inline HRESULT IWiaDevMgr_CreateDevice(IWiaDevMgr* This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot) { + return This->lpVtbl->CreateDevice(This,bstrDeviceID,ppWiaItemRoot); +} +static inline HRESULT IWiaDevMgr_SelectDeviceDlg(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot) { + return This->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot); +} +static inline HRESULT IWiaDevMgr_SelectDeviceDlgID(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID) { + return This->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID); +} +static inline HRESULT IWiaDevMgr_GetImageDlg(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat) { + return This->lpVtbl->GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackProgram(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackInterface(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject) { + return This->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackCLSID(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr_AddDeviceDlg(IWiaDevMgr* This,HWND hwndParent,LONG lFlags) { + return This->lpVtbl->AddDeviceDlg(This,hwndParent,lFlags); +} +#endif +#endif + +#endif + + +#endif /* __IWiaDevMgr_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IEnumWIA_DEV_INFO interface + */ +#ifndef __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ +#define __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IEnumWIA_DEV_INFO, 0x5e38b83c, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("5e38b83c-8cf1-11d1-bf92-0060081ed811") +IEnumWIA_DEV_INFO : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE Next( + ULONG celt, + IWiaPropertyStorage **rgelt, + ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumWIA_DEV_INFO **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCount( + ULONG *celt) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IEnumWIA_DEV_INFO, 0x5e38b83c, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11) +#endif +#else +typedef struct IEnumWIA_DEV_INFOVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IEnumWIA_DEV_INFO *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IEnumWIA_DEV_INFO *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IEnumWIA_DEV_INFO *This); + + /*** IEnumWIA_DEV_INFO methods ***/ + HRESULT (STDMETHODCALLTYPE *Next)( + IEnumWIA_DEV_INFO *This, + ULONG celt, + IWiaPropertyStorage **rgelt, + ULONG *pceltFetched); + + HRESULT (STDMETHODCALLTYPE *Skip)( + IEnumWIA_DEV_INFO *This, + ULONG celt); + + HRESULT (STDMETHODCALLTYPE *Reset)( + IEnumWIA_DEV_INFO *This); + + HRESULT (STDMETHODCALLTYPE *Clone)( + IEnumWIA_DEV_INFO *This, + IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *GetCount)( + IEnumWIA_DEV_INFO *This, + ULONG *celt); + + END_INTERFACE +} IEnumWIA_DEV_INFOVtbl; + +interface IEnumWIA_DEV_INFO { + CONST_VTBL IEnumWIA_DEV_INFOVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IEnumWIA_DEV_INFO_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IEnumWIA_DEV_INFO_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IEnumWIA_DEV_INFO_Release(This) (This)->lpVtbl->Release(This) +/*** IEnumWIA_DEV_INFO methods ***/ +#define IEnumWIA_DEV_INFO_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) +#define IEnumWIA_DEV_INFO_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) +#define IEnumWIA_DEV_INFO_Reset(This) (This)->lpVtbl->Reset(This) +#define IEnumWIA_DEV_INFO_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) +#define IEnumWIA_DEV_INFO_GetCount(This,celt) (This)->lpVtbl->GetCount(This,celt) +#else +/*** IUnknown methods ***/ +static inline HRESULT IEnumWIA_DEV_INFO_QueryInterface(IEnumWIA_DEV_INFO* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IEnumWIA_DEV_INFO_AddRef(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IEnumWIA_DEV_INFO_Release(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->Release(This); +} +/*** IEnumWIA_DEV_INFO methods ***/ +static inline HRESULT IEnumWIA_DEV_INFO_Next(IEnumWIA_DEV_INFO* This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched) { + return This->lpVtbl->Next(This,celt,rgelt,pceltFetched); +} +static inline HRESULT IEnumWIA_DEV_INFO_Skip(IEnumWIA_DEV_INFO* This,ULONG celt) { + return This->lpVtbl->Skip(This,celt); +} +static inline HRESULT IEnumWIA_DEV_INFO_Reset(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->Reset(This); +} +static inline HRESULT IEnumWIA_DEV_INFO_Clone(IEnumWIA_DEV_INFO* This,IEnumWIA_DEV_INFO **ppIEnum) { + return This->lpVtbl->Clone(This,ppIEnum); +} +static inline HRESULT IEnumWIA_DEV_INFO_GetCount(IEnumWIA_DEV_INFO* This,ULONG *celt) { + return This->lpVtbl->GetCount(This,celt); +} +#endif +#endif + +#endif + + +#endif /* __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaPropertyStorage interface + */ +#ifndef __IWiaPropertyStorage_INTERFACE_DEFINED__ +#define __IWiaPropertyStorage_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaPropertyStorage, 0x98b5e8a0, 0x29cc, 0x491a, 0xaa,0xc0, 0xe6,0xdb,0x4f,0xdc,0xce,0xb6); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("98b5e8a0-29cc-491a-aac0-e6db4fdcceb6") +IWiaPropertyStorage : public IUnknown +{ +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaPropertyStorage, 0x98b5e8a0, 0x29cc, 0x491a, 0xaa,0xc0, 0xe6,0xdb,0x4f,0xdc,0xce,0xb6) +#endif +#else +typedef struct IWiaPropertyStorageVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaPropertyStorage *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaPropertyStorage *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaPropertyStorage *This); + + END_INTERFACE +} IWiaPropertyStorageVtbl; + +interface IWiaPropertyStorage { + CONST_VTBL IWiaPropertyStorageVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaPropertyStorage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaPropertyStorage_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaPropertyStorage_Release(This) (This)->lpVtbl->Release(This) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaPropertyStorage_QueryInterface(IWiaPropertyStorage* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaPropertyStorage_AddRef(IWiaPropertyStorage* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaPropertyStorage_Release(IWiaPropertyStorage* This) { + return This->lpVtbl->Release(This); +} +#endif +#endif + +#endif + + +#endif /* __IWiaPropertyStorage_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaItem interface + */ +#ifndef __IWiaItem_INTERFACE_DEFINED__ +#define __IWiaItem_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaItem, 0x4db1ad10, 0x3391, 0x11d2, 0x9a,0x33, 0x00,0xc0,0x4f,0xa3,0x61,0x45); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("4db1ad10-3391-11d2-9a33-00c04fa36145") +IWiaItem : public IUnknown +{ +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaItem, 0x4db1ad10, 0x3391, 0x11d2, 0x9a,0x33, 0x00,0xc0,0x4f,0xa3,0x61,0x45) +#endif +#else +typedef struct IWiaItemVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaItem *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaItem *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaItem *This); + + END_INTERFACE +} IWiaItemVtbl; + +interface IWiaItem { + CONST_VTBL IWiaItemVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaItem_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaItem_Release(This) (This)->lpVtbl->Release(This) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaItem_QueryInterface(IWiaItem* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaItem_AddRef(IWiaItem* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaItem_Release(IWiaItem* This) { + return This->lpVtbl->Release(This); +} +#endif +#endif + +#endif + + +#endif /* __IWiaItem_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaEventCallback interface + */ +#ifndef __IWiaEventCallback_INTERFACE_DEFINED__ +#define __IWiaEventCallback_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaEventCallback, 0xae6287b0, 0x0084, 0x11d2, 0x97,0x3b, 0x00,0xa0,0xc9,0x06,0x8f,0x2e); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("ae6287b0-0084-11d2-973b-00a0c9068f2e") +IWiaEventCallback : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE ImageEventCallback( + const GUID *pEventGUID, + BSTR bstrEventDescription, + BSTR bstrDeviceID, + BSTR bstrDeviceDescription, + DWORD dwDeviceType, + BSTR bstrFullItemName, + ULONG *pulEventType, + ULONG ulReserved) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaEventCallback, 0xae6287b0, 0x0084, 0x11d2, 0x97,0x3b, 0x00,0xa0,0xc9,0x06,0x8f,0x2e) +#endif +#else +typedef struct IWiaEventCallbackVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaEventCallback *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaEventCallback *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaEventCallback *This); + + /*** IWiaEventCallback methods ***/ + HRESULT (STDMETHODCALLTYPE *ImageEventCallback)( + IWiaEventCallback *This, + const GUID *pEventGUID, + BSTR bstrEventDescription, + BSTR bstrDeviceID, + BSTR bstrDeviceDescription, + DWORD dwDeviceType, + BSTR bstrFullItemName, + ULONG *pulEventType, + ULONG ulReserved); + + END_INTERFACE +} IWiaEventCallbackVtbl; + +interface IWiaEventCallback { + CONST_VTBL IWiaEventCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaEventCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaEventCallback_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaEventCallback_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaEventCallback methods ***/ +#define IWiaEventCallback_ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) (This)->lpVtbl->ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaEventCallback_QueryInterface(IWiaEventCallback* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaEventCallback_AddRef(IWiaEventCallback* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaEventCallback_Release(IWiaEventCallback* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaEventCallback methods ***/ +static inline HRESULT IWiaEventCallback_ImageEventCallback(IWiaEventCallback* This,const GUID *pEventGUID,BSTR bstrEventDescription,BSTR bstrDeviceID,BSTR bstrDeviceDescription,DWORD dwDeviceType,BSTR bstrFullItemName,ULONG *pulEventType,ULONG ulReserved) { + return This->lpVtbl->ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved); +} +#endif +#endif + +#endif + + +#endif /* __IWiaEventCallback_INTERFACE_DEFINED__ */ + +typedef struct _WIA_DEV_CAP { + GUID guid; + ULONG ulFlags; + BSTR bstrName; + BSTR bstrDescription; + BSTR bstrIcon; + BSTR bstrCommandline; +} WIA_DEV_CAP; +typedef struct _WIA_DEV_CAP *PWIA_DEV_CAP; +typedef struct _WIA_DEV_CAP WIA_EVENT_HANDLER; +typedef struct _WIA_DEV_CAP *PWIA_EVENT_HANDLER; +/***************************************************************************** + * IEnumWIA_DEV_CAPS interface + */ +#ifndef __IEnumWIA_DEV_CAPS_INTERFACE_DEFINED__ +#define __IEnumWIA_DEV_CAPS_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IEnumWIA_DEV_CAPS, 0x1fcc4287, 0xaca6, 0x11d2, 0xa0,0x93, 0x00,0xc0,0x4f,0x72,0xdc,0x3c); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("1fcc4287-aca6-11d2-a093-00c04f72dc3c") +IEnumWIA_DEV_CAPS : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE Next( + ULONG celt, + WIA_DEV_CAP *rgelt, + ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumWIA_DEV_CAPS **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCount( + ULONG *pcelt) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IEnumWIA_DEV_CAPS, 0x1fcc4287, 0xaca6, 0x11d2, 0xa0,0x93, 0x00,0xc0,0x4f,0x72,0xdc,0x3c) +#endif +#else +typedef struct IEnumWIA_DEV_CAPSVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IEnumWIA_DEV_CAPS *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IEnumWIA_DEV_CAPS *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IEnumWIA_DEV_CAPS *This); + + /*** IEnumWIA_DEV_CAPS methods ***/ + HRESULT (STDMETHODCALLTYPE *Next)( + IEnumWIA_DEV_CAPS *This, + ULONG celt, + WIA_DEV_CAP *rgelt, + ULONG *pceltFetched); + + HRESULT (STDMETHODCALLTYPE *Skip)( + IEnumWIA_DEV_CAPS *This, + ULONG celt); + + HRESULT (STDMETHODCALLTYPE *Reset)( + IEnumWIA_DEV_CAPS *This); + + HRESULT (STDMETHODCALLTYPE *Clone)( + IEnumWIA_DEV_CAPS *This, + IEnumWIA_DEV_CAPS **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *GetCount)( + IEnumWIA_DEV_CAPS *This, + ULONG *pcelt); + + END_INTERFACE +} IEnumWIA_DEV_CAPSVtbl; + +interface IEnumWIA_DEV_CAPS { + CONST_VTBL IEnumWIA_DEV_CAPSVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IEnumWIA_DEV_CAPS_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IEnumWIA_DEV_CAPS_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IEnumWIA_DEV_CAPS_Release(This) (This)->lpVtbl->Release(This) +/*** IEnumWIA_DEV_CAPS methods ***/ +#define IEnumWIA_DEV_CAPS_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) +#define IEnumWIA_DEV_CAPS_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) +#define IEnumWIA_DEV_CAPS_Reset(This) (This)->lpVtbl->Reset(This) +#define IEnumWIA_DEV_CAPS_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) +#define IEnumWIA_DEV_CAPS_GetCount(This,pcelt) (This)->lpVtbl->GetCount(This,pcelt) +#else +/*** IUnknown methods ***/ +static inline HRESULT IEnumWIA_DEV_CAPS_QueryInterface(IEnumWIA_DEV_CAPS* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IEnumWIA_DEV_CAPS_AddRef(IEnumWIA_DEV_CAPS* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IEnumWIA_DEV_CAPS_Release(IEnumWIA_DEV_CAPS* This) { + return This->lpVtbl->Release(This); +} +/*** IEnumWIA_DEV_CAPS methods ***/ +static inline HRESULT IEnumWIA_DEV_CAPS_Next(IEnumWIA_DEV_CAPS* This,ULONG celt,WIA_DEV_CAP *rgelt,ULONG *pceltFetched) { + return This->lpVtbl->Next(This,celt,rgelt,pceltFetched); +} +static inline HRESULT IEnumWIA_DEV_CAPS_Skip(IEnumWIA_DEV_CAPS* This,ULONG celt) { + return This->lpVtbl->Skip(This,celt); +} +static inline HRESULT IEnumWIA_DEV_CAPS_Reset(IEnumWIA_DEV_CAPS* This) { + return This->lpVtbl->Reset(This); +} +static inline HRESULT IEnumWIA_DEV_CAPS_Clone(IEnumWIA_DEV_CAPS* This,IEnumWIA_DEV_CAPS **ppIEnum) { + return This->lpVtbl->Clone(This,ppIEnum); +} +static inline HRESULT IEnumWIA_DEV_CAPS_GetCount(IEnumWIA_DEV_CAPS* This,ULONG *pcelt) { + return This->lpVtbl->GetCount(This,pcelt); +} +#endif +#endif + +#endif + + +#endif /* __IEnumWIA_DEV_CAPS_INTERFACE_DEFINED__ */ + +typedef struct _WiaTransferParams { + LONG lMessage; + LONG lPercentComplete; + ULONG64 ulTransferredBytes; + HRESULT hrErrorStatus; +} WiaTransferParams; +/***************************************************************************** + * IWiaTransferCallback interface + */ +#ifndef __IWiaTransferCallback_INTERFACE_DEFINED__ +#define __IWiaTransferCallback_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaTransferCallback, 0x27d4eaaf, 0x28a6, 0x4ca5, 0x9a,0xab, 0xe6,0x78,0x16,0x8b,0x95,0x27); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("27d4eaaf-28a6-4ca5-9aab-e678168b9527") +IWiaTransferCallback : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE TransferCallback( + LONG lFlags, + WiaTransferParams *pWiaTransferParams) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNextStream( + LONG lFlags, + BSTR bstrItemName, + BSTR bstrFullItemName, + IStream **ppDestination) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaTransferCallback, 0x27d4eaaf, 0x28a6, 0x4ca5, 0x9a,0xab, 0xe6,0x78,0x16,0x8b,0x95,0x27) +#endif +#else +typedef struct IWiaTransferCallbackVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaTransferCallback *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaTransferCallback *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaTransferCallback *This); + + /*** IWiaTransferCallback methods ***/ + HRESULT (STDMETHODCALLTYPE *TransferCallback)( + IWiaTransferCallback *This, + LONG lFlags, + WiaTransferParams *pWiaTransferParams); + + HRESULT (STDMETHODCALLTYPE *GetNextStream)( + IWiaTransferCallback *This, + LONG lFlags, + BSTR bstrItemName, + BSTR bstrFullItemName, + IStream **ppDestination); + + END_INTERFACE +} IWiaTransferCallbackVtbl; + +interface IWiaTransferCallback { + CONST_VTBL IWiaTransferCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaTransferCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaTransferCallback_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaTransferCallback_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaTransferCallback methods ***/ +#define IWiaTransferCallback_TransferCallback(This,lFlags,pWiaTransferParams) (This)->lpVtbl->TransferCallback(This,lFlags,pWiaTransferParams) +#define IWiaTransferCallback_GetNextStream(This,lFlags,bstrItemName,bstrFullItemName,ppDestination) (This)->lpVtbl->GetNextStream(This,lFlags,bstrItemName,bstrFullItemName,ppDestination) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaTransferCallback_QueryInterface(IWiaTransferCallback* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaTransferCallback_AddRef(IWiaTransferCallback* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaTransferCallback_Release(IWiaTransferCallback* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaTransferCallback methods ***/ +static inline HRESULT IWiaTransferCallback_TransferCallback(IWiaTransferCallback* This,LONG lFlags,WiaTransferParams *pWiaTransferParams) { + return This->lpVtbl->TransferCallback(This,lFlags,pWiaTransferParams); +} +static inline HRESULT IWiaTransferCallback_GetNextStream(IWiaTransferCallback* This,LONG lFlags,BSTR bstrItemName,BSTR bstrFullItemName,IStream **ppDestination) { + return This->lpVtbl->GetNextStream(This,lFlags,bstrItemName,bstrFullItemName,ppDestination); +} +#endif +#endif + +#endif + + +#endif /* __IWiaTransferCallback_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaPreview interface + */ +#ifndef __IWiaPreview_INTERFACE_DEFINED__ +#define __IWiaPreview_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaPreview, 0x95c2b4fd, 0x33f2, 0x4d86, 0xad,0x40, 0x94,0x31,0xf0,0xdf,0x08,0xf7); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("95c2b4fd-33f2-4d86-ad40-9431f0df08f7") +IWiaPreview : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE GetNewPreview( + LONG lFlags, + IWiaItem2 *pWiaItem2, + IWiaTransferCallback *pWiaTransferCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE UpdatePreview( + LONG lFlags, + IWiaItem2 *pChildWiaItem2, + IWiaTransferCallback *pWiaTransferCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE DetectRegions( + LONG lFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clear( + ) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaPreview, 0x95c2b4fd, 0x33f2, 0x4d86, 0xad,0x40, 0x94,0x31,0xf0,0xdf,0x08,0xf7) +#endif +#else +typedef struct IWiaPreviewVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaPreview *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaPreview *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaPreview *This); + + /*** IWiaPreview methods ***/ + HRESULT (STDMETHODCALLTYPE *GetNewPreview)( + IWiaPreview *This, + LONG lFlags, + IWiaItem2 *pWiaItem2, + IWiaTransferCallback *pWiaTransferCallback); + + HRESULT (STDMETHODCALLTYPE *UpdatePreview)( + IWiaPreview *This, + LONG lFlags, + IWiaItem2 *pChildWiaItem2, + IWiaTransferCallback *pWiaTransferCallback); + + HRESULT (STDMETHODCALLTYPE *DetectRegions)( + IWiaPreview *This, + LONG lFlags); + + HRESULT (STDMETHODCALLTYPE *Clear)( + IWiaPreview *This); + + END_INTERFACE +} IWiaPreviewVtbl; + +interface IWiaPreview { + CONST_VTBL IWiaPreviewVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaPreview_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaPreview_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaPreview_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaPreview methods ***/ +#define IWiaPreview_GetNewPreview(This,lFlags,pWiaItem2,pWiaTransferCallback) (This)->lpVtbl->GetNewPreview(This,lFlags,pWiaItem2,pWiaTransferCallback) +#define IWiaPreview_UpdatePreview(This,lFlags,pChildWiaItem2,pWiaTransferCallback) (This)->lpVtbl->UpdatePreview(This,lFlags,pChildWiaItem2,pWiaTransferCallback) +#define IWiaPreview_DetectRegions(This,lFlags) (This)->lpVtbl->DetectRegions(This,lFlags) +#define IWiaPreview_Clear(This) (This)->lpVtbl->Clear(This) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaPreview_QueryInterface(IWiaPreview* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaPreview_AddRef(IWiaPreview* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaPreview_Release(IWiaPreview* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaPreview methods ***/ +static inline HRESULT IWiaPreview_GetNewPreview(IWiaPreview* This,LONG lFlags,IWiaItem2 *pWiaItem2,IWiaTransferCallback *pWiaTransferCallback) { + return This->lpVtbl->GetNewPreview(This,lFlags,pWiaItem2,pWiaTransferCallback); +} +static inline HRESULT IWiaPreview_UpdatePreview(IWiaPreview* This,LONG lFlags,IWiaItem2 *pChildWiaItem2,IWiaTransferCallback *pWiaTransferCallback) { + return This->lpVtbl->UpdatePreview(This,lFlags,pChildWiaItem2,pWiaTransferCallback); +} +static inline HRESULT IWiaPreview_DetectRegions(IWiaPreview* This,LONG lFlags) { + return This->lpVtbl->DetectRegions(This,lFlags); +} +static inline HRESULT IWiaPreview_Clear(IWiaPreview* This) { + return This->lpVtbl->Clear(This); +} +#endif +#endif + +#endif + + +#endif /* __IWiaPreview_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IEnumWiaItem2 interface + */ +#ifndef __IEnumWiaItem2_INTERFACE_DEFINED__ +#define __IEnumWiaItem2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IEnumWiaItem2, 0x59970af4, 0xcd0d, 0x44d9, 0xab,0x24, 0x52,0x29,0x56,0x30,0xe5,0x82); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("59970af4-cd0d-44d9-ab24-52295630e582") +IEnumWiaItem2 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE Next( + ULONG cElt, + IWiaItem2 **ppIWiaItem2, + ULONG *pcEltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + ULONG cElt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumWiaItem2 **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCount( + ULONG *cElt) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IEnumWiaItem2, 0x59970af4, 0xcd0d, 0x44d9, 0xab,0x24, 0x52,0x29,0x56,0x30,0xe5,0x82) +#endif +#else +typedef struct IEnumWiaItem2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IEnumWiaItem2 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IEnumWiaItem2 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IEnumWiaItem2 *This); + + /*** IEnumWiaItem2 methods ***/ + HRESULT (STDMETHODCALLTYPE *Next)( + IEnumWiaItem2 *This, + ULONG cElt, + IWiaItem2 **ppIWiaItem2, + ULONG *pcEltFetched); + + HRESULT (STDMETHODCALLTYPE *Skip)( + IEnumWiaItem2 *This, + ULONG cElt); + + HRESULT (STDMETHODCALLTYPE *Reset)( + IEnumWiaItem2 *This); + + HRESULT (STDMETHODCALLTYPE *Clone)( + IEnumWiaItem2 *This, + IEnumWiaItem2 **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *GetCount)( + IEnumWiaItem2 *This, + ULONG *cElt); + + END_INTERFACE +} IEnumWiaItem2Vtbl; + +interface IEnumWiaItem2 { + CONST_VTBL IEnumWiaItem2Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IEnumWiaItem2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IEnumWiaItem2_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IEnumWiaItem2_Release(This) (This)->lpVtbl->Release(This) +/*** IEnumWiaItem2 methods ***/ +#define IEnumWiaItem2_Next(This,cElt,ppIWiaItem2,pcEltFetched) (This)->lpVtbl->Next(This,cElt,ppIWiaItem2,pcEltFetched) +#define IEnumWiaItem2_Skip(This,cElt) (This)->lpVtbl->Skip(This,cElt) +#define IEnumWiaItem2_Reset(This) (This)->lpVtbl->Reset(This) +#define IEnumWiaItem2_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) +#define IEnumWiaItem2_GetCount(This,cElt) (This)->lpVtbl->GetCount(This,cElt) +#else +/*** IUnknown methods ***/ +static inline HRESULT IEnumWiaItem2_QueryInterface(IEnumWiaItem2* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IEnumWiaItem2_AddRef(IEnumWiaItem2* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IEnumWiaItem2_Release(IEnumWiaItem2* This) { + return This->lpVtbl->Release(This); +} +/*** IEnumWiaItem2 methods ***/ +static inline HRESULT IEnumWiaItem2_Next(IEnumWiaItem2* This,ULONG cElt,IWiaItem2 **ppIWiaItem2,ULONG *pcEltFetched) { + return This->lpVtbl->Next(This,cElt,ppIWiaItem2,pcEltFetched); +} +static inline HRESULT IEnumWiaItem2_Skip(IEnumWiaItem2* This,ULONG cElt) { + return This->lpVtbl->Skip(This,cElt); +} +static inline HRESULT IEnumWiaItem2_Reset(IEnumWiaItem2* This) { + return This->lpVtbl->Reset(This); +} +static inline HRESULT IEnumWiaItem2_Clone(IEnumWiaItem2* This,IEnumWiaItem2 **ppIEnum) { + return This->lpVtbl->Clone(This,ppIEnum); +} +static inline HRESULT IEnumWiaItem2_GetCount(IEnumWiaItem2* This,ULONG *cElt) { + return This->lpVtbl->GetCount(This,cElt); +} +#endif +#endif + +#endif + + +#endif /* __IEnumWiaItem2_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaItem2 interface + */ +#ifndef __IWiaItem2_INTERFACE_DEFINED__ +#define __IWiaItem2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaItem2, 0x6cba0075, 0x1287, 0x407d, 0x9b,0x77, 0xcf,0x0e,0x03,0x04,0x35,0xcc); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("6cba0075-1287-407d-9b77-cf0e030435cc") +IWiaItem2 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE CreateChildItem( + LONG lItemFlags, + LONG lCreationFlags, + BSTR bstrItemName, + IWiaItem2 **ppIWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteItem( + LONG lFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumChildItems( + const GUID *pCategoryGUID, + IEnumWiaItem2 **ppIEnumWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindItemByName( + LONG lFlags, + BSTR bstrFullItemName, + IWiaItem2 **ppIWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetItemCategory( + GUID *pItemCategoryGUID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetItemType( + LONG *pItemType) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeviceDlg( + LONG lFlags, + HWND hwndParent, + BSTR bstrFolderName, + BSTR bstrFilename, + LONG *plNumFiles, + BSTR **ppbstrFilePaths, + IWiaItem2 **ppItem) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeviceCommand( + LONG lFlags, + const GUID *pCmdGUID, + IWiaItem2 **ppIWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumDeviceCapabilities( + LONG lFlags, + IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckExtension( + LONG lFlags, + BSTR bstrName, + REFIID riidExtensionInterface, + WINBOOL *pbExtensionExists) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetExtension( + LONG lFlags, + BSTR bstrName, + REFIID riidExtensionInterface, + void **ppOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParentItem( + IWiaItem2 **ppIWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRootItem( + IWiaItem2 **ppIWiaItem2) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPreviewComponent( + LONG lFlags, + IWiaPreview **ppWiaPreview) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumRegisterEventInfo( + LONG lFlags, + const GUID *pEventGUID, + IEnumWIA_DEV_CAPS **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Diagnostic( + ULONG ulSize, + BYTE *pBuffer) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaItem2, 0x6cba0075, 0x1287, 0x407d, 0x9b,0x77, 0xcf,0x0e,0x03,0x04,0x35,0xcc) +#endif +#else +typedef struct IWiaItem2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaItem2 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaItem2 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaItem2 *This); + + /*** IWiaItem2 methods ***/ + HRESULT (STDMETHODCALLTYPE *CreateChildItem)( + IWiaItem2 *This, + LONG lItemFlags, + LONG lCreationFlags, + BSTR bstrItemName, + IWiaItem2 **ppIWiaItem2); + + HRESULT (STDMETHODCALLTYPE *DeleteItem)( + IWiaItem2 *This, + LONG lFlags); + + HRESULT (STDMETHODCALLTYPE *EnumChildItems)( + IWiaItem2 *This, + const GUID *pCategoryGUID, + IEnumWiaItem2 **ppIEnumWiaItem2); + + HRESULT (STDMETHODCALLTYPE *FindItemByName)( + IWiaItem2 *This, + LONG lFlags, + BSTR bstrFullItemName, + IWiaItem2 **ppIWiaItem2); + + HRESULT (STDMETHODCALLTYPE *GetItemCategory)( + IWiaItem2 *This, + GUID *pItemCategoryGUID); + + HRESULT (STDMETHODCALLTYPE *GetItemType)( + IWiaItem2 *This, + LONG *pItemType); + + HRESULT (STDMETHODCALLTYPE *DeviceDlg)( + IWiaItem2 *This, + LONG lFlags, + HWND hwndParent, + BSTR bstrFolderName, + BSTR bstrFilename, + LONG *plNumFiles, + BSTR **ppbstrFilePaths, + IWiaItem2 **ppItem); + + HRESULT (STDMETHODCALLTYPE *DeviceCommand)( + IWiaItem2 *This, + LONG lFlags, + const GUID *pCmdGUID, + IWiaItem2 **ppIWiaItem2); + + HRESULT (STDMETHODCALLTYPE *EnumDeviceCapabilities)( + IWiaItem2 *This, + LONG lFlags, + IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS); + + HRESULT (STDMETHODCALLTYPE *CheckExtension)( + IWiaItem2 *This, + LONG lFlags, + BSTR bstrName, + REFIID riidExtensionInterface, + WINBOOL *pbExtensionExists); + + HRESULT (STDMETHODCALLTYPE *GetExtension)( + IWiaItem2 *This, + LONG lFlags, + BSTR bstrName, + REFIID riidExtensionInterface, + void **ppOut); + + HRESULT (STDMETHODCALLTYPE *GetParentItem)( + IWiaItem2 *This, + IWiaItem2 **ppIWiaItem2); + + HRESULT (STDMETHODCALLTYPE *GetRootItem)( + IWiaItem2 *This, + IWiaItem2 **ppIWiaItem2); + + HRESULT (STDMETHODCALLTYPE *GetPreviewComponent)( + IWiaItem2 *This, + LONG lFlags, + IWiaPreview **ppWiaPreview); + + HRESULT (STDMETHODCALLTYPE *EnumRegisterEventInfo)( + IWiaItem2 *This, + LONG lFlags, + const GUID *pEventGUID, + IEnumWIA_DEV_CAPS **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *Diagnostic)( + IWiaItem2 *This, + ULONG ulSize, + BYTE *pBuffer); + + END_INTERFACE +} IWiaItem2Vtbl; + +interface IWiaItem2 { + CONST_VTBL IWiaItem2Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaItem2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaItem2_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaItem2_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaItem2 methods ***/ +#define IWiaItem2_CreateChildItem(This,lItemFlags,lCreationFlags,bstrItemName,ppIWiaItem2) (This)->lpVtbl->CreateChildItem(This,lItemFlags,lCreationFlags,bstrItemName,ppIWiaItem2) +#define IWiaItem2_DeleteItem(This,lFlags) (This)->lpVtbl->DeleteItem(This,lFlags) +#define IWiaItem2_EnumChildItems(This,pCategoryGUID,ppIEnumWiaItem2) (This)->lpVtbl->EnumChildItems(This,pCategoryGUID,ppIEnumWiaItem2) +#define IWiaItem2_FindItemByName(This,lFlags,bstrFullItemName,ppIWiaItem2) (This)->lpVtbl->FindItemByName(This,lFlags,bstrFullItemName,ppIWiaItem2) +#define IWiaItem2_GetItemCategory(This,pItemCategoryGUID) (This)->lpVtbl->GetItemCategory(This,pItemCategoryGUID) +#define IWiaItem2_GetItemType(This,pItemType) (This)->lpVtbl->GetItemType(This,pItemType) +#define IWiaItem2_DeviceDlg(This,lFlags,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem) (This)->lpVtbl->DeviceDlg(This,lFlags,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem) +#define IWiaItem2_DeviceCommand(This,lFlags,pCmdGUID,ppIWiaItem2) (This)->lpVtbl->DeviceCommand(This,lFlags,pCmdGUID,ppIWiaItem2) +#define IWiaItem2_EnumDeviceCapabilities(This,lFlags,ppIEnumWIA_DEV_CAPS) (This)->lpVtbl->EnumDeviceCapabilities(This,lFlags,ppIEnumWIA_DEV_CAPS) +#define IWiaItem2_CheckExtension(This,lFlags,bstrName,riidExtensionInterface,pbExtensionExists) (This)->lpVtbl->CheckExtension(This,lFlags,bstrName,riidExtensionInterface,pbExtensionExists) +#define IWiaItem2_GetExtension(This,lFlags,bstrName,riidExtensionInterface,ppOut) (This)->lpVtbl->GetExtension(This,lFlags,bstrName,riidExtensionInterface,ppOut) +#define IWiaItem2_GetParentItem(This,ppIWiaItem2) (This)->lpVtbl->GetParentItem(This,ppIWiaItem2) +#define IWiaItem2_GetRootItem(This,ppIWiaItem2) (This)->lpVtbl->GetRootItem(This,ppIWiaItem2) +#define IWiaItem2_GetPreviewComponent(This,lFlags,ppWiaPreview) (This)->lpVtbl->GetPreviewComponent(This,lFlags,ppWiaPreview) +#define IWiaItem2_EnumRegisterEventInfo(This,lFlags,pEventGUID,ppIEnum) (This)->lpVtbl->EnumRegisterEventInfo(This,lFlags,pEventGUID,ppIEnum) +#define IWiaItem2_Diagnostic(This,ulSize,pBuffer) (This)->lpVtbl->Diagnostic(This,ulSize,pBuffer) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaItem2_QueryInterface(IWiaItem2* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaItem2_AddRef(IWiaItem2* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaItem2_Release(IWiaItem2* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaItem2 methods ***/ +static inline HRESULT IWiaItem2_CreateChildItem(IWiaItem2* This,LONG lItemFlags,LONG lCreationFlags,BSTR bstrItemName,IWiaItem2 **ppIWiaItem2) { + return This->lpVtbl->CreateChildItem(This,lItemFlags,lCreationFlags,bstrItemName,ppIWiaItem2); +} +static inline HRESULT IWiaItem2_DeleteItem(IWiaItem2* This,LONG lFlags) { + return This->lpVtbl->DeleteItem(This,lFlags); +} +static inline HRESULT IWiaItem2_EnumChildItems(IWiaItem2* This,const GUID *pCategoryGUID,IEnumWiaItem2 **ppIEnumWiaItem2) { + return This->lpVtbl->EnumChildItems(This,pCategoryGUID,ppIEnumWiaItem2); +} +static inline HRESULT IWiaItem2_FindItemByName(IWiaItem2* This,LONG lFlags,BSTR bstrFullItemName,IWiaItem2 **ppIWiaItem2) { + return This->lpVtbl->FindItemByName(This,lFlags,bstrFullItemName,ppIWiaItem2); +} +static inline HRESULT IWiaItem2_GetItemCategory(IWiaItem2* This,GUID *pItemCategoryGUID) { + return This->lpVtbl->GetItemCategory(This,pItemCategoryGUID); +} +static inline HRESULT IWiaItem2_GetItemType(IWiaItem2* This,LONG *pItemType) { + return This->lpVtbl->GetItemType(This,pItemType); +} +static inline HRESULT IWiaItem2_DeviceDlg(IWiaItem2* This,LONG lFlags,HWND hwndParent,BSTR bstrFolderName,BSTR bstrFilename,LONG *plNumFiles,BSTR **ppbstrFilePaths,IWiaItem2 **ppItem) { + return This->lpVtbl->DeviceDlg(This,lFlags,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem); +} +static inline HRESULT IWiaItem2_DeviceCommand(IWiaItem2* This,LONG lFlags,const GUID *pCmdGUID,IWiaItem2 **ppIWiaItem2) { + return This->lpVtbl->DeviceCommand(This,lFlags,pCmdGUID,ppIWiaItem2); +} +static inline HRESULT IWiaItem2_EnumDeviceCapabilities(IWiaItem2* This,LONG lFlags,IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS) { + return This->lpVtbl->EnumDeviceCapabilities(This,lFlags,ppIEnumWIA_DEV_CAPS); +} +static inline HRESULT IWiaItem2_CheckExtension(IWiaItem2* This,LONG lFlags,BSTR bstrName,REFIID riidExtensionInterface,WINBOOL *pbExtensionExists) { + return This->lpVtbl->CheckExtension(This,lFlags,bstrName,riidExtensionInterface,pbExtensionExists); +} +static inline HRESULT IWiaItem2_GetExtension(IWiaItem2* This,LONG lFlags,BSTR bstrName,REFIID riidExtensionInterface,void **ppOut) { + return This->lpVtbl->GetExtension(This,lFlags,bstrName,riidExtensionInterface,ppOut); +} +static inline HRESULT IWiaItem2_GetParentItem(IWiaItem2* This,IWiaItem2 **ppIWiaItem2) { + return This->lpVtbl->GetParentItem(This,ppIWiaItem2); +} +static inline HRESULT IWiaItem2_GetRootItem(IWiaItem2* This,IWiaItem2 **ppIWiaItem2) { + return This->lpVtbl->GetRootItem(This,ppIWiaItem2); +} +static inline HRESULT IWiaItem2_GetPreviewComponent(IWiaItem2* This,LONG lFlags,IWiaPreview **ppWiaPreview) { + return This->lpVtbl->GetPreviewComponent(This,lFlags,ppWiaPreview); +} +static inline HRESULT IWiaItem2_EnumRegisterEventInfo(IWiaItem2* This,LONG lFlags,const GUID *pEventGUID,IEnumWIA_DEV_CAPS **ppIEnum) { + return This->lpVtbl->EnumRegisterEventInfo(This,lFlags,pEventGUID,ppIEnum); +} +static inline HRESULT IWiaItem2_Diagnostic(IWiaItem2* This,ULONG ulSize,BYTE *pBuffer) { + return This->lpVtbl->Diagnostic(This,ulSize,pBuffer); +} +#endif +#endif + +#endif + + +#endif /* __IWiaItem2_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaDevMgr2 interface + */ +#ifndef __IWiaDevMgr2_INTERFACE_DEFINED__ +#define __IWiaDevMgr2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaDevMgr2, 0x79c07cf1, 0xcbdd, 0x41ee, 0x8e,0xc3, 0xf0,0x00,0x80,0xca,0xda,0x7a); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("79c07cf1-cbdd-41ee-8ec3-f00080cada7a") +IWiaDevMgr2 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE EnumDeviceInfo( + LONG lFlags, + IEnumWIA_DEV_INFO **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDevice( + LONG lFlags, + BSTR bstrDeviceID, + IWiaItem2 **ppWiaItem2Root) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlg( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem2 **ppItemRoot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlgID( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackInterface( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackProgram( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrFullAppName, + BSTR bstrCommandLineArg, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackCLSID( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetImageDlg( + LONG lFlags, + BSTR bstrDeviceID, + HWND hwndParent, + BSTR bstrFolderName, + BSTR bstrFilename, + LONG *plNumFiles, + BSTR **ppbstrFilePaths, + IWiaItem2 **ppItem) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaDevMgr2, 0x79c07cf1, 0xcbdd, 0x41ee, 0x8e,0xc3, 0xf0,0x00,0x80,0xca,0xda,0x7a) +#endif +#else +typedef struct IWiaDevMgr2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaDevMgr2 *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaDevMgr2 *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaDevMgr2 *This); + + /*** IWiaDevMgr2 methods ***/ + HRESULT (STDMETHODCALLTYPE *EnumDeviceInfo)( + IWiaDevMgr2 *This, + LONG lFlags, + IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *CreateDevice)( + IWiaDevMgr2 *This, + LONG lFlags, + BSTR bstrDeviceID, + IWiaItem2 **ppWiaItem2Root); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlg)( + IWiaDevMgr2 *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem2 **ppItemRoot); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlgID)( + IWiaDevMgr2 *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackInterface)( + IWiaDevMgr2 *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackProgram)( + IWiaDevMgr2 *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrFullAppName, + BSTR bstrCommandLineArg, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackCLSID)( + IWiaDevMgr2 *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *GetImageDlg)( + IWiaDevMgr2 *This, + LONG lFlags, + BSTR bstrDeviceID, + HWND hwndParent, + BSTR bstrFolderName, + BSTR bstrFilename, + LONG *plNumFiles, + BSTR **ppbstrFilePaths, + IWiaItem2 **ppItem); + + END_INTERFACE +} IWiaDevMgr2Vtbl; + +interface IWiaDevMgr2 { + CONST_VTBL IWiaDevMgr2Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaDevMgr2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaDevMgr2_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaDevMgr2_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaDevMgr2 methods ***/ +#define IWiaDevMgr2_EnumDeviceInfo(This,lFlags,ppIEnum) (This)->lpVtbl->EnumDeviceInfo(This,lFlags,ppIEnum) +#define IWiaDevMgr2_CreateDevice(This,lFlags,bstrDeviceID,ppWiaItem2Root) (This)->lpVtbl->CreateDevice(This,lFlags,bstrDeviceID,ppWiaItem2Root) +#define IWiaDevMgr2_SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) (This)->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) +#define IWiaDevMgr2_SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) (This)->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) +#define IWiaDevMgr2_RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) (This)->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) +#define IWiaDevMgr2_RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrFullAppName,bstrCommandLineArg,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrFullAppName,bstrCommandLineArg,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr2_RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr2_GetImageDlg(This,lFlags,bstrDeviceID,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem) (This)->lpVtbl->GetImageDlg(This,lFlags,bstrDeviceID,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaDevMgr2_QueryInterface(IWiaDevMgr2* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaDevMgr2_AddRef(IWiaDevMgr2* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaDevMgr2_Release(IWiaDevMgr2* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaDevMgr2 methods ***/ +static inline HRESULT IWiaDevMgr2_EnumDeviceInfo(IWiaDevMgr2* This,LONG lFlags,IEnumWIA_DEV_INFO **ppIEnum) { + return This->lpVtbl->EnumDeviceInfo(This,lFlags,ppIEnum); +} +static inline HRESULT IWiaDevMgr2_CreateDevice(IWiaDevMgr2* This,LONG lFlags,BSTR bstrDeviceID,IWiaItem2 **ppWiaItem2Root) { + return This->lpVtbl->CreateDevice(This,lFlags,bstrDeviceID,ppWiaItem2Root); +} +static inline HRESULT IWiaDevMgr2_SelectDeviceDlg(IWiaDevMgr2* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem2 **ppItemRoot) { + return This->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot); +} +static inline HRESULT IWiaDevMgr2_SelectDeviceDlgID(IWiaDevMgr2* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID) { + return This->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID); +} +static inline HRESULT IWiaDevMgr2_RegisterEventCallbackInterface(IWiaDevMgr2* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject) { + return This->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject); +} +static inline HRESULT IWiaDevMgr2_RegisterEventCallbackProgram(IWiaDevMgr2* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrFullAppName,BSTR bstrCommandLineArg,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrFullAppName,bstrCommandLineArg,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr2_RegisterEventCallbackCLSID(IWiaDevMgr2* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr2_GetImageDlg(IWiaDevMgr2* This,LONG lFlags,BSTR bstrDeviceID,HWND hwndParent,BSTR bstrFolderName,BSTR bstrFilename,LONG *plNumFiles,BSTR **ppbstrFilePaths,IWiaItem2 **ppItem) { + return This->lpVtbl->GetImageDlg(This,lFlags,bstrDeviceID,hwndParent,bstrFolderName,bstrFilename,plNumFiles,ppbstrFilePaths,ppItem); +} +#endif +#endif + +#endif + + +#endif /* __IWiaDevMgr2_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * WiaDevMgr2 coclass + */ + +DEFINE_GUID(CLSID_WiaDevMgr2, 0xb6c292bc, 0x7c88, 0x41ee, 0x8b,0x54, 0x8e,0xc9,0x26,0x17,0xe5,0x99); + +#ifdef __cplusplus +class DECLSPEC_UUID("b6c292bc-7c88-41ee-8b54-8ec92617e599") WiaDevMgr2; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(WiaDevMgr2, 0xb6c292bc, 0x7c88, 0x41ee, 0x8b,0x54, 0x8e,0xc9,0x26,0x17,0xe5,0x99) +#endif +#endif + +/* Begin additional prototypes for all interfaces */ + +ULONG __RPC_USER BSTR_UserSize (ULONG *, ULONG, BSTR *); +unsigned char * __RPC_USER BSTR_UserMarshal (ULONG *, unsigned char *, BSTR *); +unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *); +void __RPC_USER BSTR_UserFree (ULONG *, BSTR *); +ULONG __RPC_USER HWND_UserSize (ULONG *, ULONG, HWND *); +unsigned char * __RPC_USER HWND_UserMarshal (ULONG *, unsigned char *, HWND *); +unsigned char * __RPC_USER HWND_UserUnmarshal(ULONG *, unsigned char *, HWND *); +void __RPC_USER HWND_UserFree (ULONG *, HWND *); + +/* End additional prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __wia_lh_h__ */ diff --git a/lib/libc/include/any-windows-any/wia_xp.h b/lib/libc/include/any-windows-any/wia_xp.h new file mode 100644 index 000000000000..3364c2fdf290 --- /dev/null +++ b/lib/libc/include/any-windows-any/wia_xp.h @@ -0,0 +1,692 @@ +/*** Autogenerated by WIDL 10.0-rc1 from include/wia_xp.idl - Do not edit ***/ + +#ifdef _WIN32 +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif +#include +#include +#endif + +#ifndef COM_NO_WINDOWS_H +#include +#include +#endif + +#ifndef __wia_xp_h__ +#define __wia_xp_h__ + +/* Forward declarations */ + +#ifndef __IWiaDevMgr_FWD_DEFINED__ +#define __IWiaDevMgr_FWD_DEFINED__ +typedef interface IWiaDevMgr IWiaDevMgr; +#ifdef __cplusplus +interface IWiaDevMgr; +#endif /* __cplusplus */ +#endif + +#ifndef __IEnumWIA_DEV_INFO_FWD_DEFINED__ +#define __IEnumWIA_DEV_INFO_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_INFO IEnumWIA_DEV_INFO; +#ifdef __cplusplus +interface IEnumWIA_DEV_INFO; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPropertyStorage_FWD_DEFINED__ +#define __IWiaPropertyStorage_FWD_DEFINED__ +typedef interface IWiaPropertyStorage IWiaPropertyStorage; +#ifdef __cplusplus +interface IWiaPropertyStorage; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem_FWD_DEFINED__ +#define __IWiaItem_FWD_DEFINED__ +typedef interface IWiaItem IWiaItem; +#ifdef __cplusplus +interface IWiaItem; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaEventCallback_FWD_DEFINED__ +#define __IWiaEventCallback_FWD_DEFINED__ +typedef interface IWiaEventCallback IWiaEventCallback; +#ifdef __cplusplus +interface IWiaEventCallback; +#endif /* __cplusplus */ +#endif + +/* Headers for imported files */ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#ifndef __IEnumWIA_DEV_INFO_FWD_DEFINED__ +#define __IEnumWIA_DEV_INFO_FWD_DEFINED__ +typedef interface IEnumWIA_DEV_INFO IEnumWIA_DEV_INFO; +#ifdef __cplusplus +interface IEnumWIA_DEV_INFO; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaPropertyStorage_FWD_DEFINED__ +#define __IWiaPropertyStorage_FWD_DEFINED__ +typedef interface IWiaPropertyStorage IWiaPropertyStorage; +#ifdef __cplusplus +interface IWiaPropertyStorage; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaItem_FWD_DEFINED__ +#define __IWiaItem_FWD_DEFINED__ +typedef interface IWiaItem IWiaItem; +#ifdef __cplusplus +interface IWiaItem; +#endif /* __cplusplus */ +#endif + +#ifndef __IWiaEventCallback_FWD_DEFINED__ +#define __IWiaEventCallback_FWD_DEFINED__ +typedef interface IWiaEventCallback IWiaEventCallback; +#ifdef __cplusplus +interface IWiaEventCallback; +#endif /* __cplusplus */ +#endif + +DEFINE_GUID(CLSID_WiaDevMgr, 0xa1f4e726,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11); +/***************************************************************************** + * IWiaDevMgr interface + */ +#ifndef __IWiaDevMgr_INTERFACE_DEFINED__ +#define __IWiaDevMgr_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaDevMgr, 0x5eb2502a, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("5eb2502a-8cf1-11d1-bf92-0060081ed811") +IWiaDevMgr : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE EnumDeviceInfo( + LONG lFlag, + IEnumWIA_DEV_INFO **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateDevice( + BSTR bstrDeviceID, + IWiaItem **ppWiaItemRoot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlg( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem **ppItemRoot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDeviceDlgID( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetImageDlg( + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + LONG lIntent, + IWiaItem *pItemRoot, + BSTR bstrFilename, + GUID *pguidFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackProgram( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrCommandline, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackInterface( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterEventCallbackCLSID( + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddDeviceDlg( + HWND hwndParent, + LONG lFlags) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaDevMgr, 0x5eb2502a, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11) +#endif +#else +typedef struct IWiaDevMgrVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaDevMgr *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaDevMgr *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaDevMgr *This); + + /*** IWiaDevMgr methods ***/ + HRESULT (STDMETHODCALLTYPE *EnumDeviceInfo)( + IWiaDevMgr *This, + LONG lFlag, + IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *CreateDevice)( + IWiaDevMgr *This, + BSTR bstrDeviceID, + IWiaItem **ppWiaItemRoot); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID, + IWiaItem **ppItemRoot); + + HRESULT (STDMETHODCALLTYPE *SelectDeviceDlgID)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + BSTR *pbstrDeviceID); + + HRESULT (STDMETHODCALLTYPE *GetImageDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lDeviceType, + LONG lFlags, + LONG lIntent, + IWiaItem *pItemRoot, + BSTR bstrFilename, + GUID *pguidFormat); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackProgram)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + BSTR bstrCommandline, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackInterface)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + IWiaEventCallback *pIWiaEventCallback, + IUnknown **pEventObject); + + HRESULT (STDMETHODCALLTYPE *RegisterEventCallbackCLSID)( + IWiaDevMgr *This, + LONG lFlags, + BSTR bstrDeviceID, + const GUID *pEventGUID, + const GUID *pClsID, + BSTR bstrName, + BSTR bstrDescription, + BSTR bstrIcon); + + HRESULT (STDMETHODCALLTYPE *AddDeviceDlg)( + IWiaDevMgr *This, + HWND hwndParent, + LONG lFlags); + + END_INTERFACE +} IWiaDevMgrVtbl; + +interface IWiaDevMgr { + CONST_VTBL IWiaDevMgrVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaDevMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaDevMgr_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaDevMgr_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaDevMgr methods ***/ +#define IWiaDevMgr_EnumDeviceInfo(This,lFlag,ppIEnum) (This)->lpVtbl->EnumDeviceInfo(This,lFlag,ppIEnum) +#define IWiaDevMgr_CreateDevice(This,bstrDeviceID,ppWiaItemRoot) (This)->lpVtbl->CreateDevice(This,bstrDeviceID,ppWiaItemRoot) +#define IWiaDevMgr_SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) (This)->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot) +#define IWiaDevMgr_SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) (This)->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID) +#define IWiaDevMgr_GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) (This)->lpVtbl->GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat) +#define IWiaDevMgr_RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr_RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) (This)->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject) +#define IWiaDevMgr_RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) (This)->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon) +#define IWiaDevMgr_AddDeviceDlg(This,hwndParent,lFlags) (This)->lpVtbl->AddDeviceDlg(This,hwndParent,lFlags) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaDevMgr_QueryInterface(IWiaDevMgr* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaDevMgr_AddRef(IWiaDevMgr* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaDevMgr_Release(IWiaDevMgr* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaDevMgr methods ***/ +static inline HRESULT IWiaDevMgr_EnumDeviceInfo(IWiaDevMgr* This,LONG lFlag,IEnumWIA_DEV_INFO **ppIEnum) { + return This->lpVtbl->EnumDeviceInfo(This,lFlag,ppIEnum); +} +static inline HRESULT IWiaDevMgr_CreateDevice(IWiaDevMgr* This,BSTR bstrDeviceID,IWiaItem **ppWiaItemRoot) { + return This->lpVtbl->CreateDevice(This,bstrDeviceID,ppWiaItemRoot); +} +static inline HRESULT IWiaDevMgr_SelectDeviceDlg(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID,IWiaItem **ppItemRoot) { + return This->lpVtbl->SelectDeviceDlg(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID,ppItemRoot); +} +static inline HRESULT IWiaDevMgr_SelectDeviceDlgID(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,BSTR *pbstrDeviceID) { + return This->lpVtbl->SelectDeviceDlgID(This,hwndParent,lDeviceType,lFlags,pbstrDeviceID); +} +static inline HRESULT IWiaDevMgr_GetImageDlg(IWiaDevMgr* This,HWND hwndParent,LONG lDeviceType,LONG lFlags,LONG lIntent,IWiaItem *pItemRoot,BSTR bstrFilename,GUID *pguidFormat) { + return This->lpVtbl->GetImageDlg(This,hwndParent,lDeviceType,lFlags,lIntent,pItemRoot,bstrFilename,pguidFormat); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackProgram(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,BSTR bstrCommandline,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackProgram(This,lFlags,bstrDeviceID,pEventGUID,bstrCommandline,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackInterface(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,IWiaEventCallback *pIWiaEventCallback,IUnknown **pEventObject) { + return This->lpVtbl->RegisterEventCallbackInterface(This,lFlags,bstrDeviceID,pEventGUID,pIWiaEventCallback,pEventObject); +} +static inline HRESULT IWiaDevMgr_RegisterEventCallbackCLSID(IWiaDevMgr* This,LONG lFlags,BSTR bstrDeviceID,const GUID *pEventGUID,const GUID *pClsID,BSTR bstrName,BSTR bstrDescription,BSTR bstrIcon) { + return This->lpVtbl->RegisterEventCallbackCLSID(This,lFlags,bstrDeviceID,pEventGUID,pClsID,bstrName,bstrDescription,bstrIcon); +} +static inline HRESULT IWiaDevMgr_AddDeviceDlg(IWiaDevMgr* This,HWND hwndParent,LONG lFlags) { + return This->lpVtbl->AddDeviceDlg(This,hwndParent,lFlags); +} +#endif +#endif + +#endif + + +#endif /* __IWiaDevMgr_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IEnumWIA_DEV_INFO interface + */ +#ifndef __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ +#define __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IEnumWIA_DEV_INFO, 0x5e38b83c, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("5e38b83c-8cf1-11d1-bf92-0060081ed811") +IEnumWIA_DEV_INFO : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE Next( + ULONG celt, + IWiaPropertyStorage **rgelt, + ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumWIA_DEV_INFO **ppIEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCount( + ULONG *celt) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IEnumWIA_DEV_INFO, 0x5e38b83c, 0x8cf1, 0x11d1, 0xbf,0x92, 0x00,0x60,0x08,0x1e,0xd8,0x11) +#endif +#else +typedef struct IEnumWIA_DEV_INFOVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IEnumWIA_DEV_INFO *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IEnumWIA_DEV_INFO *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IEnumWIA_DEV_INFO *This); + + /*** IEnumWIA_DEV_INFO methods ***/ + HRESULT (STDMETHODCALLTYPE *Next)( + IEnumWIA_DEV_INFO *This, + ULONG celt, + IWiaPropertyStorage **rgelt, + ULONG *pceltFetched); + + HRESULT (STDMETHODCALLTYPE *Skip)( + IEnumWIA_DEV_INFO *This, + ULONG celt); + + HRESULT (STDMETHODCALLTYPE *Reset)( + IEnumWIA_DEV_INFO *This); + + HRESULT (STDMETHODCALLTYPE *Clone)( + IEnumWIA_DEV_INFO *This, + IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT (STDMETHODCALLTYPE *GetCount)( + IEnumWIA_DEV_INFO *This, + ULONG *celt); + + END_INTERFACE +} IEnumWIA_DEV_INFOVtbl; + +interface IEnumWIA_DEV_INFO { + CONST_VTBL IEnumWIA_DEV_INFOVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IEnumWIA_DEV_INFO_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IEnumWIA_DEV_INFO_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IEnumWIA_DEV_INFO_Release(This) (This)->lpVtbl->Release(This) +/*** IEnumWIA_DEV_INFO methods ***/ +#define IEnumWIA_DEV_INFO_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched) +#define IEnumWIA_DEV_INFO_Skip(This,celt) (This)->lpVtbl->Skip(This,celt) +#define IEnumWIA_DEV_INFO_Reset(This) (This)->lpVtbl->Reset(This) +#define IEnumWIA_DEV_INFO_Clone(This,ppIEnum) (This)->lpVtbl->Clone(This,ppIEnum) +#define IEnumWIA_DEV_INFO_GetCount(This,celt) (This)->lpVtbl->GetCount(This,celt) +#else +/*** IUnknown methods ***/ +static inline HRESULT IEnumWIA_DEV_INFO_QueryInterface(IEnumWIA_DEV_INFO* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IEnumWIA_DEV_INFO_AddRef(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IEnumWIA_DEV_INFO_Release(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->Release(This); +} +/*** IEnumWIA_DEV_INFO methods ***/ +static inline HRESULT IEnumWIA_DEV_INFO_Next(IEnumWIA_DEV_INFO* This,ULONG celt,IWiaPropertyStorage **rgelt,ULONG *pceltFetched) { + return This->lpVtbl->Next(This,celt,rgelt,pceltFetched); +} +static inline HRESULT IEnumWIA_DEV_INFO_Skip(IEnumWIA_DEV_INFO* This,ULONG celt) { + return This->lpVtbl->Skip(This,celt); +} +static inline HRESULT IEnumWIA_DEV_INFO_Reset(IEnumWIA_DEV_INFO* This) { + return This->lpVtbl->Reset(This); +} +static inline HRESULT IEnumWIA_DEV_INFO_Clone(IEnumWIA_DEV_INFO* This,IEnumWIA_DEV_INFO **ppIEnum) { + return This->lpVtbl->Clone(This,ppIEnum); +} +static inline HRESULT IEnumWIA_DEV_INFO_GetCount(IEnumWIA_DEV_INFO* This,ULONG *celt) { + return This->lpVtbl->GetCount(This,celt); +} +#endif +#endif + +#endif + + +#endif /* __IEnumWIA_DEV_INFO_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaPropertyStorage interface + */ +#ifndef __IWiaPropertyStorage_INTERFACE_DEFINED__ +#define __IWiaPropertyStorage_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaPropertyStorage, 0x98b5e8a0, 0x29cc, 0x491a, 0xaa,0xc0, 0xe6,0xdb,0x4f,0xdc,0xce,0xb6); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("98b5e8a0-29cc-491a-aac0-e6db4fdcceb6") +IWiaPropertyStorage : public IUnknown +{ +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaPropertyStorage, 0x98b5e8a0, 0x29cc, 0x491a, 0xaa,0xc0, 0xe6,0xdb,0x4f,0xdc,0xce,0xb6) +#endif +#else +typedef struct IWiaPropertyStorageVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaPropertyStorage *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaPropertyStorage *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaPropertyStorage *This); + + END_INTERFACE +} IWiaPropertyStorageVtbl; + +interface IWiaPropertyStorage { + CONST_VTBL IWiaPropertyStorageVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaPropertyStorage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaPropertyStorage_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaPropertyStorage_Release(This) (This)->lpVtbl->Release(This) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaPropertyStorage_QueryInterface(IWiaPropertyStorage* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaPropertyStorage_AddRef(IWiaPropertyStorage* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaPropertyStorage_Release(IWiaPropertyStorage* This) { + return This->lpVtbl->Release(This); +} +#endif +#endif + +#endif + + +#endif /* __IWiaPropertyStorage_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaItem interface + */ +#ifndef __IWiaItem_INTERFACE_DEFINED__ +#define __IWiaItem_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaItem, 0x4db1ad10, 0x3391, 0x11d2, 0x9a,0x33, 0x00,0xc0,0x4f,0xa3,0x61,0x45); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("4db1ad10-3391-11d2-9a33-00c04fa36145") +IWiaItem : public IUnknown +{ +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaItem, 0x4db1ad10, 0x3391, 0x11d2, 0x9a,0x33, 0x00,0xc0,0x4f,0xa3,0x61,0x45) +#endif +#else +typedef struct IWiaItemVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaItem *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaItem *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaItem *This); + + END_INTERFACE +} IWiaItemVtbl; + +interface IWiaItem { + CONST_VTBL IWiaItemVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaItem_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaItem_Release(This) (This)->lpVtbl->Release(This) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaItem_QueryInterface(IWiaItem* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaItem_AddRef(IWiaItem* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaItem_Release(IWiaItem* This) { + return This->lpVtbl->Release(This); +} +#endif +#endif + +#endif + + +#endif /* __IWiaItem_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IWiaEventCallback interface + */ +#ifndef __IWiaEventCallback_INTERFACE_DEFINED__ +#define __IWiaEventCallback_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWiaEventCallback, 0xae6287b0, 0x0084, 0x11d2, 0x97,0x3b, 0x00,0xa0,0xc9,0x06,0x8f,0x2e); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("ae6287b0-0084-11d2-973b-00a0c9068f2e") +IWiaEventCallback : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE ImageEventCallback( + const GUID *pEventGUID, + BSTR bstrEventDescription, + BSTR bstrDeviceID, + BSTR bstrDeviceDescription, + DWORD dwDeviceType, + BSTR bstrFullItemName, + ULONG *pulEventType, + ULONG ulReserved) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IWiaEventCallback, 0xae6287b0, 0x0084, 0x11d2, 0x97,0x3b, 0x00,0xa0,0xc9,0x06,0x8f,0x2e) +#endif +#else +typedef struct IWiaEventCallbackVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWiaEventCallback *This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWiaEventCallback *This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWiaEventCallback *This); + + /*** IWiaEventCallback methods ***/ + HRESULT (STDMETHODCALLTYPE *ImageEventCallback)( + IWiaEventCallback *This, + const GUID *pEventGUID, + BSTR bstrEventDescription, + BSTR bstrDeviceID, + BSTR bstrDeviceDescription, + DWORD dwDeviceType, + BSTR bstrFullItemName, + ULONG *pulEventType, + ULONG ulReserved); + + END_INTERFACE +} IWiaEventCallbackVtbl; + +interface IWiaEventCallback { + CONST_VTBL IWiaEventCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IWiaEventCallback_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IWiaEventCallback_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IWiaEventCallback_Release(This) (This)->lpVtbl->Release(This) +/*** IWiaEventCallback methods ***/ +#define IWiaEventCallback_ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) (This)->lpVtbl->ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved) +#else +/*** IUnknown methods ***/ +static inline HRESULT IWiaEventCallback_QueryInterface(IWiaEventCallback* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static inline ULONG IWiaEventCallback_AddRef(IWiaEventCallback* This) { + return This->lpVtbl->AddRef(This); +} +static inline ULONG IWiaEventCallback_Release(IWiaEventCallback* This) { + return This->lpVtbl->Release(This); +} +/*** IWiaEventCallback methods ***/ +static inline HRESULT IWiaEventCallback_ImageEventCallback(IWiaEventCallback* This,const GUID *pEventGUID,BSTR bstrEventDescription,BSTR bstrDeviceID,BSTR bstrDeviceDescription,DWORD dwDeviceType,BSTR bstrFullItemName,ULONG *pulEventType,ULONG ulReserved) { + return This->lpVtbl->ImageEventCallback(This,pEventGUID,bstrEventDescription,bstrDeviceID,bstrDeviceDescription,dwDeviceType,bstrFullItemName,pulEventType,ulReserved); +} +#endif +#endif + +#endif + + +#endif /* __IWiaEventCallback_INTERFACE_DEFINED__ */ + +/* Begin additional prototypes for all interfaces */ + +ULONG __RPC_USER BSTR_UserSize (ULONG *, ULONG, BSTR *); +unsigned char * __RPC_USER BSTR_UserMarshal (ULONG *, unsigned char *, BSTR *); +unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *); +void __RPC_USER BSTR_UserFree (ULONG *, BSTR *); +ULONG __RPC_USER HWND_UserSize (ULONG *, ULONG, HWND *); +unsigned char * __RPC_USER HWND_UserMarshal (ULONG *, unsigned char *, HWND *); +unsigned char * __RPC_USER HWND_UserUnmarshal(ULONG *, unsigned char *, HWND *); +void __RPC_USER HWND_UserFree (ULONG *, HWND *); + +/* End additional prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __wia_xp_h__ */ diff --git a/lib/libc/include/any-windows-any/wiadef.h b/lib/libc/include/any-windows-any/wiadef.h index 63fcee776364..c6d5a62b17b8 100644 --- a/lib/libc/include/any-windows-any/wiadef.h +++ b/lib/libc/include/any-windows-any/wiadef.h @@ -12,10 +12,6 @@ #include #endif -#ifndef __wia_h__ -#error Please include in front wia.h instead. -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/lib/libc/include/any-windows-any/wincodec.h b/lib/libc/include/any-windows-any/wincodec.h index 75185b1fd453..104526b69eba 100644 --- a/lib/libc/include/any-windows-any/wincodec.h +++ b/lib/libc/include/any-windows-any/wincodec.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wincodec.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wincodec.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wincodecsdk.h b/lib/libc/include/any-windows-any/wincodecsdk.h index 088ea917dbff..f0ff12dfdd74 100644 --- a/lib/libc/include/any-windows-any/wincodecsdk.h +++ b/lib/libc/include/any-windows-any/wincodecsdk.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wincodecsdk.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wincodecsdk.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wincon.h b/lib/libc/include/any-windows-any/wincon.h index d4dea612bfcc..47fb873937a1 100644 --- a/lib/libc/include/any-windows-any/wincon.h +++ b/lib/libc/include/any-windows-any/wincon.h @@ -3,422 +3,35 @@ * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ + #ifndef _WINCON_ #define _WINCON_ -#include <_mingw_unicode.h> - #include #ifdef __cplusplus extern "C" { #endif -#define CONSOLE_REAL_OUTPUT_HANDLE (LongToHandle(-2)) -#define CONSOLE_REAL_INPUT_HANDLE (LongToHandle(-3)) - - typedef struct _COORD { - SHORT X; - SHORT Y; - } COORD,*PCOORD; - - typedef struct _SMALL_RECT { - SHORT Left; - SHORT Top; - SHORT Right; - SHORT Bottom; - } SMALL_RECT,*PSMALL_RECT; - - typedef struct _KEY_EVENT_RECORD { - WINBOOL bKeyDown; - WORD wRepeatCount; - WORD wVirtualKeyCode; - WORD wVirtualScanCode; - union { - WCHAR UnicodeChar; - CHAR AsciiChar; - } uChar; - DWORD dwControlKeyState; - } KEY_EVENT_RECORD,*PKEY_EVENT_RECORD; - -#define RIGHT_ALT_PRESSED 0x1 -#define LEFT_ALT_PRESSED 0x2 -#define RIGHT_CTRL_PRESSED 0x4 -#define LEFT_CTRL_PRESSED 0x8 -#define SHIFT_PRESSED 0x10 -#define NUMLOCK_ON 0x20 -#define SCROLLLOCK_ON 0x40 -#define CAPSLOCK_ON 0x80 -#define ENHANCED_KEY 0x100 -#define NLS_DBCSCHAR 0x10000 -#define NLS_ALPHANUMERIC 0x0 -#define NLS_KATAKANA 0x20000 -#define NLS_HIRAGANA 0x40000 -#define NLS_ROMAN 0x400000 -#define NLS_IME_CONVERSION 0x800000 -#define ALTNUMPAD_BIT 0x4000000 -#define NLS_IME_DISABLE 0x20000000 - - typedef struct _MOUSE_EVENT_RECORD { - COORD dwMousePosition; - DWORD dwButtonState; - DWORD dwControlKeyState; - DWORD dwEventFlags; - } MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD; +#include -#define FROM_LEFT_1ST_BUTTON_PRESSED 0x1 -#define RIGHTMOST_BUTTON_PRESSED 0x2 -#define FROM_LEFT_2ND_BUTTON_PRESSED 0x4 -#define FROM_LEFT_3RD_BUTTON_PRESSED 0x8 -#define FROM_LEFT_4TH_BUTTON_PRESSED 0x10 - -#define MOUSE_MOVED 0x1 -#define DOUBLE_CLICK 0x2 -#define MOUSE_WHEELED 0x4 -#if (_WIN32_WINNT >= 0x0600) -#define MOUSE_HWHEELED 0x8 +#ifndef NOGDI +#include #endif - typedef struct _WINDOW_BUFFER_SIZE_RECORD { - COORD dwSize; - } WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD; - - typedef struct _MENU_EVENT_RECORD { - UINT dwCommandId; - } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD; - - typedef struct _FOCUS_EVENT_RECORD { - WINBOOL bSetFocus; - } FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD; - - typedef struct _INPUT_RECORD { - WORD EventType; - union { - KEY_EVENT_RECORD KeyEvent; - MOUSE_EVENT_RECORD MouseEvent; - WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; - MENU_EVENT_RECORD MenuEvent; - FOCUS_EVENT_RECORD FocusEvent; - } Event; - } INPUT_RECORD,*PINPUT_RECORD; - -#define KEY_EVENT 0x1 -#define MOUSE_EVENT 0x2 -#define WINDOW_BUFFER_SIZE_EVENT 0x4 -#define MENU_EVENT 0x8 -#define FOCUS_EVENT 0x10 - - typedef struct _CHAR_INFO { - union { - WCHAR UnicodeChar; - CHAR AsciiChar; - } Char; - WORD Attributes; - } CHAR_INFO,*PCHAR_INFO; - -#define FOREGROUND_BLUE 0x1 -#define FOREGROUND_GREEN 0x2 -#define FOREGROUND_RED 0x4 -#define FOREGROUND_INTENSITY 0x8 -#define BACKGROUND_BLUE 0x10 -#define BACKGROUND_GREEN 0x20 -#define BACKGROUND_RED 0x40 -#define BACKGROUND_INTENSITY 0x80 -#define COMMON_LVB_LEADING_BYTE 0x100 -#define COMMON_LVB_TRAILING_BYTE 0x200 -#define COMMON_LVB_GRID_HORIZONTAL 0x400 -#define COMMON_LVB_GRID_LVERTICAL 0x800 -#define COMMON_LVB_GRID_RVERTICAL 0x1000 -#define COMMON_LVB_REVERSE_VIDEO 0x4000 -#define COMMON_LVB_UNDERSCORE 0x8000 - -#define COMMON_LVB_SBCSDBCS 0x300 - - typedef struct _CONSOLE_SCREEN_BUFFER_INFO { - COORD dwSize; - COORD dwCursorPosition; - WORD wAttributes; - SMALL_RECT srWindow; - COORD dwMaximumWindowSize; - } CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO; - - typedef struct _CONSOLE_CURSOR_INFO { - DWORD dwSize; - WINBOOL bVisible; - } CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO; - - typedef struct _CONSOLE_FONT_INFO { - DWORD nFont; - COORD dwFontSize; - } CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO; - - typedef struct _CONSOLE_SELECTION_INFO { - DWORD dwFlags; - COORD dwSelectionAnchor; - SMALL_RECT srSelection; - } CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO; - -#define CONSOLE_NO_SELECTION 0x0 -#define CONSOLE_SELECTION_IN_PROGRESS 0x1 -#define CONSOLE_SELECTION_NOT_EMPTY 0x2 -#define CONSOLE_MOUSE_SELECTION 0x4 -#define CONSOLE_MOUSE_DOWN 0x8 - - typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType); - -#define CTRL_C_EVENT 0 -#define CTRL_BREAK_EVENT 1 -#define CTRL_CLOSE_EVENT 2 - -#define CTRL_LOGOFF_EVENT 5 -#define CTRL_SHUTDOWN_EVENT 6 - -#define ENABLE_PROCESSED_INPUT 0x1 -#define ENABLE_LINE_INPUT 0x2 -#define ENABLE_ECHO_INPUT 0x4 -#define ENABLE_WINDOW_INPUT 0x8 -#define ENABLE_MOUSE_INPUT 0x10 -#define ENABLE_INSERT_MODE 0x20 -#define ENABLE_QUICK_EDIT_MODE 0x40 -#define ENABLE_EXTENDED_FLAGS 0x80 -#define ENABLE_AUTO_POSITION 0x100 -#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x200 - -#define ENABLE_PROCESSED_OUTPUT 0x1 -#define ENABLE_WRAP_AT_EOL_OUTPUT 0x2 -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4 -#define DISABLE_NEWLINE_AUTO_RETURN 0x8 -#define ENABLE_LVB_GRID_WORLDWIDE 0x10 - -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) - -#define PeekConsoleInput __MINGW_NAME_AW(PeekConsoleInput) -#define ReadConsoleInput __MINGW_NAME_AW(ReadConsoleInput) -#define WriteConsoleInput __MINGW_NAME_AW(WriteConsoleInput) -#define ReadConsoleOutput __MINGW_NAME_AW(ReadConsoleOutput) -#define WriteConsoleOutput __MINGW_NAME_AW(WriteConsoleOutput) -#define ReadConsoleOutputCharacter __MINGW_NAME_AW(ReadConsoleOutputCharacter) -#define WriteConsoleOutputCharacter __MINGW_NAME_AW(WriteConsoleOutputCharacter) -#define FillConsoleOutputCharacter __MINGW_NAME_AW(FillConsoleOutputCharacter) -#define ScrollConsoleScreenBuffer __MINGW_NAME_AW(ScrollConsoleScreenBuffer) -#define GetConsoleTitle __MINGW_NAME_AW(GetConsoleTitle) -#define SetConsoleTitle __MINGW_NAME_AW(SetConsoleTitle) -#define ReadConsole __MINGW_NAME_AW(ReadConsole) -#define WriteConsole __MINGW_NAME_AW(WriteConsole) -#define AddConsoleAlias __MINGW_NAME_AW(AddConsoleAlias) -#define GetConsoleAlias __MINGW_NAME_AW(GetConsoleAlias) -#define GetConsoleAliasesLength __MINGW_NAME_AW(GetConsoleAliasesLength) -#define GetConsoleAliasExesLength __MINGW_NAME_AW(GetConsoleAliasExesLength) -#define GetConsoleAliases __MINGW_NAME_AW(GetConsoleAliases) -#define GetConsoleAliasExes __MINGW_NAME_AW(GetConsoleAliasExes) - - WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); - WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); - WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); - WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); - WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten); - WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten); - WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion); - WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion); - WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion); - WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion); - WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,LPSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead); - WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE hConsoleOutput,LPWSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead); - WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE hConsoleOutput,LPWORD lpAttribute,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfAttrsRead); - WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,LPCSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); - WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,LPCWSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); - WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE hConsoleOutput,CONST WORD *lpAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten); - WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE hConsoleOutput,CHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); - WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,WCHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); - WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE hConsoleOutput,WORD wAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten); - WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle,LPDWORD lpMode); - WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput,LPDWORD lpNumberOfEvents); - WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo); - WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput); - WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE hConsoleOutput,PCONSOLE_CURSOR_INFO lpConsoleCursorInfo); - WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,WINBOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont); - WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE hConsoleOutput,DWORD nFont); - WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo); - WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons); - WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE hConsoleHandle,DWORD dwMode); - WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput); - WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE hConsoleInput); - WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,COORD dwSize); - WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput,COORD dwCursorPosition); - WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE hConsoleOutput,CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo); - WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill); - WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill); - WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE hConsoleOutput,WINBOOL bAbsolute,CONST SMALL_RECT *lpConsoleWindow); - WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttributes); - WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,WINBOOL Add); - WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,DWORD dwProcessGroupId); - WINBASEAPI WINBOOL WINAPI AllocConsole(VOID); - WINBASEAPI WINBOOL WINAPI FreeConsole(VOID); - WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD dwProcessId); - -#define ATTACH_PARENT_PROCESS ((DWORD)-1) +#ifndef NOAPISET +#include +#include +#include +#endif - WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR lpConsoleTitle,DWORD nSize); - WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR lpConsoleTitle,DWORD nSize); - WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR lpConsoleTitle); - WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR lpConsoleTitle); - WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved); - WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved); - WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved); - WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved); +#define CONSOLE_REAL_OUTPUT_HANDLE (LongToHandle(-2)) +#define CONSOLE_REAL_INPUT_HANDLE (LongToHandle(-3)) #define CONSOLE_TEXTMODE_BUFFER 1 - WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess,DWORD dwShareMode,CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,DWORD dwFlags,LPVOID lpScreenBufferData); - WINBASEAPI UINT WINAPI GetConsoleCP(VOID); - WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT wCodePageID); - WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID); - WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT wCodePageID); - -#define CONSOLE_FULLSCREEN 1 -#define CONSOLE_FULLSCREEN_HARDWARE 2 - WINBASEAPI WINBOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags); - -#define CONSOLE_FULLSCREEN_MODE 1 -#define CONSOLE_WINDOWED_MODE 2 - WINBASEAPI WINBOOL WINAPI SetConsoleDisplayMode(HANDLE hConsoleOutput, DWORD dwFlags, PCOORD lpNewScreenBufferDimensions); - - WINBASEAPI HWND WINAPI GetConsoleWindow(VOID); - WINBASEAPI DWORD WINAPI GetConsoleProcessList(LPDWORD lpdwProcessList,DWORD dwProcessCount); - WINBASEAPI WINBOOL WINAPI AddConsoleAliasA(LPSTR Source,LPSTR Target,LPSTR ExeName); - WINBASEAPI WINBOOL WINAPI AddConsoleAliasW(LPWSTR Source,LPWSTR Target,LPWSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasA(LPSTR Source,LPSTR TargetBuffer,DWORD TargetBufferLength,LPSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasW(LPWSTR Source,LPWSTR TargetBuffer,DWORD TargetBufferLength,LPWSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthA(LPSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthW(LPWSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthA(VOID); - WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthW(VOID); - WINBASEAPI DWORD WINAPI GetConsoleAliasesA(LPSTR AliasBuffer,DWORD AliasBufferLength,LPSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasesW(LPWSTR AliasBuffer,DWORD AliasBufferLength,LPWSTR ExeName); - WINBASEAPI DWORD WINAPI GetConsoleAliasExesA(LPSTR ExeNameBuffer,DWORD ExeNameBufferLength); - WINBASEAPI DWORD WINAPI GetConsoleAliasExesW(LPWSTR ExeNameBuffer,DWORD ExeNameBufferLength); - -WINBASEAPI VOID WINAPI ExpungeConsoleCommandHistoryA(LPSTR ExeName); -WINBASEAPI VOID WINAPI ExpungeConsoleCommandHistoryW(LPWSTR ExeName); -#define ExpungeConsoleCommandHistory __MINGW_NAME_AW(ExpungeConsoleCommandHistory) - -WINBASEAPI WINBOOL WINAPI SetConsoleNumberOfCommandsA(DWORD Number, LPSTR ExeName); -WINBASEAPI WINBOOL WINAPI SetConsoleNumberOfCommandsW(DWORD Number, LPWSTR ExeName); -#define SetConsoleNumberOfCommands __MINGW_NAME_AW(SetConsoleNumberOfCommands) - -WINBASEAPI DWORD WINAPI GetConsoleCommandHistoryLengthA(LPSTR ExeName); -WINBASEAPI DWORD WINAPI GetConsoleCommandHistoryLengthW(LPWSTR ExeName); -#define GetConsoleCommandHistoryLength __MINGW_NAME_AW(GetConsoleCommandHistoryLength) - -WINBASEAPI DWORD WINAPI GetConsoleCommandHistoryA(LPSTR Commands, DWORD CommandBufferLength, LPSTR ExeName); -WINBASEAPI DWORD WINAPI GetConsoleCommandHistoryW(LPWSTR Commands, DWORD CommandBufferLength, LPWSTR ExeName); -#define GetConsoleCommandHistory __MINGW_NAME_AW(GetConsoleCommandHistory) - -#ifndef NOGDI - -typedef struct _CONSOLE_FONT_INFOEX { - ULONG cbSize; - DWORD nFont; - COORD dwFontSize; - UINT FontFamily; - UINT FontWeight; - WCHAR FaceName[LF_FACESIZE]; -} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; - -WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFontEx( - HANDLE hConsoleOutput, - WINBOOL bMaximumWindow, - PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx -); - -WINBASEAPI WINBOOL WINAPI SetCurrentConsoleFontEx( - HANDLE hConsoleOutput, - WINBOOL bMaximumWindow, - PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx -); - -#endif /* NOGDI */ - -#define HISTORY_NO_DUP_FLAG 0x1 - -typedef struct _CONSOLE_HISTORY_INFO { - UINT cbSize; - UINT HistoryBufferSize; - UINT NumberOfHistoryBuffers; - DWORD dwFlags; -} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; - -typedef struct _CONSOLE_READCONSOLE_CONTROL { - ULONG nLength; - ULONG nInitialChars; - ULONG dwCtrlWakeupMask; - ULONG dwControlKeyState; -} CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL; - -typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { - ULONG cbSize; - COORD dwSize; - COORD dwCursorPosition; - WORD wAttributes; - SMALL_RECT srWindow; - COORD dwMaximumWindowSize; - WORD wPopupAttributes; - WINBOOL bFullscreenSupported; - COLORREF ColorTable[16]; -} CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX; - -WINBOOL WINAPI GetConsoleHistoryInfo( - PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo -); - -#if (_WIN32_WINNT >= 0x0600) -#define GetConsoleOriginalTitle __MINGW_NAME_AW(GetConsoleOriginalTitle) - -WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleA( - LPSTR lpConsoleTitle, - DWORD nSize -); - -WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleW( - LPWSTR lpConsoleTitle, - DWORD nSize -); -#endif /* (_WIN32_WINNT >= 0x0600) */ - -WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfoEx( - HANDLE hConsoleOutput, - PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx -); - -WINBASEAPI WINBOOL WINAPI SetConsoleHistoryInfo( - PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo -); - -WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferInfoEx( - HANDLE hConsoleOutput, - PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx -); - -#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ - -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - -#if (NTDDI_VERSION >= 0x0A000006) - -/* CreatePseudoConsole Flags */ -#define PSEUDOCONSOLE_INHERIT_CURSOR 1 - -typedef VOID* HPCON; - -WINBASEAPI HRESULT WINAPI CreatePseudoConsole(COORD size, HANDLE hInput, HANDLE hOutput, DWORD dwFlags, HPCON* phPC); -WINBASEAPI HRESULT WINAPI ResizePseudoConsole(HPCON hPC, COORD size); -WINBASEAPI VOID WINAPI ClosePseudoConsole(HPCON hPC); - -#endif /* NTDDI_WIN10_RS5 */ - -#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ - #ifdef __cplusplus } #endif -#endif + +#endif /* _WINCON_ */ diff --git a/lib/libc/include/any-windows-any/wincontypes.h b/lib/libc/include/any-windows-any/wincontypes.h new file mode 100644 index 000000000000..702cef2094b0 --- /dev/null +++ b/lib/libc/include/any-windows-any/wincontypes.h @@ -0,0 +1,130 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _WINCONTYPES_ +#define _WINCONTYPES_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + +typedef struct _COORD { + SHORT X; + SHORT Y; +} COORD, *PCOORD; + +typedef struct _SMALL_RECT { + SHORT Left; + SHORT Top; + SHORT Right; + SHORT Bottom; +} SMALL_RECT, *PSMALL_RECT; + +typedef struct _KEY_EVENT_RECORD { + WINBOOL bKeyDown; + WORD wRepeatCount; + WORD wVirtualKeyCode; + WORD wVirtualScanCode; + union { + WCHAR UnicodeChar; + CHAR AsciiChar; + } uChar; + DWORD dwControlKeyState; +} KEY_EVENT_RECORD, *PKEY_EVENT_RECORD; + +#define RIGHT_ALT_PRESSED 0x0001 +#define LEFT_ALT_PRESSED 0x0002 +#define RIGHT_CTRL_PRESSED 0x0004 +#define LEFT_CTRL_PRESSED 0x0008 +#define SHIFT_PRESSED 0x0010 +#define NUMLOCK_ON 0x0020 +#define SCROLLLOCK_ON 0x0040 +#define CAPSLOCK_ON 0x0080 +#define ENHANCED_KEY 0x0100 +#define NLS_DBCSCHAR 0x00010000 +#define NLS_ALPHANUMERIC 0x00000000 +#define NLS_KATAKANA 0x00020000 +#define NLS_HIRAGANA 0x00040000 +#define NLS_ROMAN 0x00400000 +#define NLS_IME_CONVERSION 0x00800000 +#define ALTNUMPAD_BIT 0x04000000 +#define NLS_IME_DISABLE 0x20000000 + +typedef struct _MOUSE_EVENT_RECORD { + COORD dwMousePosition; + DWORD dwButtonState; + DWORD dwControlKeyState; + DWORD dwEventFlags; +} MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD; + +#define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001 +#define RIGHTMOST_BUTTON_PRESSED 0x0002 +#define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004 +#define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008 +#define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010 + +#define MOUSE_MOVED 0x0001 +#define DOUBLE_CLICK 0x0002 +#define MOUSE_WHEELED 0x0004 +#if (_WIN32_WINNT >= 0x0600) +#define MOUSE_HWHEELED 0x0008 +#endif /* _WIN32_WINNT >= 0x0600 */ + +typedef struct _WINDOW_BUFFER_SIZE_RECORD { + COORD dwSize; +} WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD; + +typedef struct _MENU_EVENT_RECORD { + UINT dwCommandId; +} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD; + +typedef struct _FOCUS_EVENT_RECORD { + WINBOOL bSetFocus; +} FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD; + +typedef struct _INPUT_RECORD { + WORD EventType; + union { + KEY_EVENT_RECORD KeyEvent; + MOUSE_EVENT_RECORD MouseEvent; + WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; + MENU_EVENT_RECORD MenuEvent; + FOCUS_EVENT_RECORD FocusEvent; + } Event; +} INPUT_RECORD, *PINPUT_RECORD; + +#define KEY_EVENT 0x0001 +#define MOUSE_EVENT 0x0002 +#define WINDOW_BUFFER_SIZE_EVENT 0x0004 +#define MENU_EVENT 0x0008 +#define FOCUS_EVENT 0x0010 + +typedef struct _CHAR_INFO { + union { + WCHAR UnicodeChar; + CHAR AsciiChar; + } Char; + WORD Attributes; +} CHAR_INFO, *PCHAR_INFO; + +typedef struct _CONSOLE_FONT_INFO { + DWORD nFont; + COORD dwFontSize; +} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO; + +typedef VOID *HPCON; + +#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _WINCONTYPES_ */ diff --git a/lib/libc/include/any-windows-any/winnt.h b/lib/libc/include/any-windows-any/winnt.h index 27e02de79c6a..9373525f129e 100644 --- a/lib/libc/include/any-windows-any/winnt.h +++ b/lib/libc/include/any-windows-any/winnt.h @@ -48,6 +48,13 @@ extern "C" { #endif #endif /* _ARM64_ */ +#if defined(__arm64ec__) && \ + !(defined(_X86_) || defined(__i386__) || defined(_IA64_) || defined (__arm__) || defined(__aarch64__)) +#if !defined(_ARM64EC_) +#define _ARM64EC_ +#endif +#endif /* _ARM64EC_ */ + #if defined(__ia64__) && \ !(defined(_X86_) || defined(__x86_64) || defined(_AMD64_) || defined (__arm__) || defined(__aarch64__)) #if !defined(_IA64_) @@ -1582,7 +1589,7 @@ __MINGW_CXX14_CONSTEXPR inline ENUMTYPE& operator ^= (ENUMTYPE& a, ENUMTYPE b) { #ifdef _AMD64_ -#if defined(__x86_64) && !defined(RC_INVOKED) +#if defined(__x86_64) && !defined(__arm64ec__) && !defined(RC_INVOKED) #ifdef __cplusplus extern "C" { @@ -1782,7 +1789,7 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* defined(__x86_64) && !defined(RC_INVOKED) */ +#endif /* defined(__x86_64) && !defined(__arm64ec__) && !defined(RC_INVOKED) */ #define EXCEPTION_READ_FAULT 0 #define EXCEPTION_WRITE_FAULT 1 @@ -2084,24 +2091,6 @@ extern "C" { #define UNW_FLAG_EHANDLER 0x1 #define UNW_FLAG_UHANDLER 0x2 -#define UNWIND_HISTORY_TABLE_SIZE 12 - - typedef struct _UNWIND_HISTORY_TABLE_ENTRY { - DWORD ImageBase; - PRUNTIME_FUNCTION FunctionEntry; - } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; - - typedef struct _UNWIND_HISTORY_TABLE { - DWORD Count; - BYTE LocalHint; - BYTE GlobalHint; - BYTE Search; - BYTE Once; - DWORD LowAddress; - DWORD HighAddress; - UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE]; - } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE; - struct _DISPATCHER_CONTEXT; typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT; typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT; @@ -2115,7 +2104,7 @@ extern "C" { PCONTEXT ContextRecord; PEXCEPTION_ROUTINE LanguageHandler; PVOID HandlerData; - PUNWIND_HISTORY_TABLE HistoryTable; + struct _UNWIND_HISTORY_TABLE *HistoryTable; ULONG ScopeIndex; BOOLEAN ControlPcIsUnwound; PBYTE NonVolatileRegisters; @@ -2147,9 +2136,9 @@ extern "C" { #endif /* _ARM_ */ -#ifdef _ARM64_ +#if defined(_ARM64_) || defined(_ARM64EC_) -#if defined(__aarch64__) && !defined(RC_INVOKED) +#if (defined(__aarch64__) || defined(__arm64ec__)) && !defined(RC_INVOKED) #ifdef __cplusplus extern "C" { @@ -2219,33 +2208,51 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* defined(__aarch64__) && !defined(RC_INVOKED) */ +#endif /* (defined(__aarch64__) || defined(__arm64ec__)) && !defined(RC_INVOKED) */ #define EXCEPTION_READ_FAULT 0 #define EXCEPTION_WRITE_FAULT 1 #define EXCEPTION_EXECUTE_FAULT 8 +#endif /* defined(_ARM64_) || defined(_ARM64EC_) */ #if !defined(RC_INVOKED) -#define CONTEXT_ARM64 0x400000 -#define CONTEXT_CONTROL (CONTEXT_ARM64 | 0x00000001) -#define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x00000002) -#define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x00000008) +#define CONTEXT_ARM64 0x400000 +#define CONTEXT_ARM64_CONTROL (CONTEXT_ARM64 | 0x00000001) +#define CONTEXT_ARM64_INTEGER (CONTEXT_ARM64 | 0x00000002) +#define CONTEXT_ARM64_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004) +#define CONTEXT_ARM64_DEBUG_REGISTERS (CONTEXT_ARM64 | 0x00000008) +#define CONTEXT_ARM64_X18 (CONTEXT_ARM64 | 0x00000010) -#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) -#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) -#define EXCEPTION_READ_FAULT 0 -#define EXCEPTION_WRITE_FAULT 1 -#define EXCEPTION_EXECUTE_FAULT 8 +#define CONTEXT_ARM64_FULL (CONTEXT_ARM64_CONTROL | CONTEXT_ARM64_INTEGER | CONTEXT_ARM64_FLOATING_POINT) +#define CONTEXT_ARM64_ALL (CONTEXT_ARM64_CONTROL | CONTEXT_ARM64_INTEGER | CONTEXT_ARM64_FLOATING_POINT | CONTEXT_ARM64_DEBUG_REGISTERS | CONTEXT_ARM64_X18) -#define ARM64_MAX_BREAKPOINTS 8 -#define ARM64_MAX_WATCHPOINTS 2 +#define CONTEXT_ARM64_UNWOUND_TO_CALL 0x20000000 + +#ifdef _ARM64_ + +#define CONTEXT_CONTROL CONTEXT_ARM64_CONTROL +#define CONTEXT_INTEGER CONTEXT_ARM64_INTEGER +#define CONTEXT_FLOATING_POINT CONTEXT_ARM64_FLOATING_POINT +#define CONTEXT_DEBUG_REGISTERS CONTEXT_ARM64_DEBUG_REGISTERS +#define CONTEXT_FULL CONTEXT_ARM64_FULL +#define CONTEXT_ALL CONTEXT_ARM64_ALL +#define CONTEXT_UNWOUND_TO_CALL CONTEXT_ARM64_UNWOUND_TO_CALL + +#define CONTEXT_EXCEPTION_ACTIVE 0x08000000 +#define CONTEXT_SERVICE_ACTIVE 0x10000000 +#define CONTEXT_EXCEPTION_REQUEST 0x40000000 +#define CONTEXT_EXCEPTION_REPORTING 0x80000000 + +#endif /* _ARM64_ */ #endif /* !defined(RC_INVOKED) */ - typedef union _NEON128 { +#define ARM64_MAX_BREAKPOINTS 8 +#define ARM64_MAX_WATCHPOINTS 2 + + typedef union _ARM64_NT_NEON128 { struct { ULONGLONG Low; @@ -2255,9 +2262,19 @@ extern "C" { float S[4]; WORD H[8]; BYTE B[16]; - } NEON128, *PNEON128; + } ARM64_NT_NEON128, *PARM64_NT_NEON128; - typedef struct DECLSPEC_ALIGN(16) _CONTEXT { +#ifdef _ARM64_ + typedef ARM64_NT_NEON128 NEON128, *PNEON128; +#endif + + typedef struct DECLSPEC_ALIGN(16) +#ifdef _ARM64_ + _CONTEXT +#else + _ARM64_NT_CONTEXT +#endif + { ULONG ContextFlags; /* 000 */ /* CONTEXT_INTEGER */ ULONG Cpsr; /* 004 */ @@ -2303,7 +2320,7 @@ extern "C" { DWORD64 Sp; /* 100 */ DWORD64 Pc; /* 108 */ /* CONTEXT_FLOATING_POINT */ - NEON128 V[32]; /* 110 */ + ARM64_NT_NEON128 V[32]; /* 110 */ DWORD Fpcr; /* 310 */ DWORD Fpsr; /* 314 */ /* CONTEXT_DEBUG_REGISTERS */ @@ -2311,53 +2328,152 @@ extern "C" { DWORD64 Bvr[ARM64_MAX_BREAKPOINTS]; /* 338 */ DWORD Wcr[ARM64_MAX_WATCHPOINTS]; /* 378 */ DWORD64 Wvr[ARM64_MAX_WATCHPOINTS]; /* 380 */ - } CONTEXT, *PCONTEXT; + } ARM64_NT_CONTEXT, *PARM64_NT_CONTEXT; + +#ifdef _ARM64_ + typedef ARM64_NT_CONTEXT CONTEXT, *PCONTEXT; +#endif + + typedef struct DECLSPEC_ALIGN(16) _ARM64EC_NT_CONTEXT + { + union + { + struct + { + DWORD64 AMD64_P1Home; /* 000 */ + DWORD64 AMD64_P2Home; /* 008 */ + DWORD64 AMD64_P3Home; /* 010 */ + DWORD64 AMD64_P4Home; /* 018 */ + DWORD64 AMD64_P5Home; /* 020 */ + DWORD64 AMD64_P6Home; /* 028 */ + DWORD ContextFlags; /* 030 */ + DWORD AMD64_MxCsr_copy; /* 034 */ + WORD AMD64_SegCs; /* 038 */ + WORD AMD64_SegDs; /* 03a */ + WORD AMD64_SegEs; /* 03c */ + WORD AMD64_SegFs; /* 03e */ + WORD AMD64_SegGs; /* 040 */ + WORD AMD64_SegSs; /* 042 */ + DWORD AMD64_EFlags; /* 044 */ + DWORD64 AMD64_Dr0; /* 048 */ + DWORD64 AMD64_Dr1; /* 050 */ + DWORD64 AMD64_Dr2; /* 058 */ + DWORD64 AMD64_Dr3; /* 060 */ + DWORD64 AMD64_Dr6; /* 068 */ + DWORD64 AMD64_Dr7; /* 070 */ + DWORD64 X8; /* 078 (Rax) */ + DWORD64 X0; /* 080 (Rcx) */ + DWORD64 X1; /* 088 (Rdx) */ + DWORD64 X27; /* 090 (Rbx) */ + DWORD64 Sp; /* 098 (Rsp) */ + DWORD64 Fp; /* 0a0 (Rbp) */ + DWORD64 X25; /* 0a8 (Rsi) */ + DWORD64 X26; /* 0b0 (Rdi) */ + DWORD64 X2; /* 0b8 (R8) */ + DWORD64 X3; /* 0c0 (R9) */ + DWORD64 X4; /* 0c8 (R10) */ + DWORD64 X5; /* 0d0 (R11) */ + DWORD64 X19; /* 0d8 (R12) */ + DWORD64 X20; /* 0e0 (R13) */ + DWORD64 X21; /* 0e8 (R14) */ + DWORD64 X22; /* 0f0 (R15) */ + DWORD64 Pc; /* 0f8 (Rip) */ + struct + { + WORD AMD64_ControlWord; /* 100 */ + WORD AMD64_StatusWord; /* 102 */ + BYTE AMD64_TagWord; /* 104 */ + BYTE AMD64_Reserved1; /* 105 */ + WORD AMD64_ErrorOpcode; /* 106 */ + DWORD AMD64_ErrorOffset; /* 108 */ + WORD AMD64_ErrorSelector; /* 10c */ + WORD AMD64_Reserved2; /* 10e */ + DWORD AMD64_DataOffset; /* 110 */ + WORD AMD64_DataSelector; /* 114 */ + WORD AMD64_Reserved3; /* 116 */ + DWORD AMD64_MxCsr; /* 118 */ + DWORD AMD64_MxCsr_Mask; /* 11c */ + DWORD64 Lr; /* 120 (FloatRegisters[0]) */ + WORD X16_0; /* 128 */ + WORD AMD64_St0_Reserved1; /* 12a */ + DWORD AMD64_St0_Reserved2; /* 12c */ + DWORD64 X6; /* 130 (FloatRegisters[1]) */ + WORD X16_1; /* 138 */ + WORD AMD64_St1_Reserved1; /* 13a */ + DWORD AMD64_St1_Reserved2; /* 13c */ + DWORD64 X7; /* 140 (FloatRegisters[2]) */ + WORD X16_2; /* 148 */ + WORD AMD64_St2_Reserved1; /* 14a */ + DWORD AMD64_St2_Reserved2; /* 14c */ + DWORD64 X9; /* 150 (FloatRegisters[3]) */ + WORD X16_3; /* 158 */ + WORD AMD64_St3_Reserved1; /* 15a */ + DWORD AMD64_St3_Reserved2; /* 15c */ + DWORD64 X10; /* 160 (FloatRegisters[4]) */ + WORD X17_0; /* 168 */ + WORD AMD64_St4_Reserved1; /* 16a */ + DWORD AMD64_St4_Reserved2; /* 16c */ + DWORD64 X11; /* 170 (FloatRegisters[5]) */ + WORD X17_1; /* 178 */ + WORD AMD64_St5_Reserved1; /* 17a */ + DWORD AMD64_St5_Reserved2; /* 17c */ + DWORD64 X12; /* 180 (FloatRegisters[6]) */ + WORD X17_2; /* 188 */ + WORD AMD64_St6_Reserved1; /* 18a */ + DWORD AMD64_St6_Reserved2; /* 18c */ + DWORD64 X15; /* 190 (FloatRegisters[7]) */ + WORD X17_3; /* 198 */ + WORD AMD64_St7_Reserved1; /* 19a */ + DWORD AMD64_St7_Reserved2; /* 19c */ + ARM64_NT_NEON128 V[16]; /* 1a0 (XmmRegisters) */ + BYTE AMD64_XSAVE_FORMAT_Reserved4[96]; /* 2a0 */ + } DUMMYSTRUCTNAME; + ARM64_NT_NEON128 AMD64_VectorRegister[26]; /* 300 */ + DWORD64 AMD64_VectorControl; /* 4a0 */ + DWORD64 AMD64_DebugControl; /* 4a8 */ + DWORD64 AMD64_LastBranchToRip; /* 4b0 */ + DWORD64 AMD64_LastBranchFromRip; /* 4b8 */ + DWORD64 AMD64_LastExceptionToRip; /* 4c0 */ + DWORD64 AMD64_LastExceptionFromRip; /* 4c8 */ + } DUMMYSTRUCTNAME; +#ifdef _ARM64EC_ + CONTEXT AMD64_Context; +#endif + } DUMMYUNIONNAME; + } ARM64EC_NT_CONTEXT, *PARM64EC_NT_CONTEXT; + + typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY ARM64_RUNTIME_FUNCTION, *PARM64_RUNTIME_FUNCTION; + +#ifdef _ARM64_ typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION; typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context); +#endif #define UNW_FLAG_NHANDLER 0x0 #define UNW_FLAG_EHANDLER 0x1 #define UNW_FLAG_UHANDLER 0x2 -#define UNWIND_HISTORY_TABLE_SIZE 12 - - typedef struct _UNWIND_HISTORY_TABLE_ENTRY { - DWORD64 ImageBase; - PRUNTIME_FUNCTION FunctionEntry; - } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; - - typedef struct _UNWIND_HISTORY_TABLE { - DWORD Count; - BYTE LocalHint; - BYTE GlobalHint; - BYTE Search; - BYTE Once; - DWORD64 LowAddress; - DWORD64 HighAddress; - UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE]; - } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE; - - struct _DISPATCHER_CONTEXT; - typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT; - typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT; - - struct _DISPATCHER_CONTEXT { + typedef struct _DISPATCHER_CONTEXT_ARM64 { ULONG_PTR ControlPc; ULONG_PTR ImageBase; - PRUNTIME_FUNCTION FunctionEntry; + PARM64_RUNTIME_FUNCTION FunctionEntry; ULONG_PTR EstablisherFrame; ULONG_PTR TargetPc; - PCONTEXT ContextRecord; + PARM64_NT_CONTEXT ContextRecord; PEXCEPTION_ROUTINE LanguageHandler; PVOID HandlerData; - PUNWIND_HISTORY_TABLE HistoryTable; + struct _UNWIND_HISTORY_TABLE *HistoryTable; ULONG ScopeIndex; BOOLEAN ControlPcIsUnwound; PBYTE NonVolatileRegisters; - }; + } DISPATCHER_CONTEXT_ARM64, *PDISPATCHER_CONTEXT_ARM64; - typedef struct _KNONVOLATILE_CONTEXT_POINTERS { +#if defined(_ARM64_) + typedef DISPATCHER_CONTEXT_ARM64 DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; +#endif + + typedef struct _KNONVOLATILE_CONTEXT_POINTERS_ARM64 { PDWORD64 X19; PDWORD64 X20; PDWORD64 X21; @@ -2379,12 +2495,13 @@ extern "C" { PDWORD64 D13; PDWORD64 D14; PDWORD64 D15; - } KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS; + } KNONVOLATILE_CONTEXT_POINTERS_ARM64, *PKNONVOLATILE_CONTEXT_POINTERS_ARM64; -#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback" - -#endif /* _ARM64_ */ +#ifdef _ARM64_ + typedef KNONVOLATILE_CONTEXT_POINTERS_ARM64 KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS; +#endif +#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback" #ifdef _X86_ @@ -2474,25 +2591,8 @@ __buildmemorybarrier() #define PF_TEMPORAL_LEVEL_1 #define PF_NON_TEMPORAL_LEVEL_ALL -#define PcTeb 0x18 - struct _TEB *NtCurrentTeb(void); - PVOID GetCurrentFiber(void); - PVOID GetFiberData(void); - #define DbgRaiseAssertionFailure __int2c - FORCEINLINE struct _TEB *NtCurrentTeb(void) - { - return (struct _TEB *)__readfsdword(PcTeb); - } - FORCEINLINE PVOID GetCurrentFiber(void) - { - return(PVOID)__readfsdword(0x10); - } - FORCEINLINE PVOID GetFiberData(void) - { - return *(PVOID *)GetCurrentFiber(); - } #endif /* defined(__i386__) && !defined(__x86_64) */ #define EXCEPTION_READ_FAULT 0 @@ -2656,8 +2756,6 @@ __buildmemorybarrier() #define UnsignedMultiplyHigh __UMULH ULONGLONG UnsignedMultiplyHigh(ULONGLONG Multiplier,ULONGLONG Multiplicand); -#else /* __ia64__ */ - struct _TEB *NtCurrentTeb(void); #endif /* __ia64__ */ #endif /* !defined(GENUTIL) && !defined(_GENIA64_) && defined(_IA64_) */ @@ -2976,30 +3074,10 @@ __buildmemorybarrier() #ifdef __x86_64__ - /* http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx */ - -#define UNWIND_HISTORY_TABLE_SIZE 12 - - typedef struct _UNWIND_HISTORY_TABLE_ENTRY { - ULONG64 ImageBase; - PRUNTIME_FUNCTION FunctionEntry; - } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; - #define UNWIND_HISTORY_TABLE_NONE 0 #define UNWIND_HISTORY_TABLE_GLOBAL 1 #define UNWIND_HISTORY_TABLE_LOCAL 2 - typedef struct _UNWIND_HISTORY_TABLE { - ULONG Count; - BYTE LocalHint; - BYTE GlobalHint; - BYTE Search; - BYTE Once; - ULONG64 LowAddress; - ULONG64 HighAddress; - UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE]; - } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE; - /* http://msdn.microsoft.com/en-us/library/b6sf5kbd(VS.80).aspx */ struct _DISPATCHER_CONTEXT; @@ -3016,11 +3094,31 @@ __buildmemorybarrier() PEXCEPTION_ROUTINE LanguageHandler; PVOID HandlerData; /* http://www.nynaeve.net/?p=99 */ - PUNWIND_HISTORY_TABLE HistoryTable; + struct _UNWIND_HISTORY_TABLE *HistoryTable; ULONG ScopeIndex; ULONG Fill0; }; +#ifdef _ARM64EC_ + typedef struct _DISPATCHER_CONTEXT_ARM64EC { + DWORD64 ControlPc; + DWORD64 ImageBase; + PRUNTIME_FUNCTION FunctionEntry; + DWORD64 EstablisherFrame; + union { + DWORD64 TargetIp; + DWORD64 TargetPc; + } DUMMYUNIONNAME; + PCONTEXT ContextRecord; + PEXCEPTION_ROUTINE LanguageHandler; + PVOID HandlerData; + struct _UNWIND_HISTORY_TABLE *HistoryTable; + DWORD ScopeIndex; + BOOLEAN ControlPcIsUnwound; + PBYTE NonVolatileRegisters; + } DISPATCHER_CONTEXT_ARM64EC, *PDISPATCHER_CONTEXT_ARM64EC; +#endif /* _ARM64EC_ */ + /* http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx */ typedef struct _KNONVOLATILE_CONTEXT_POINTERS @@ -5359,7 +5457,7 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) #define LTP_PC_SMT 0x1 typedef enum _PROCESSOR_CACHE_TYPE { - CacheUnified,CacheInstruction,CacheData,CacheTrace + CacheUnified,CacheInstruction,CacheData,CacheTrace,CacheUnknown } PROCESSOR_CACHE_TYPE; #define CACHE_FULLY_ASSOCIATIVE 0xFF @@ -5397,8 +5495,12 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) typedef struct _NUMA_NODE_RELATIONSHIP { DWORD NodeNumber; - BYTE Reserved[20]; - GROUP_AFFINITY GroupMask; + BYTE Reserved[18]; + WORD GroupCount; + __C89_NAMELESS union { + GROUP_AFFINITY GroupMask; + GROUP_AFFINITY GroupMasks[ANYSIZE_ARRAY]; + }; } NUMA_NODE_RELATIONSHIP,*PNUMA_NODE_RELATIONSHIP; typedef struct _CACHE_RELATIONSHIP { @@ -5407,8 +5509,12 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) WORD LineSize; DWORD CacheSize; PROCESSOR_CACHE_TYPE Type; - BYTE Reserved[20]; - GROUP_AFFINITY GroupMask; + BYTE Reserved[18]; + WORD GroupCount; + __C89_NAMELESS union { + GROUP_AFFINITY GroupMask; + GROUP_AFFINITY GroupMasks[ANYSIZE_ARRAY]; + }; } CACHE_RELATIONSHIP,*PCACHE_RELATIONSHIP; typedef struct _PROCESSOR_GROUP_INFO { @@ -8535,6 +8641,13 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) DWORD Reserved; } IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY; + typedef struct _IMAGE_LOAD_CONFIG_CODE_INTEGRITY { + WORD Flags; + WORD Catalog; + DWORD CatalogOffset; + DWORD Reserved; + } IMAGE_LOAD_CONFIG_CODE_INTEGRITY,*PIMAGE_LOAD_CONFIG_CODE_INTEGRITY; + typedef struct { DWORD Size; DWORD TimeDateStamp; @@ -8551,11 +8664,40 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) DWORD ProcessHeapFlags; DWORD ProcessAffinityMask; WORD CSDVersion; - WORD Reserved1; + WORD DependentLoadFlags; DWORD EditList; DWORD SecurityCookie; DWORD SEHandlerTable; DWORD SEHandlerCount; + DWORD GuardCFCheckFunctionPointer; + DWORD GuardCFDispatchFunctionPointer; + DWORD GuardCFFunctionTable; + DWORD GuardCFFunctionCount; + DWORD GuardFlags; + IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; + DWORD GuardAddressTakenIatEntryTable; + DWORD GuardAddressTakenIatEntryCount; + DWORD GuardLongJumpTargetTable; + DWORD GuardLongJumpTargetCount; + DWORD DynamicValueRelocTable; + DWORD CHPEMetadataPointer; + DWORD GuardRFFailureRoutine; + DWORD GuardRFFailureRoutineFunctionPointer; + DWORD DynamicValueRelocTableOffset; + WORD DynamicValueRelocTableSection; + WORD Reserved2; + DWORD GuardRFVerifyStackPointerFunctionPointer; + DWORD HotPatchTableOffset; + DWORD Reserved3; + DWORD EnclaveConfigurationPointer; + DWORD VolatileMetadataPointer; + DWORD GuardEHContinuationTable; + DWORD GuardEHContinuationCount; + DWORD GuardXFGCheckFunctionPointer; + DWORD GuardXFGDispatchFunctionPointer; + DWORD GuardXFGTableDispatchFunctionPointer; + DWORD CastGuardOsDeterminedFailureMode; + DWORD GuardMemcpyFunctionPointer; } IMAGE_LOAD_CONFIG_DIRECTORY32,*PIMAGE_LOAD_CONFIG_DIRECTORY32; typedef struct { @@ -8574,11 +8716,40 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) ULONGLONG ProcessAffinityMask; DWORD ProcessHeapFlags; WORD CSDVersion; - WORD Reserved1; + WORD DependentLoadFlags; ULONGLONG EditList; ULONGLONG SecurityCookie; ULONGLONG SEHandlerTable; ULONGLONG SEHandlerCount; + ULONGLONG GuardCFCheckFunctionPointer; + ULONGLONG GuardCFDispatchFunctionPointer; + ULONGLONG GuardCFFunctionTable; + ULONGLONG GuardCFFunctionCount; + DWORD GuardFlags; + IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; + ULONGLONG GuardAddressTakenIatEntryTable; + ULONGLONG GuardAddressTakenIatEntryCount; + ULONGLONG GuardLongJumpTargetTable; + ULONGLONG GuardLongJumpTargetCount; + ULONGLONG DynamicValueRelocTable; + ULONGLONG CHPEMetadataPointer; + ULONGLONG GuardRFFailureRoutine; + ULONGLONG GuardRFFailureRoutineFunctionPointer; + DWORD DynamicValueRelocTableOffset; + WORD DynamicValueRelocTableSection; + WORD Reserved2; + ULONGLONG GuardRFVerifyStackPointerFunctionPointer; + DWORD HotPatchTableOffset; + DWORD Reserved3; + ULONGLONG EnclaveConfigurationPointer; + ULONGLONG VolatileMetadataPointer; + ULONGLONG GuardEHContinuationTable; + ULONGLONG GuardEHContinuationCount; + ULONGLONG GuardXFGCheckFunctionPointer; + ULONGLONG GuardXFGDispatchFunctionPointer; + ULONGLONG GuardXFGTableDispatchFunctionPointer; + ULONGLONG CastGuardOsDeterminedFailureMode; + ULONGLONG GuardMemcpyFunctionPointer; } IMAGE_LOAD_CONFIG_DIRECTORY64,*PIMAGE_LOAD_CONFIG_DIRECTORY64; #ifdef _WIN64 @@ -8886,6 +9057,27 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) } IMAGE_COR20_HEADER,*PIMAGE_COR20_HEADER; #endif +#ifndef __i386__ + +#define UNWIND_HISTORY_TABLE_SIZE 12 + + typedef struct _UNWIND_HISTORY_TABLE_ENTRY { + ULONG_PTR ImageBase; + PRUNTIME_FUNCTION FunctionEntry; + } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; + + typedef struct _UNWIND_HISTORY_TABLE { + DWORD Count; + BYTE LocalHint; + BYTE GlobalHint; + BYTE Search; + BYTE Once; + ULONG_PTR LowAddress; + ULONG_PTR HighAddress; + UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE]; + } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE; +#endif /* !__i386__ */ + #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) NTSYSAPI WORD NTAPI RtlCaptureStackBackTrace (DWORD FramesToSkip, DWORD FramesToCapture, PVOID *BackTrace, PDWORD BackTraceHash); #endif @@ -8939,6 +9131,7 @@ DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS) NTSYSAPI PRUNTIME_FUNCTION NTAPI RtlLookupFunctionEntry (DWORD64 ControlPc, PDWORD64 ImageBase, PUNWIND_HISTORY_TABLE HistoryTable); NTSYSAPI VOID NTAPI RtlUnwindEx (PVOID TargetFrame, PVOID TargetIp, PEXCEPTION_RECORD ExceptionRecord, PVOID ReturnValue, PCONTEXT ContextRecord, PUNWIND_HISTORY_TABLE HistoryTable); NTSYSAPI PEXCEPTION_ROUTINE NTAPI RtlVirtualUnwind (DWORD HandlerType, DWORD64 ImageBase, DWORD64 ControlPc, PRUNTIME_FUNCTION FunctionEntry, PCONTEXT ContextRecord, PVOID *HandlerData, PDWORD64 EstablisherFrame, PKNONVOLATILE_CONTEXT_POINTERS ContextPointers); + NTSYSAPI BOOLEAN NTAPI RtlIsEcCode(DWORD64 CodePointer); #endif #if defined (__arm__) NTSYSAPI PRUNTIME_FUNCTION NTAPI RtlLookupFunctionEntry (ULONG_PTR ControlPc, PDWORD ImageBase, PUNWIND_HISTORY_TABLE HistoryTable); @@ -9067,7 +9260,7 @@ typedef DWORD (WINAPI *PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *); #if !defined (__CRT__NO_INLINE) && !defined (__WIDL__) __CRT_INLINE PVOID WINAPI RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt) { volatile char *vptr =(volatile char *)ptr; -#ifdef __x86_64 +#if defined(__x86_64__) && !defined(__arm64ec__) __stosb((PBYTE)((DWORD64)vptr),0,cnt); #else while(cnt) { @@ -9652,8 +9845,8 @@ typedef DWORD (WINAPI *PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *); #define VERIFIER_STOP(Code,Msg,P1,S1,P2,S2,P3,S3,P4,S4) { RtlApplicationVerifierStop ((Code),(Msg),(ULONG_PTR)(P1),(S1),(ULONG_PTR)(P2),(S2),(ULONG_PTR)(P3),(S3),(ULONG_PTR)(P4),(S4)); } VOID NTAPI RtlApplicationVerifierStop(ULONG_PTR Code,PSTR Message,ULONG_PTR Param1,PSTR Description1,ULONG_PTR Param2,PSTR Description2,ULONG_PTR Param3,PSTR Description3,ULONG_PTR Param4,PSTR Description4); - NTSYSAPI DWORD NTAPI RtlSetHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength); - NTSYSAPI DWORD NTAPI RtlQueryHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength); + NTSYSAPI LONG NTAPI RtlSetHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength); + NTSYSAPI LONG NTAPI RtlQueryHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength); DWORD NTAPI RtlMultipleAllocateHeap(PVOID HeapHandle,DWORD Flags,SIZE_T Size,DWORD Count,PVOID *Array); DWORD NTAPI RtlMultipleFreeHeap(PVOID HeapHandle,DWORD Flags,DWORD Count,PVOID *Array); @@ -10152,38 +10345,55 @@ typedef DWORD (WINAPI *PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *); FORCEINLINE VOID TpDestroyCallbackEnviron (PTP_CALLBACK_ENVIRON cbe) { UNREFERENCED_PARAMETER (cbe); } #endif -#if defined(__x86_64) && !defined (__WIDL__) +#if !defined(__ia64__) && !defined (__WIDL__) struct _TEB *NtCurrentTeb(VOID); PVOID GetCurrentFiber(VOID); PVOID GetFiberData(VOID); - FORCEINLINE struct _TEB *NtCurrentTeb(VOID) { return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB,Self)); } - FORCEINLINE PVOID GetCurrentFiber(VOID) { return(PVOID)__readgsqword(FIELD_OFFSET(NT_TIB,FiberData)); } - FORCEINLINE PVOID GetFiberData(VOID) { - return *(PVOID *)GetCurrentFiber(); + +#if defined (__aarch64__) || defined(__arm64ec__) + register struct _TEB *__mingw_current_teb __asm__("x18"); + FORCEINLINE struct _TEB *NtCurrentTeb(VOID) + { + return __mingw_current_teb; } -#endif /* __x86_64 */ + FORCEINLINE PVOID GetCurrentFiber(VOID) + { + return (PVOID)(((PNT_TIB)NtCurrentTeb())->FiberData); + } +#elif defined(__x86_64__) + FORCEINLINE struct _TEB *NtCurrentTeb(VOID) + { + return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB,Self)); + } + FORCEINLINE PVOID GetCurrentFiber(VOID) + { + return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB,FiberData)); + } +#elif defined(__i386__) +# define PcTeb 0x18 + FORCEINLINE struct _TEB *NtCurrentTeb(void) + { + return (struct _TEB *)__readfsdword(PcTeb); + } + FORCEINLINE PVOID GetCurrentFiber(void) + { + return (PVOID)__readfsdword(0x10); + } +#elif defined (__arm__) + FORCEINLINE struct _TEB *NtCurrentTeb(VOID) + { + struct _TEB *teb; + __asm ("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb)); + return teb; + } + FORCEINLINE PVOID GetCurrentFiber(VOID) + { + return (PVOID)(((PNT_TIB)NtCurrentTeb())->FiberData); + } +#endif -#if defined (__arm__) && !defined (__WIDL__) - struct _TEB *NtCurrentTeb (VOID); - PVOID GetCurrentFiber (VOID); - PVOID GetFiberData (VOID); - FORCEINLINE struct _TEB *NtCurrentTeb(VOID) { struct _TEB *teb; - __asm ("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb)); - return teb; } - FORCEINLINE PVOID GetCurrentFiber(VOID) { return (PVOID)(((PNT_TIB)NtCurrentTeb())->FiberData); } - FORCEINLINE PVOID GetFiberData (VOID) { return *(PVOID *)GetCurrentFiber (); } -#endif /* arm */ - -#if defined (__aarch64__) && !defined (__WIDL__) - struct _TEB *NtCurrentTeb (VOID); - PVOID GetCurrentFiber (VOID); - PVOID GetFiberData (VOID); - FORCEINLINE struct _TEB *NtCurrentTeb(VOID) { struct _TEB *teb; - __asm ("mov %0, x18" : "=r" (teb)); - return teb; } - FORCEINLINE PVOID GetCurrentFiber(VOID) { return (PVOID)(((PNT_TIB)NtCurrentTeb())->FiberData); } - FORCEINLINE PVOID GetFiberData (VOID) { return *(PVOID *)GetCurrentFiber (); } -#endif /* aarch64 */ + FORCEINLINE PVOID GetFiberData (VOID) { return *(void **)GetCurrentFiber (); } +#endif /* !defined(__ia64__) && !defined (__WIDL__) */ #ifndef _NTTMAPI_ #define _NTTMAPI_ diff --git a/lib/libc/include/any-windows-any/winnt.rh b/lib/libc/include/any-windows-any/winnt.rh index 050e62d8629e..13a739439ca8 100644 --- a/lib/libc/include/any-windows-any/winnt.rh +++ b/lib/libc/include/any-windows-any/winnt.rh @@ -16,84 +16,154 @@ #define LANG_AFRIKAANS 0x36 #define LANG_ALBANIAN 0x1c +#define LANG_ALSATIAN 0x84 +#define LANG_AMHARIC 0x5e #define LANG_ARABIC 0x01 #define LANG_ARMENIAN 0x2b #define LANG_ASSAMESE 0x4d #define LANG_AZERI 0x2c +#define LANG_AZERBAIJANI 0x2c +#define LANG_BANGLA 0x45 +#define LANG_BASHKIR 0x6d #define LANG_BASQUE 0x2d #define LANG_BELARUSIAN 0x23 #define LANG_BENGALI 0x45 +#define LANG_BRETON 0x7e +#define LANG_BOSNIAN 0x1a +#define LANG_BOSNIAN_NEUTRAL 0x781a #define LANG_BULGARIAN 0x02 #define LANG_CATALAN 0x03 +#define LANG_CENTRAL_KURDISH 0x92 +#define LANG_CHEROKEE 0x5c #define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_CORSICAN 0x83 #define LANG_CROATIAN 0x1a #define LANG_CZECH 0x05 #define LANG_DANISH 0x06 +#define LANG_DARI 0x8c #define LANG_DIVEHI 0x65 #define LANG_DUTCH 0x13 #define LANG_ENGLISH 0x09 #define LANG_ESTONIAN 0x25 #define LANG_FAEROESE 0x38 #define LANG_FARSI 0x29 +#define LANG_FILIPINO 0x64 #define LANG_FINNISH 0x0b #define LANG_FRENCH 0x0c +#define LANG_FRISIAN 0x62 +#define LANG_FULAH 0x67 #define LANG_GALICIAN 0x56 #define LANG_GEORGIAN 0x37 #define LANG_GERMAN 0x07 #define LANG_GREEK 0x08 +#define LANG_GREENLANDIC 0x6f #define LANG_GUJARATI 0x47 +#define LANG_HAUSA 0x68 +#define LANG_HAWAIIAN 0x75 #define LANG_HEBREW 0x0d #define LANG_HINDI 0x39 #define LANG_HUNGARIAN 0x0e #define LANG_ICELANDIC 0x0f +#define LANG_IGBO 0x70 #define LANG_INDONESIAN 0x21 +#define LANG_INUKTITUT 0x5d +#define LANG_IRISH 0x3c #define LANG_ITALIAN 0x10 #define LANG_JAPANESE 0x11 #define LANG_KANNADA 0x4b #define LANG_KASHMIRI 0x60 #define LANG_KAZAK 0x3f +#define LANG_KHMER 0x53 +#define LANG_KICHE 0x86 +#define LANG_KINYARWANDA 0x87 #define LANG_KONKANI 0x57 #define LANG_KOREAN 0x12 #define LANG_KYRGYZ 0x40 +#define LANG_LAO 0x54 #define LANG_LATVIAN 0x26 #define LANG_LITHUANIAN 0x27 +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_LUXEMBOURGISH 0x6e #define LANG_MACEDONIAN 0x2f #define LANG_MALAY 0x3e #define LANG_MALAYALAM 0x4c +#define LANG_MALTESE 0x3a #define LANG_MANIPURI 0x58 +#define LANG_MAORI 0x81 +#define LANG_MAPUDUNGUN 0x7a #define LANG_MARATHI 0x4e +#define LANG_MOHAWK 0x7c #define LANG_MONGOLIAN 0x50 #define LANG_NEPALI 0x61 #define LANG_NORWEGIAN 0x14 +#define LANG_OCCITAN 0x82 +#define LANG_ODIA 0x48 #define LANG_ORIYA 0x48 +#define LANG_PASHTO 0x63 +#define LANG_PERSIAN 0x29 #define LANG_POLISH 0x15 #define LANG_PORTUGUESE 0x16 +#define LANG_PULAR 0x67 #define LANG_PUNJABI 0x46 +#define LANG_QUECHUA 0x6b #define LANG_ROMANIAN 0x18 +#define LANG_ROMANSH 0x17 #define LANG_RUSSIAN 0x19 +#define LANG_SAKHA 0x85 +#define LANG_SAMI 0x3b #define LANG_SANSKRIT 0x4f +#define LANG_SCOTTISH_GAELIC 0x91 #define LANG_SERBIAN 0x1a +#define LANG_SERBIAN_NEUTRAL 0x7c1a #define LANG_SINDHI 0x59 +#define LANG_SINHALESE 0x5b #define LANG_SLOVAK 0x1b #define LANG_SLOVENIAN 0x24 +#define LANG_SOTHO 0x6c #define LANG_SPANISH 0x0a #define LANG_SWAHILI 0x41 #define LANG_SWEDISH 0x1d #define LANG_SYRIAC 0x5a +#define LANG_TAJIK 0x28 +#define LANG_TAMAZIGHT 0x5f #define LANG_TAMIL 0x49 #define LANG_TATAR 0x44 #define LANG_TELUGU 0x4a #define LANG_THAI 0x1e +#define LANG_TIBETAN 0x51 +#define LANG_TIGRIGNA 0x73 +#define LANG_TIGRINYA 0x73 +#define LANG_TSWANA 0x32 #define LANG_TURKISH 0x1f +#define LANG_TURKMEN 0x42 +#define LANG_UIGHUR 0x80 #define LANG_UKRAINIAN 0x22 +#define LANG_UPPER_SORBIAN 0x2e #define LANG_URDU 0x20 #define LANG_UZBEK 0x43 +#define LANG_VALENCIAN 0x03 #define LANG_VIETNAMESE 0x2a +#define LANG_WELSH 0x52 +#define LANG_WOLOF 0x88 +#define LANG_XHOSA 0x34 +#define LANG_YAKUT 0x85 +#define LANG_YI 0x78 +#define LANG_YORUBA 0x6a +#define LANG_ZULU 0x35 #define SUBLANG_NEUTRAL 0x00 #define SUBLANG_DEFAULT 0x01 #define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 #define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 #define SUBLANG_ARABIC_IRAQ 0x02 #define SUBLANG_ARABIC_EGYPT 0x03 @@ -110,13 +180,38 @@ #define SUBLANG_ARABIC_UAE 0x0e #define SUBLANG_ARABIC_BAHRAIN 0x0f #define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 #define SUBLANG_AZERI_LATIN 0x01 #define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02 +#define SUBLANG_BANGLA_INDIA 0x01 +#define SUBLANG_BANGLA_BANGLADESH 0x02 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01 +#define SUBLANG_CHEROKEE_CHEROKEE 0x01 #define SUBLANG_CHINESE_TRADITIONAL 0x01 #define SUBLANG_CHINESE_SIMPLIFIED 0x02 #define SUBLANG_CHINESE_HONGKONG 0x03 #define SUBLANG_CHINESE_SINGAPORE 0x04 #define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 #define SUBLANG_DUTCH 0x01 #define SUBLANG_DUTCH_BELGIAN 0x02 #define SUBLANG_ENGLISH_US 0x01 @@ -132,32 +227,120 @@ #define SUBLANG_ENGLISH_TRINIDAD 0x0b #define SUBLANG_ENGLISH_ZIMBABWE 0x0c #define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 #define SUBLANG_FRENCH 0x01 #define SUBLANG_FRENCH_BELGIAN 0x02 #define SUBLANG_FRENCH_CANADIAN 0x03 #define SUBLANG_FRENCH_SWISS 0x04 #define SUBLANG_FRENCH_LUXEMBOURG 0x05 #define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_FULAH_SENEGAL 0x02 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 #define SUBLANG_GERMAN 0x01 #define SUBLANG_GERMAN_SWISS 0x02 #define SUBLANG_GERMAN_AUSTRIAN 0x03 #define SUBLANG_GERMAN_LUXEMBOURG 0x04 #define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HAWAIIAN_US 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 #define SUBLANG_ITALIAN 0x01 #define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 #define SUBLANG_KASHMIRI_SASIA 0x02 #define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 #define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 #define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 #define SUBLANG_MALAY_MALAYSIA 0x01 #define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_MONGOLIAN_PRC 0x02 #define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NEPALI_NEPAL 0x01 #define SUBLANG_NORWEGIAN_BOKMAL 0x01 #define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ODIA_INDIA 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 #define SUBLANG_PORTUGUESE 0x02 #define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PULAR_SENEGAL 0x02 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_PUNJABI_PAKISTAN 0x02 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAKHA_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SCOTTISH_GAELIC 0x01 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b +#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c +#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09 +#define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a +#define SUBLANG_SERBIAN_CROATIA 0x01 #define SUBLANG_SERBIAN_LATIN 0x02 #define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 #define SUBLANG_SPANISH 0x01 #define SUBLANG_SPANISH_MEXICAN 0x02 #define SUBLANG_SPANISH_MODERN 0x03 @@ -178,23 +361,58 @@ #define SUBLANG_SPANISH_HONDURAS 0x12 #define SUBLANG_SPANISH_NICARAGUA 0x13 #define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define SUBLANG_SPANISH_US 0x15 +#define SUBLANG_SWAHILI_KENYA 0x01 #define SUBLANG_SWEDISH 0x01 #define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TAMIL_SRI_LANKA 0x02 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ETHIOPIA 0x01 +#define SUBLANG_TSWANA_BOTSWANA 0x02 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 #define SUBLANG_URDU_PAKISTAN 0x01 #define SUBLANG_URDU_INDIA 0x02 #define SUBLANG_UZBEK_LATIN 0x01 #define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SUBLANG_VALENCIAN_VALENCIA 0x02 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 #define SORT_DEFAULT 0x0 +#define SORT_INVARIANT_MATH 0x1 + #define SORT_JAPANESE_XJIS 0x0 #define SORT_JAPANESE_UNICODE 0x1 +#define SORT_JAPANESE_RADICALSTROKE 0x4 #define SORT_CHINESE_BIG5 0x0 #define SORT_CHINESE_PRCP 0x0 #define SORT_CHINESE_UNICODE 0x1 #define SORT_CHINESE_PRC 0x2 #define SORT_CHINESE_BOPOMOFO 0x3 +#define SORT_CHINESE_RADICALSTROKE 0x4 #define SORT_KOREAN_KSC 0x0 #define SORT_KOREAN_UNICODE 0x1 diff --git a/lib/libc/include/any-windows-any/wmcodecdsp.h b/lib/libc/include/any-windows-any/wmcodecdsp.h index 5a6fa35cf6a7..ae24fd05b942 100644 --- a/lib/libc/include/any-windows-any/wmcodecdsp.h +++ b/lib/libc/include/any-windows-any/wmcodecdsp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmcodecdsp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmcodecdsp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmcontainer.h b/lib/libc/include/any-windows-any/wmcontainer.h index 5ad74f27dd03..c91f014043d3 100644 --- a/lib/libc/include/any-windows-any/wmcontainer.h +++ b/lib/libc/include/any-windows-any/wmcontainer.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmcontainer.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmcontainer.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmdrmsdk.h b/lib/libc/include/any-windows-any/wmdrmsdk.h index 40d510d260ad..d2ff2488c1f7 100644 --- a/lib/libc/include/any-windows-any/wmdrmsdk.h +++ b/lib/libc/include/any-windows-any/wmdrmsdk.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmdrmsdk.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmdrmsdk.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmp.h b/lib/libc/include/any-windows-any/wmp.h index eb06929deb1c..012e32eb4be4 100644 --- a/lib/libc/include/any-windows-any/wmp.h +++ b/lib/libc/include/any-windows-any/wmp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmprealestate.h b/lib/libc/include/any-windows-any/wmprealestate.h index ac3b68278013..e91b830e117b 100644 --- a/lib/libc/include/any-windows-any/wmprealestate.h +++ b/lib/libc/include/any-windows-any/wmprealestate.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmprealestate.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmprealestate.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmpservices.h b/lib/libc/include/any-windows-any/wmpservices.h index 6b0f7bdefaea..2871fce98f24 100644 --- a/lib/libc/include/any-windows-any/wmpservices.h +++ b/lib/libc/include/any-windows-any/wmpservices.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmpservices.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmpservices.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmsbuffer.h b/lib/libc/include/any-windows-any/wmsbuffer.h index b3b7d45a9e70..e4f206ed3d3c 100644 --- a/lib/libc/include/any-windows-any/wmsbuffer.h +++ b/lib/libc/include/any-windows-any/wmsbuffer.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmsbuffer.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmsbuffer.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmsdkidl.h b/lib/libc/include/any-windows-any/wmsdkidl.h index 775369b59e75..65b0de7b87a1 100644 --- a/lib/libc/include/any-windows-any/wmsdkidl.h +++ b/lib/libc/include/any-windows-any/wmsdkidl.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmsdkidl.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmsdkidl.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wmsecure.h b/lib/libc/include/any-windows-any/wmsecure.h index 2090eb738139..2cd92bf48fc3 100644 --- a/lib/libc/include/any-windows-any/wmsecure.h +++ b/lib/libc/include/any-windows-any/wmsecure.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wmsecure.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wmsecure.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wpcapi.h b/lib/libc/include/any-windows-any/wpcapi.h index b7e6b6f02da1..ca7a03b1f202 100644 --- a/lib/libc/include/any-windows-any/wpcapi.h +++ b/lib/libc/include/any-windows-any/wpcapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wpcapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wpcapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsdattachment.h b/lib/libc/include/any-windows-any/wsdattachment.h index ce0db34cf968..07fa5e6fe2e9 100644 --- a/lib/libc/include/any-windows-any/wsdattachment.h +++ b/lib/libc/include/any-windows-any/wsdattachment.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsdattachment.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsdattachment.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsdbase.h b/lib/libc/include/any-windows-any/wsdbase.h index 4221bab0dc82..7e98ef7230b9 100644 --- a/lib/libc/include/any-windows-any/wsdbase.h +++ b/lib/libc/include/any-windows-any/wsdbase.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsdbase.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsdbase.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsdclient.h b/lib/libc/include/any-windows-any/wsdclient.h index ea314181d100..6d8a20fd392b 100644 --- a/lib/libc/include/any-windows-any/wsdclient.h +++ b/lib/libc/include/any-windows-any/wsdclient.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsdclient.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsdclient.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsddisco.h b/lib/libc/include/any-windows-any/wsddisco.h index 836eca4712b5..5596bcf4bb9b 100644 --- a/lib/libc/include/any-windows-any/wsddisco.h +++ b/lib/libc/include/any-windows-any/wsddisco.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsddisco.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsddisco.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsdhost.h b/lib/libc/include/any-windows-any/wsdhost.h index 5179a9304e98..0fe49dc0bc68 100644 --- a/lib/libc/include/any-windows-any/wsdhost.h +++ b/lib/libc/include/any-windows-any/wsdhost.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsdhost.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsdhost.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsdxml.h b/lib/libc/include/any-windows-any/wsdxml.h index fa9fe901f780..2d0a28299cf7 100644 --- a/lib/libc/include/any-windows-any/wsdxml.h +++ b/lib/libc/include/any-windows-any/wsdxml.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsdxml.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsdxml.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wsmandisp.h b/lib/libc/include/any-windows-any/wsmandisp.h index c5e1a2fe9206..550e6fa180b4 100644 --- a/lib/libc/include/any-windows-any/wsmandisp.h +++ b/lib/libc/include/any-windows-any/wsmandisp.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wsmandisp.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wsmandisp.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wtypes.h b/lib/libc/include/any-windows-any/wtypes.h index 13dea1348bad..8a4b51804c0f 100644 --- a/lib/libc/include/any-windows-any/wtypes.h +++ b/lib/libc/include/any-windows-any/wtypes.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wtypes.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wtypes.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wtypesbase.h b/lib/libc/include/any-windows-any/wtypesbase.h index fdcda16d9fb8..99c07c2bd9b3 100644 --- a/lib/libc/include/any-windows-any/wtypesbase.h +++ b/lib/libc/include/any-windows-any/wtypesbase.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wtypesbase.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wtypesbase.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/wuapi.h b/lib/libc/include/any-windows-any/wuapi.h index cfdb0a861218..6f48641e3829 100644 --- a/lib/libc/include/any-windows-any/wuapi.h +++ b/lib/libc/include/any-windows-any/wuapi.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/wuapi.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/wuapi.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xamlom.h b/lib/libc/include/any-windows-any/xamlom.h index ca97d9f9a6a1..42f035a8cdcb 100644 --- a/lib/libc/include/any-windows-any/xamlom.h +++ b/lib/libc/include/any-windows-any/xamlom.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xamlom.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xamlom.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xapo.h b/lib/libc/include/any-windows-any/xapo.h index ec5ef3ba33d3..c0177b0973a1 100644 --- a/lib/libc/include/any-windows-any/xapo.h +++ b/lib/libc/include/any-windows-any/xapo.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xapo.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xapo.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xaudio2.h b/lib/libc/include/any-windows-any/xaudio2.h index 75856b72a6bd..331fa2166130 100644 --- a/lib/libc/include/any-windows-any/xaudio2.h +++ b/lib/libc/include/any-windows-any/xaudio2.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xaudio2.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xaudio2.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xaudio2fx.h b/lib/libc/include/any-windows-any/xaudio2fx.h index 350786cf8673..8d859970eaa7 100644 --- a/lib/libc/include/any-windows-any/xaudio2fx.h +++ b/lib/libc/include/any-windows-any/xaudio2fx.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xaudio2fx.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xaudio2fx.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xmllite.h b/lib/libc/include/any-windows-any/xmllite.h index 998ca5a64925..73541e154216 100644 --- a/lib/libc/include/any-windows-any/xmllite.h +++ b/lib/libc/include/any-windows-any/xmllite.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xmllite.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xmllite.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xpsdigitalsignature.h b/lib/libc/include/any-windows-any/xpsdigitalsignature.h index 2adedbe41c2d..b0877ff3c37a 100644 --- a/lib/libc/include/any-windows-any/xpsdigitalsignature.h +++ b/lib/libc/include/any-windows-any/xpsdigitalsignature.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xpsdigitalsignature.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xpsdigitalsignature.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xpsobjectmodel.h b/lib/libc/include/any-windows-any/xpsobjectmodel.h index 99e21e71cf2c..ddce0ab8d917 100644 --- a/lib/libc/include/any-windows-any/xpsobjectmodel.h +++ b/lib/libc/include/any-windows-any/xpsobjectmodel.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xpsobjectmodel.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xpsobjectmodel.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xpsobjectmodel_1.h b/lib/libc/include/any-windows-any/xpsobjectmodel_1.h index 2334b3ab2ed5..353f5fe09439 100644 --- a/lib/libc/include/any-windows-any/xpsobjectmodel_1.h +++ b/lib/libc/include/any-windows-any/xpsobjectmodel_1.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xpsobjectmodel_1.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xpsobjectmodel_1.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xpsprint.h b/lib/libc/include/any-windows-any/xpsprint.h index 5456e61147df..774ffe7966ee 100644 --- a/lib/libc/include/any-windows-any/xpsprint.h +++ b/lib/libc/include/any-windows-any/xpsprint.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xpsprint.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xpsprint.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ diff --git a/lib/libc/include/any-windows-any/xpsrassvc.h b/lib/libc/include/any-windows-any/xpsrassvc.h index d716fee1bedd..50287864fe69 100644 --- a/lib/libc/include/any-windows-any/xpsrassvc.h +++ b/lib/libc/include/any-windows-any/xpsrassvc.h @@ -1,4 +1,4 @@ -/*** Autogenerated by WIDL 9.20 from include/xpsrassvc.idl - Do not edit ***/ +/*** Autogenerated by WIDL 10.0-rc1 from include/xpsrassvc.idl - Do not edit ***/ #ifdef _WIN32 #ifndef __REQUIRED_RPCNDR_H_VERSION__ From 8afe928b6e5483894d58efac9034a7ce3bb8359f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 24 Feb 2025 12:00:09 +0100 Subject: [PATCH 3/4] mingw: Update MinGW-w64 sources to 3839e21b08807479a31d5a9764666f82ae2f0356. --- lib/libc/mingw/crt/cinitexe.c | 7 +- lib/libc/mingw/crt/crt_handler.c | 4 - lib/libc/mingw/crt/crtdll.c | 21 +- lib/libc/mingw/crt/crtexe.c | 19 +- lib/libc/mingw/crt/tlssup.c | 1 + lib/libc/mingw/def-include/crt-aliases.def.in | 24 +- lib/libc/mingw/include/msvcrt.h | 13 +- .../{crt => }/intrincs/RtlSecureZeroMemory.c | 0 lib/libc/mingw/lib-common/kernel32.def.in | 5 + .../lib-common/vcruntime140-common.def.in | 89 + lib/libc/mingw/lib-common/vcruntime140.def.in | 91 +- .../mingw/lib-common/vcruntime140_app.def.in | 94 +- .../mingw/lib-common/vcruntime140d.def.in | 91 +- lib/libc/mingw/lib32/dxva2.def | 1 + lib/libc/mingw/lib32/kernel32.def | 7 +- lib/libc/mingw/lib64/kernel32.def | 5 + lib/libc/mingw/libsrc/wia-uuid.c | 102 +- lib/libc/mingw/math/x86/cossin.c | 23 - lib/libc/mingw/math/x86/cossinl.c | 29 + lib/libc/mingw/misc/isblank.c | 7 - lib/libc/mingw/misc/iswblank.c | 7 - lib/libc/mingw/misc/wctob.c | 2 +- lib/libc/mingw/misc/wctrans.c | 65 - lib/libc/mingw/misc/wctype.c | 65 - .../{mingw_fprintfw.c => mingw_fwprintf.c} | 0 lib/libc/mingw/stdio/mingw_pformat.h | 11 +- lib/libc/mingw/stdio/mingw_sformat.c | 1602 ++++++++++++++++ lib/libc/mingw/stdio/mingw_sformat.h | 63 + .../{mingw_snprintfw.c => mingw_snwprintf.c} | 0 .../{mingw_wvfscanf.c => mingw_swformat.c} | 46 +- lib/libc/mingw/stdio/mingw_swformat.h | 63 + .../{mingw_sprintfw.c => mingw_swprintf.c} | 4 +- lib/libc/mingw/stdio/mingw_vfscanf.c | 1620 +---------------- .../{mingw_vfprintfw.c => mingw_vfwprintf.c} | 0 lib/libc/mingw/stdio/mingw_vfwscanf.c | 14 + lib/libc/mingw/stdio/mingw_vsnprintf.c | 18 + ...{mingw_vsnprintfw.c => mingw_vsnwprintf.c} | 0 lib/libc/mingw/stdio/mingw_vsscanf.c | 15 + .../{mingw_vsprintfw.c => mingw_vswprintf.c} | 4 +- lib/libc/mingw/stdio/mingw_vswscanf.c | 15 + .../{mingw_vprintfw.c => mingw_vwprintf.c} | 0 .../{mingw_pformatw.c => mingw_wpformat.c} | 0 .../{mingw_printfw.c => mingw_wprintf.c} | 0 lib/libc/mingw/stdio/scanf.S | 243 --- lib/libc/mingw/stdio/scanf2-argcount-char.c | 9 - .../mingw/stdio/scanf2-argcount-template.c | 18 - lib/libc/mingw/stdio/scanf2-argcount-wchar.c | 9 - lib/libc/mingw/stdio/scanf2-template.S | 32 - lib/libc/mingw/stdio/snwprintf.c | 2 +- lib/libc/mingw/stdio/ucrt_ms_fprintf.c | 22 + lib/libc/mingw/stdio/vfscanf.c | 35 - lib/libc/mingw/stdio/vfscanf2.S | 12 - lib/libc/mingw/stdio/vfwscanf.c | 36 - lib/libc/mingw/stdio/vfwscanf2.S | 12 - lib/libc/mingw/stdio/vscanf.c | 15 - lib/libc/mingw/stdio/vscanf2.S | 12 - lib/libc/mingw/stdio/vsnwprintf.c | 20 +- lib/libc/mingw/stdio/vsscanf.c | 36 - lib/libc/mingw/stdio/vsscanf2.S | 12 - lib/libc/mingw/stdio/vswscanf.c | 36 - lib/libc/mingw/stdio/vswscanf2.S | 12 - lib/libc/mingw/stdio/vwscanf.c | 16 - lib/libc/mingw/stdio/vwscanf2.S | 12 - lib/libc/mingw/winpthreads/thread.c | 5 +- lib/libc/mingw/winpthreads/thread.h | 2 +- src/mingw.zig | 47 +- 66 files changed, 2070 insertions(+), 2832 deletions(-) rename lib/libc/mingw/{crt => }/intrincs/RtlSecureZeroMemory.c (100%) create mode 100644 lib/libc/mingw/lib-common/vcruntime140-common.def.in create mode 100644 lib/libc/mingw/math/x86/cossinl.c delete mode 100644 lib/libc/mingw/misc/isblank.c delete mode 100644 lib/libc/mingw/misc/iswblank.c delete mode 100644 lib/libc/mingw/misc/wctrans.c delete mode 100644 lib/libc/mingw/misc/wctype.c rename lib/libc/mingw/stdio/{mingw_fprintfw.c => mingw_fwprintf.c} (100%) create mode 100644 lib/libc/mingw/stdio/mingw_sformat.c create mode 100644 lib/libc/mingw/stdio/mingw_sformat.h rename lib/libc/mingw/stdio/{mingw_snprintfw.c => mingw_snwprintf.c} (100%) rename lib/libc/mingw/stdio/{mingw_wvfscanf.c => mingw_swformat.c} (97%) create mode 100644 lib/libc/mingw/stdio/mingw_swformat.h rename lib/libc/mingw/stdio/{mingw_sprintfw.c => mingw_swprintf.c} (78%) rename lib/libc/mingw/stdio/{mingw_vfprintfw.c => mingw_vfwprintf.c} (100%) create mode 100644 lib/libc/mingw/stdio/mingw_vfwscanf.c rename lib/libc/mingw/stdio/{mingw_vsnprintfw.c => mingw_vsnwprintf.c} (100%) create mode 100644 lib/libc/mingw/stdio/mingw_vsscanf.c rename lib/libc/mingw/stdio/{mingw_vsprintfw.c => mingw_vswprintf.c} (78%) create mode 100644 lib/libc/mingw/stdio/mingw_vswscanf.c rename lib/libc/mingw/stdio/{mingw_vprintfw.c => mingw_vwprintf.c} (100%) rename lib/libc/mingw/stdio/{mingw_pformatw.c => mingw_wpformat.c} (100%) rename lib/libc/mingw/stdio/{mingw_printfw.c => mingw_wprintf.c} (100%) delete mode 100644 lib/libc/mingw/stdio/scanf.S delete mode 100644 lib/libc/mingw/stdio/scanf2-argcount-char.c delete mode 100644 lib/libc/mingw/stdio/scanf2-argcount-template.c delete mode 100644 lib/libc/mingw/stdio/scanf2-argcount-wchar.c delete mode 100644 lib/libc/mingw/stdio/scanf2-template.S create mode 100644 lib/libc/mingw/stdio/ucrt_ms_fprintf.c delete mode 100644 lib/libc/mingw/stdio/vfscanf.c delete mode 100644 lib/libc/mingw/stdio/vfscanf2.S delete mode 100644 lib/libc/mingw/stdio/vfwscanf.c delete mode 100644 lib/libc/mingw/stdio/vfwscanf2.S delete mode 100644 lib/libc/mingw/stdio/vscanf.c delete mode 100644 lib/libc/mingw/stdio/vscanf2.S delete mode 100644 lib/libc/mingw/stdio/vsscanf.c delete mode 100644 lib/libc/mingw/stdio/vsscanf2.S delete mode 100644 lib/libc/mingw/stdio/vswscanf.c delete mode 100644 lib/libc/mingw/stdio/vswscanf2.S delete mode 100644 lib/libc/mingw/stdio/vwscanf.c delete mode 100644 lib/libc/mingw/stdio/vwscanf2.S diff --git a/lib/libc/mingw/crt/cinitexe.c b/lib/libc/mingw/crt/cinitexe.c index ee441ed77f90..9e6931c4fc4b 100644 --- a/lib/libc/mingw/crt/cinitexe.c +++ b/lib/libc/mingw/crt/cinitexe.c @@ -1,13 +1,12 @@ #include #include +#include #ifdef _MSC_VER #pragma comment(linker, "/merge:.CRT=.rdata") #endif -typedef void (__cdecl *_PVFV)(void); - -_CRTALLOC(".CRT$XIA") _PVFV __xi_a[] = { NULL }; -_CRTALLOC(".CRT$XIZ") _PVFV __xi_z[] = { NULL }; +_CRTALLOC(".CRT$XIA") _PIFV __xi_a[] = { NULL }; +_CRTALLOC(".CRT$XIZ") _PIFV __xi_z[] = { NULL }; _CRTALLOC(".CRT$XCA") _PVFV __xc_a[] = { NULL }; _CRTALLOC(".CRT$XCZ") _PVFV __xc_z[] = { NULL }; diff --git a/lib/libc/mingw/crt/crt_handler.c b/lib/libc/mingw/crt/crt_handler.c index c49a2b3b573d..6e0f85af568e 100644 --- a/lib/libc/mingw/crt/crt_handler.c +++ b/lib/libc/mingw/crt/crt_handler.c @@ -51,10 +51,6 @@ __mingw_init_ehandler (void) if (_FindPESectionByName (".pdata") != NULL) return 1; - /* Allocate # of e tables and entries. */ - memset (emu_pdata, 0, sizeof (RUNTIME_FUNCTION) * MAX_PDATA_ENTRIES); - memset (emu_xdata, 0, sizeof (UNWIND_INFO) * MAX_PDATA_ENTRIES); - e = 0; /* Fill tables and entries. */ while (e < MAX_PDATA_ENTRIES && (pSec = _FindPESectionExec (e)) != NULL) diff --git a/lib/libc/mingw/crt/crtdll.c b/lib/libc/mingw/crt/crtdll.c index d08d2a81f0dd..90da38e604f7 100644 --- a/lib/libc/mingw/crt/crtdll.c +++ b/lib/libc/mingw/crt/crtdll.c @@ -97,7 +97,8 @@ WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) { __native_startup_state = __initializing; - _initterm ((_PVFV *) (void *) __xi_a, (_PVFV *) (void *) __xi_z); + if (_initterm_e (__xi_a, __xi_z) != 0) + return FALSE; } if (__native_startup_state == __initializing) { @@ -147,15 +148,15 @@ WINBOOL WINAPI DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) { __mingw_app_type = 0; - if (dwReason == DLL_PROCESS_ATTACH) - { -#if defined(__x86_64__) && !defined(__SEH__) - __mingw_init_ehandler (); -#endif - } return __DllMainCRTStartup (hDllHandle, dwReason, lpreserved); } +static +#if defined(__i386__) || defined(_X86_) +/* We need to make sure that we align the stack to 16 bytes for the sake of SSE + opts in DllMain/DllEntryPoint or in functions called from DllMain/DllEntryPoint. */ +__attribute__((force_align_arg_pointer)) +#endif __declspec(noinline) WINBOOL __DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) { @@ -168,6 +169,12 @@ __DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) goto i__leave; } _pei386_runtime_relocator (); + +#if defined(__x86_64__) && !defined(__SEH__) + if (dwReason == DLL_PROCESS_ATTACH) + __mingw_init_ehandler (); +#endif + if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH) { retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved); diff --git a/lib/libc/mingw/crt/crtexe.c b/lib/libc/mingw/crt/crtexe.c index cdf5dcd25894..328cc305b9b8 100644 --- a/lib/libc/mingw/crt/crtexe.c +++ b/lib/libc/mingw/crt/crtexe.c @@ -58,11 +58,9 @@ extern void __main(void); static _TCHAR **argv; static _TCHAR **envp; -static int argret; static int mainret=0; static int managedapp; static int has_cctor = 0; -static _startupinfo startinfo; extern LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler; extern void _pei386_runtime_relocator (void); @@ -97,6 +95,7 @@ __mingw_invalidParameterHandler (const wchar_t * __UNUSED_PARAM_1(expression), static int __cdecl pre_c_init (void) { + int ret; managedapp = check_managed_app (); if (__mingw_app_type) __set_app_type(_GUI_APP); @@ -107,10 +106,12 @@ pre_c_init (void) * __p__commode() = _commode; #ifdef _UNICODE - _wsetargv(); + ret = _wsetargv(); #else - _setargv(); + ret = _setargv(); #endif + if (ret < 0) + _amsg_exit(8); /* _RT_SPACEARG */ if (_MINGW_INSTALL_DEBUG_MATHERR == 1) { __setusermatherr (_matherr); @@ -125,6 +126,9 @@ pre_c_init (void) static void __cdecl pre_cpp_init (void) { + _startupinfo startinfo; + int argret; + startinfo.newmode = _newmode; #ifdef _UNICODE @@ -132,6 +136,8 @@ pre_cpp_init (void) #else argret = __getmainargs(&argc,&argv,&envp,_dowildcard,&startinfo); #endif + if (argret < 0) + _amsg_exit(8); /* _RT_SPACEARG */ } static int __tmainCRTStartup (void); @@ -197,7 +203,7 @@ int mainCRTStartup (void) static #if defined(__i386__) || defined(_X86_) /* We need to make sure that we align the stack to 16 bytes for the sake of SSE - opts in main or in functions called main. */ + opts in main or in functions called from main. */ __attribute__((force_align_arg_pointer)) #endif __declspec(noinline) int @@ -223,7 +229,8 @@ __tmainCRTStartup (void) else if (__native_startup_state == __uninitialized) { __native_startup_state = __initializing; - _initterm ((_PVFV *)(void *)__xi_a, (_PVFV *)(void *) __xi_z); + if (_initterm_e (__xi_a, __xi_z) != 0) + return 255; } else has_cctor = 1; diff --git a/lib/libc/mingw/crt/tlssup.c b/lib/libc/mingw/crt/tlssup.c index 3ff03971e90d..de546dcb4d26 100644 --- a/lib/libc/mingw/crt/tlssup.c +++ b/lib/libc/mingw/crt/tlssup.c @@ -32,6 +32,7 @@ typedef struct TlsDtorNode { _PVFV funcs[FUNCS_PER_NODE]; } TlsDtorNode; +__attribute__((used)) ULONG _tls_index = 0; /* TLS raw template data start and end. diff --git a/lib/libc/mingw/def-include/crt-aliases.def.in b/lib/libc/mingw/def-include/crt-aliases.def.in index 3fb824c65453..be873c0df376 100644 --- a/lib/libc/mingw/def-include/crt-aliases.def.in +++ b/lib/libc/mingw/def-include/crt-aliases.def.in @@ -231,6 +231,12 @@ ADD_UNDERSCORE(y1) ADD_UNDERSCORE(yn) ; This is list of symbol aliases for C95 functions +#ifdef WITH_GET_PUT_WCHAR_ALIASES +getwc == fgetwc +getwchar == _fgetwchar +putwc == fputwc +putwchar == _fputwchar +#endif #ifdef USE_WCSTOK_S_FOR_WCSTOK wcstok == wcstok_s #endif @@ -531,24 +537,22 @@ __ms_printf == printf __ms_scanf == scanf __ms_sprintf == sprintf __ms_sscanf == sscanf -#ifdef PRE_C95_SWPRINTF -__ms_swprintf == swprintf -#else -__ms_swprintf == _swprintf -#endif __ms_swscanf == swscanf __ms_vfprintf == vfprintf __ms_vfwprintf == vfwprintf __ms_vprintf == vprintf __ms_vsprintf == vsprintf -#ifdef PRE_C95_SWPRINTF -__ms_vswprintf == vswprintf -#else -__ms_vswprintf == _vswprintf -#endif __ms_vwprintf == vwprintf __ms_wprintf == wprintf __ms_wscanf == wscanf +#ifdef WITH_MS_VSCANF_ALIASES +__ms_vfscanf == vfscanf +__ms_vfwscanf == vfwscanf +__ms_vscanf == vscanf +__ms_vsscanf == vsscanf +__ms_vswscanf == vswscanf +__ms_vwscanf == vwscanf +#endif #endif ; This is list of additional symbol aliases not available in any library as neither native symbols nor aliases diff --git a/lib/libc/mingw/include/msvcrt.h b/lib/libc/mingw/include/msvcrt.h index c6f10522471a..9e48bf0694b3 100644 --- a/lib/libc/mingw/include/msvcrt.h +++ b/lib/libc/mingw/include/msvcrt.h @@ -1,10 +1,15 @@ -#include - #ifndef __LIBMSVCRT_OS__ #error "This file should only be used in libmsvcrt-os.a" #endif -static inline HANDLE __mingw_get_msvcrt_handle(void) +#ifndef MSVCRT_H +#define MSVCRT_H + +#include + +static inline HMODULE __mingw_get_msvcrt_handle(void) { - return GetModuleHandleW(L"msvcrt.dll"); + return GetModuleHandleA("msvcrt.dll"); } + +#endif diff --git a/lib/libc/mingw/crt/intrincs/RtlSecureZeroMemory.c b/lib/libc/mingw/intrincs/RtlSecureZeroMemory.c similarity index 100% rename from lib/libc/mingw/crt/intrincs/RtlSecureZeroMemory.c rename to lib/libc/mingw/intrincs/RtlSecureZeroMemory.c diff --git a/lib/libc/mingw/lib-common/kernel32.def.in b/lib/libc/mingw/lib-common/kernel32.def.in index f46a43246b43..2b7fffc7a159 100644 --- a/lib/libc/mingw/lib-common/kernel32.def.in +++ b/lib/libc/mingw/lib-common/kernel32.def.in @@ -25,6 +25,7 @@ AddVectoredContinueHandler AddVectoredExceptionHandler AdjustCalendarDate AllocConsole +AllocConsoleWithOptions AllocateUserPhysicalPages AllocateUserPhysicalPagesNuma AppPolicyGetClrCompat @@ -447,6 +448,7 @@ FindVolumeMountPointClose FlsAlloc FlsFree FlsGetValue +FlsGetValue2 FlsSetValue FlushConsoleInputBuffer FlushFileBuffers @@ -626,6 +628,7 @@ GetFileAttributesW GetFileBandwidthReservation GetFileInformationByHandle GetFileInformationByHandleEx +GetFileInformationByName GetFileMUIInfo GetFileMUIPath GetFileSize @@ -1282,6 +1285,7 @@ ReleaseActCtxWorker ReleaseMutex ReleaseMutexWhenCallbackReturns ReleasePackageVirtualizationContext +ReleasePseudoConsole ReleaseSRWLockExclusive ReleaseSRWLockShared ReleaseSemaphore @@ -1543,6 +1547,7 @@ Thread32Next TlsAlloc TlsFree TlsGetValue +TlsGetValue2 TlsSetValue Toolhelp32ReadProcessMemory TransactNamedPipe diff --git a/lib/libc/mingw/lib-common/vcruntime140-common.def.in b/lib/libc/mingw/lib-common/vcruntime140-common.def.in new file mode 100644 index 000000000000..6dc643f70635 --- /dev/null +++ b/lib/libc/mingw/lib-common/vcruntime140-common.def.in @@ -0,0 +1,89 @@ +_CreateFrameInfo +F_I386(_CxxThrowException@8) +F_NON_I386(_CxxThrowException) +F_I386(_EH_prolog) +_FindAndUnlinkFrame +_IsExceptionObjectToBeDestroyed +F_I386(_NLG_Dispatch2@4) +F_I386(_NLG_Return@12) +F_I386(_NLG_Return2) +_SetWinRTOutOfMemoryExceptionCallback +__AdjustPointer +__BuildCatchObject +__BuildCatchObjectHelper +F_NON_I386(__C_specific_handler) +F_NON_I386(__C_specific_handler_noexcept) +__CxxDetectRethrow +__CxxExceptionFilter +__CxxFrameHandler +__CxxFrameHandler2 +__CxxFrameHandler3 +F_I386(__CxxLongjmpUnwind@4) +__CxxQueryExceptionSize +__CxxRegisterExceptionObject +__CxxUnregisterExceptionObject +__DestructExceptionObject +__FrameUnwindFilter +__GetPlatformExceptionInfo +F_NON_I386(__NLG_Dispatch2) +F_NON_I386(__NLG_Return2) +__RTCastToVoid +__RTDynamicCast +__RTtypeid +__TypeMatch +__current_exception +__current_exception_context +F_NON_ARM64(__intrinsic_setjmp) +F_NON_I386(__intrinsic_setjmpex) +F_ARM32(__jump_unwind) +__processing_throw +__report_gsfailure +__std_exception_copy +__std_exception_destroy +__std_terminate +__std_type_info_compare +__std_type_info_destroy_list +__std_type_info_hash +__std_type_info_name +__telemetry_main_invoke_trigger +__telemetry_main_return_trigger +__unDName +__unDNameEx +__uncaught_exception +__uncaught_exceptions +__vcrt_GetModuleFileNameW +__vcrt_GetModuleHandleW +__vcrt_InitializeCriticalSectionEx +__vcrt_LoadLibraryExW +F_I386(_chkesp) +F_I386(_except_handler2) +F_I386(_except_handler3) +F_I386(_except_handler4_common) +_get_purecall_handler +_get_unexpected +F_I386(_global_unwind2) +_is_exception_typeof +F64(_local_unwind) +F_I386(_local_unwind2) +F_I386(_local_unwind4) +F_I386(_longjmpex) +_purecall +F_I386(_seh_longjmp_unwind4@4) +F_I386(_seh_longjmp_unwind@4) +_set_purecall_handler +_set_se_translator +F_I386(_setjmp3) +longjmp +memchr +memcmp +memcpy +memmove +memset +set_unexpected +strchr +strrchr +strstr +unexpected +wcschr +wcsrchr +wcsstr diff --git a/lib/libc/mingw/lib-common/vcruntime140.def.in b/lib/libc/mingw/lib-common/vcruntime140.def.in index 4d507d03c4b0..b3b548e29cbf 100644 --- a/lib/libc/mingw/lib-common/vcruntime140.def.in +++ b/lib/libc/mingw/lib-common/vcruntime140.def.in @@ -2,93 +2,4 @@ LIBRARY "VCRUNTIME140.dll" EXPORTS #include "func.def.in" - -_CreateFrameInfo -F_I386(_CxxThrowException@8) -F_NON_I386(_CxxThrowException) -F_I386(_EH_prolog) -_FindAndUnlinkFrame -_IsExceptionObjectToBeDestroyed -F_I386(_NLG_Dispatch2@4) -F_I386(_NLG_Return@12) -F_I386(_NLG_Return2) -_SetWinRTOutOfMemoryExceptionCallback -__AdjustPointer -__BuildCatchObject -__BuildCatchObjectHelper -F_NON_I386(__C_specific_handler) -F_NON_I386(__C_specific_handler_noexcept) -__CxxDetectRethrow -__CxxExceptionFilter -__CxxFrameHandler -__CxxFrameHandler2 -__CxxFrameHandler3 -F_I386(__CxxLongjmpUnwind@4) -__CxxQueryExceptionSize -__CxxRegisterExceptionObject -__CxxUnregisterExceptionObject -__DestructExceptionObject -__FrameUnwindFilter -__GetPlatformExceptionInfo -F_NON_I386(__NLG_Dispatch2) -F_NON_I386(__NLG_Return2) -__RTCastToVoid -__RTDynamicCast -__RTtypeid -__TypeMatch -__current_exception -__current_exception_context -F_NON_ARM64(__intrinsic_setjmp) -F_NON_I386(__intrinsic_setjmpex) -F_ARM32(__jump_unwind) -__processing_throw -__report_gsfailure -__std_exception_copy -__std_exception_destroy -__std_terminate -__std_type_info_compare -__std_type_info_destroy_list -__std_type_info_hash -__std_type_info_name -__telemetry_main_invoke_trigger -__telemetry_main_return_trigger -__unDName -__unDNameEx -__uncaught_exception -__uncaught_exceptions -__vcrt_GetModuleFileNameW -__vcrt_GetModuleHandleW -__vcrt_InitializeCriticalSectionEx -__vcrt_LoadLibraryExW -F_I386(_chkesp) -F_I386(_except_handler2) -F_I386(_except_handler3) -F_I386(_except_handler4_common) -_get_purecall_handler -_get_unexpected -F_I386(_global_unwind2) -_is_exception_typeof -F64(_local_unwind) -F_I386(_local_unwind2) -F_I386(_local_unwind4) -F_I386(_longjmpex) -_purecall -F_I386(_seh_longjmp_unwind4@4) -F_I386(_seh_longjmp_unwind@4) -_set_purecall_handler -_set_se_translator -F_I386(_setjmp3) -longjmp -memchr -memcmp -memcpy -memmove -memset -set_unexpected -strchr -strrchr -strstr -unexpected -wcschr -wcsrchr -wcsstr +#include "vcruntime140-common.def.in" diff --git a/lib/libc/mingw/lib-common/vcruntime140_app.def.in b/lib/libc/mingw/lib-common/vcruntime140_app.def.in index f4f70060ecb9..3048e9770d36 100644 --- a/lib/libc/mingw/lib-common/vcruntime140_app.def.in +++ b/lib/libc/mingw/lib-common/vcruntime140_app.def.in @@ -1,95 +1,5 @@ -LIBRARY vcruntime140_app - +LIBRARY "VCRUNTIME140_APP.dll" EXPORTS #include "func.def.in" - -_CreateFrameInfo -F_I386(_CxxThrowException@8) -F_NON_I386(_CxxThrowException) -F_I386(_EH_prolog) -_FindAndUnlinkFrame -_IsExceptionObjectToBeDestroyed -F_I386(_NLG_Dispatch2) -F_I386(_NLG_Return) -F_I386(_NLG_Return2) -_SetWinRTOutOfMemoryExceptionCallback -__AdjustPointer -__BuildCatchObject -__BuildCatchObjectHelper -F_NON_I386(__C_specific_handler) -F_NON_I386(__C_specific_handler_noexcept) -__CxxDetectRethrow -__CxxExceptionFilter -__CxxFrameHandler -__CxxFrameHandler2 -__CxxFrameHandler3 -F_I386(__CxxLongjmpUnwind@4) -__CxxQueryExceptionSize -__CxxRegisterExceptionObject -__CxxUnregisterExceptionObject -__DestructExceptionObject -__FrameUnwindFilter -__GetPlatformExceptionInfo -F_NON_I386(__NLG_Dispatch2) -F_NON_I386(__NLG_Return2) -__RTCastToVoid -__RTDynamicCast -__RTtypeid -__TypeMatch -__current_exception -__current_exception_context -F_NON_ARM64(__intrinsic_setjmp) -F_NON_I386(__intrinsic_setjmpex) -F_ARM32(__jump_unwind) -__processing_throw -__report_gsfailure -__std_exception_copy -__std_exception_destroy -__std_terminate -__std_type_info_compare -__std_type_info_destroy_list -__std_type_info_hash -__std_type_info_name -__telemetry_main_invoke_trigger -__telemetry_main_return_trigger -__unDName -__unDNameEx -__uncaught_exception -__uncaught_exceptions -__vcrt_GetModuleFileNameW -__vcrt_GetModuleHandleW -__vcrt_InitializeCriticalSectionEx -__vcrt_LoadLibraryExW -F_I386(_chkesp) -F_I386(_except_handler2) -F_I386(_except_handler3) -F_I386(_except_handler4_common) -_get_purecall_handler -_get_unexpected -F_I386(_global_unwind2) -_is_exception_typeof -F_I386(_local_unwind2) -F_I386(_local_unwind4) -F_I386(_longjmpex) -F64(_local_unwind) -_purecall -F_I386(_seh_longjmp_unwind4@4) -F_I386(_seh_longjmp_unwind@4) -_set_purecall_handler -_set_se_translator -F_I386(_setjmp3) -longjmp -memchr -memcmp -memcpy -memmove -memset -set_unexpected -strchr -strrchr -strstr -unexpected -wcschr -wcsrchr -wcsstr +#include "vcruntime140-common.def.in" diff --git a/lib/libc/mingw/lib-common/vcruntime140d.def.in b/lib/libc/mingw/lib-common/vcruntime140d.def.in index c0ac6c9d6776..50819fab5534 100644 --- a/lib/libc/mingw/lib-common/vcruntime140d.def.in +++ b/lib/libc/mingw/lib-common/vcruntime140d.def.in @@ -2,93 +2,4 @@ LIBRARY "VCRUNTIME140D.dll" EXPORTS #include "func.def.in" - -_CreateFrameInfo -F_I386(_CxxThrowException@8) -F_NON_I386(_CxxThrowException) -F_I386(_EH_prolog) -_FindAndUnlinkFrame -_IsExceptionObjectToBeDestroyed -F_I386(_NLG_Dispatch2@4) -F_I386(_NLG_Return@12) -F_I386(_NLG_Return2) -_SetWinRTOutOfMemoryExceptionCallback -__AdjustPointer -__BuildCatchObject -__BuildCatchObjectHelper -F_NON_I386(__C_specific_handler) -F_NON_I386(__C_specific_handler_noexcept) -__CxxDetectRethrow -__CxxExceptionFilter -__CxxFrameHandler -__CxxFrameHandler2 -__CxxFrameHandler3 -F_I386(__CxxLongjmpUnwind@4) -__CxxQueryExceptionSize -__CxxRegisterExceptionObject -__CxxUnregisterExceptionObject -__DestructExceptionObject -__FrameUnwindFilter -__GetPlatformExceptionInfo -F_NON_I386(__NLG_Dispatch2) -F_NON_I386(__NLG_Return2) -__RTCastToVoid -__RTDynamicCast -__RTtypeid -__TypeMatch -__current_exception -__current_exception_context -F_NON_ARM64(__intrinsic_setjmp) -F_NON_I386(__intrinsic_setjmpex) -F_ARM32(__jump_unwind) -__processing_throw -__report_gsfailure -__std_exception_copy -__std_exception_destroy -__std_terminate -__std_type_info_compare -__std_type_info_destroy_list -__std_type_info_hash -__std_type_info_name -__telemetry_main_invoke_trigger -__telemetry_main_return_trigger -__unDName -__unDNameEx -__uncaught_exception -__uncaught_exceptions -__vcrt_GetModuleFileNameW -__vcrt_GetModuleHandleW -__vcrt_InitializeCriticalSectionEx -__vcrt_LoadLibraryExW -F_I386(_chkesp) -F_I386(_except_handler2) -F_I386(_except_handler3) -F_I386(_except_handler4_common) -_get_purecall_handler -_get_unexpected -F_I386(_global_unwind2) -_is_exception_typeof -F64(_local_unwind) -F_I386(_local_unwind2) -F_I386(_local_unwind4) -F_I386(_longjmpex) -_purecall -F_I386(_seh_longjmp_unwind4@4) -F_I386(_seh_longjmp_unwind@4) -_set_purecall_handler -_set_se_translator -F_I386(_setjmp3) -longjmp -memchr -memcmp -memcpy -memmove -memset -set_unexpected -strchr -strrchr -strstr -unexpected -wcschr -wcsrchr -wcsstr +#include "vcruntime140-common.def.in" diff --git a/lib/libc/mingw/lib32/dxva2.def b/lib/libc/mingw/lib32/dxva2.def index d43af5be36f3..ea343a53fe0d 100644 --- a/lib/libc/mingw/lib32/dxva2.def +++ b/lib/libc/mingw/lib32/dxva2.def @@ -8,6 +8,7 @@ EXPORTS CapabilitiesRequestAndCapabilitiesReply@12 DXVA2CreateDirect3DDeviceManager9@8 DXVA2CreateVideoService@12 +DXVAHD_CreateDevice@20 DegaussMonitor@4 DestroyPhysicalMonitor@4 DestroyPhysicalMonitors@8 diff --git a/lib/libc/mingw/lib32/kernel32.def b/lib/libc/mingw/lib32/kernel32.def index e5a8dc456ce9..51582f24c47b 100644 --- a/lib/libc/mingw/lib32/kernel32.def +++ b/lib/libc/mingw/lib32/kernel32.def @@ -30,6 +30,7 @@ AddVectoredContinueHandler@8 AddVectoredExceptionHandler@8 AdjustCalendarDate@12 AllocConsole@0 +AllocConsoleWithOptions@8 AllocateUserPhysicalPages@12 AllocateUserPhysicalPagesNuma@16 AppPolicyGetClrCompat@8 @@ -440,6 +441,7 @@ FindVolumeClose@4 FindVolumeMountPointClose@4 FlsAlloc@4 FlsFree@4 +FlsGetValue2@4 FlsGetValue@4 FlsSetValue@8 FlushConsoleInputBuffer@4 @@ -616,6 +618,7 @@ GetFileAttributesW@4 GetFileBandwidthReservation@24 GetFileInformationByHandle@8 GetFileInformationByHandleEx@16 +GetFileInformationByName@16 GetFileMUIInfo@16 GetFileMUIPath@28 GetFileSize@8 @@ -1270,6 +1273,7 @@ ReleaseActCtxWorker@4 ReleaseMutex@4 ReleaseMutexWhenCallbackReturns@8 ReleasePackageVirtualizationContext@4 +ReleasePseudoConsole@4 ReleaseSRWLockExclusive@4 ReleaseSRWLockShared@4 ReleaseSemaphore@12 @@ -1518,6 +1522,7 @@ Thread32First@8 Thread32Next@8 TlsAlloc@0 TlsFree@4 +TlsGetValue2@4 TlsGetValue@4 TlsSetValue@8 Toolhelp32ReadProcessMemory@20 @@ -1605,7 +1610,7 @@ WerRegisterRuntimeExceptionModuleWorker@8 WerSetFlags@4 WerSetFlagsWorker@4 WerUnregisterAdditionalProcess@4 -WerUnregisterAppLocalDump +WerUnregisterAppLocalDump@0 WerUnregisterCustomMetadata@4 WerUnregisterExcludedMemoryBlock@4 WerUnregisterFile@4 diff --git a/lib/libc/mingw/lib64/kernel32.def b/lib/libc/mingw/lib64/kernel32.def index 5259839aaea9..85686a13a374 100644 --- a/lib/libc/mingw/lib64/kernel32.def +++ b/lib/libc/mingw/lib64/kernel32.def @@ -24,6 +24,7 @@ AddVectoredContinueHandler AddVectoredExceptionHandler AdjustCalendarDate AllocConsole +AllocConsoleWithOptions AllocateUserPhysicalPages AllocateUserPhysicalPagesNuma AppPolicyGetClrCompat @@ -446,6 +447,7 @@ FindVolumeMountPointClose FlsAlloc FlsFree FlsGetValue +FlsGetValue2 FlsSetValue FlushConsoleInputBuffer FlushFileBuffers @@ -625,6 +627,7 @@ GetFileAttributesW GetFileBandwidthReservation GetFileInformationByHandle GetFileInformationByHandleEx +GetFileInformationByName GetFileMUIInfo GetFileMUIPath GetFileSize @@ -1281,6 +1284,7 @@ ReleaseActCtxWorker ReleaseMutex ReleaseMutexWhenCallbackReturns ReleasePackageVirtualizationContext +ReleasePseudoConsole ReleaseSRWLockExclusive ReleaseSRWLockShared ReleaseSemaphore @@ -1542,6 +1546,7 @@ Thread32Next TlsAlloc TlsFree TlsGetValue +TlsGetValue2 TlsSetValue Toolhelp32ReadProcessMemory TransactNamedPipe diff --git a/lib/libc/mingw/libsrc/wia-uuid.c b/lib/libc/mingw/libsrc/wia-uuid.c index cd5609a048f4..bc9e918704b9 100644 --- a/lib/libc/mingw/libsrc/wia-uuid.c +++ b/lib/libc/mingw/libsrc/wia-uuid.c @@ -1,106 +1,6 @@ /* unknwn-uuid.c */ /* Generate GUIDs for WIA interfaces */ -/* All IIDs defined in this file were extracted from - * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */ - #define INITGUID #include - -// Image types -DEFINE_GUID(WiaImgFmt_UNDEFINED,0xb96b3ca9,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_RAWRGB,0xbca48b55,0xf272,0x4371,0xb0,0xf1,0x4a,0x15,0x0d,0x05,0x7b,0xb4); -DEFINE_GUID(WiaImgFmt_MEMORYBMP,0xb96b3caa,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_BMP,0xb96b3cab,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_EMF,0xb96b3cac,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_WMF,0xb96b3cad,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_JPEG,0xb96b3cae,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_PNG,0xb96b3caf,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_GIF,0xb96b3cb0,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_TIFF,0xb96b3cb1,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_EXIF,0xb96b3cb2,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_PHOTOCD,0xb96b3cb3,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_FLASHPIX,0xb96b3cb4,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_ICO,0xb96b3cb5,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e); -DEFINE_GUID(WiaImgFmt_CIFF,0x9821a8ab,0x3a7e,0x4215,0x94,0xe0,0xd2,0x7a,0x46,0x0c,0x03,0xb2); -DEFINE_GUID(WiaImgFmt_PICT,0xa6bc85d8,0x6b3e,0x40ee,0xa9,0x5c,0x25,0xd4,0x82,0xe4,0x1a,0xdc); -DEFINE_GUID(WiaImgFmt_JPEG2K,0x344ee2b2,0x39db,0x4dde,0x81,0x73,0xc4,0xb7,0x5f,0x8f,0x1e,0x49); -DEFINE_GUID(WiaImgFmt_JPEG2KX,0x43e14614,0xc80a,0x4850,0xba,0xf3,0x4b,0x15,0x2d,0xc8,0xda,0x27); - -// Document and other types -DEFINE_GUID(WiaImgFmt_RTF,0x573dd6a3,0x4834,0x432d,0xa9,0xb5,0xe1,0x98,0xdd,0x9e,0x89,0x0d); -DEFINE_GUID(WiaImgFmt_XML,0xb9171457,0xdac8,0x4884,0xb3,0x93,0x15,0xb4,0x71,0xd5,0xf0,0x7e); -DEFINE_GUID(WiaImgFmt_HTML,0xc99a4e62,0x99de,0x4a94,0xac,0xca,0x71,0x95,0x6a,0xc2,0x97,0x7d); -DEFINE_GUID(WiaImgFmt_TXT,0xfafd4d82,0x723f,0x421f,0x93,0x18,0x30,0x50,0x1a,0xc4,0x4b,0x59); -DEFINE_GUID(WiaImgFmt_MPG,0xecd757e4,0xd2ec,0x4f57,0x95,0x5d,0xbc,0xf8,0xa9,0x7c,0x4e,0x52); -DEFINE_GUID(WiaImgFmt_AVI,0x32f8ca14,0x087c,0x4908,0xb7,0xc4,0x67,0x57,0xfe,0x7e,0x90,0xab); -DEFINE_GUID(WiaImgFmt_ASF,0x8d948ee9,0xd0aa,0x4a12,0x9d,0x9a,0x9c,0xc5,0xde,0x36,0x19,0x9b); -DEFINE_GUID(WiaImgFmt_SCRIPT,0xfe7d6c53,0x2dac,0x446a,0xb0,0xbd,0xd7,0x3e,0x21,0xe9,0x24,0xc9); -DEFINE_GUID(WiaImgFmt_EXEC,0x485da097,0x141e,0x4aa5,0xbb,0x3b,0xa5,0x61,0x8d,0x95,0xd0,0x2b); -DEFINE_GUID(WiaImgFmt_UNICODE16,0x1b7639b6,0x6357,0x47d1,0x9a,0x07,0x12,0x45,0x2d,0xc0,0x73,0xe9); -DEFINE_GUID(WiaImgFmt_DPOF,0x369eeeab,0xa0e8,0x45ca,0x86,0xa6,0xa8,0x3c,0xe5,0x69,0x7e,0x28); - -// Audio types -DEFINE_GUID(WiaAudFmt_WAV,0xf818e146,0x07af,0x40ff,0xae,0x55,0xbe,0x8f,0x2c,0x06,0x5d,0xbe); -DEFINE_GUID(WiaAudFmt_MP3,0x0fbc71fb,0x43bf,0x49f2,0x91,0x90,0xe6,0xfe,0xcf,0xf3,0x7e,0x54); -DEFINE_GUID(WiaAudFmt_AIFF,0x66e2bf4f,0xb6fc,0x443f,0x94,0xc8,0x2f,0x33,0xc8,0xa6,0x5a,0xaf); -DEFINE_GUID(WiaAudFmt_WMA,0xd61d6413,0x8bc2,0x438f,0x93,0xad,0x21,0xbd,0x48,0x4d,0xb6,0xa1); - -// Event GUIDs -DEFINE_GUID(WIA_EVENT_DEVICE_DISCONNECTED,0x143e4e83,0x6497,0x11d2,0xa2,0x31,0x00,0xc0,0x4f,0xa3,0x18,0x09); -DEFINE_GUID(WIA_EVENT_DEVICE_CONNECTED,0xa28bbade,0x64b6,0x11d2,0xa2,0x31,0x00,0xc0,0x4f,0xa3,0x18,0x09); -DEFINE_GUID(WIA_EVENT_ITEM_DELETED,0x1d22a559,0xe14f,0x11d2,0xb3,0x26,0x00,0xc0,0x4f,0x68,0xce,0x61); -DEFINE_GUID(WIA_EVENT_ITEM_CREATED,0x4c8f4ef5,0xe14f,0x11d2,0xb3,0x26,0x00,0xc0,0x4f,0x68,0xce,0x61); -DEFINE_GUID(WIA_EVENT_TREE_UPDATED,0xc9859b91,0x4ab2,0x4cd6,0xa1,0xfc,0x58,0x2e,0xec,0x55,0xe5,0x85); -DEFINE_GUID(WIA_EVENT_VOLUME_INSERT,0x9638bbfd,0xd1bd,0x11d2,0xb3,0x1f,0x00,0xc0,0x4f,0x68,0xce,0x61); -DEFINE_GUID(WIA_EVENT_SCAN_IMAGE,0xa6c5a715,0x8c6e,0x11d2,0x97,0x7a,0x00,0x00,0xf8,0x7a,0x92,0x6f); -DEFINE_GUID(WIA_EVENT_SCAN_PRINT_IMAGE,0xb441f425,0x8c6e,0x11d2,0x97,0x7a,0x00,0x00,0xf8,0x7a,0x92,0x6f); -DEFINE_GUID(WIA_EVENT_SCAN_FAX_IMAGE,0xc00eb793,0x8c6e,0x11d2,0x97,0x7a,0x00,0x00,0xf8,0x7a,0x92,0x6f); -DEFINE_GUID(WIA_EVENT_SCAN_OCR_IMAGE,0x9d095b89,0x37d6,0x4877,0xaf,0xed,0x62,0xa2,0x97,0xdc,0x6d,0xbe); -DEFINE_GUID(WIA_EVENT_SCAN_EMAIL_IMAGE,0xc686dcee,0x54f2,0x419e,0x9a,0x27,0x2f,0xc7,0xf2,0xe9,0x8f,0x9e); -DEFINE_GUID(WIA_EVENT_SCAN_FILM_IMAGE,0x9b2b662c,0x6185,0x438c,0xb6,0x8b,0xe3,0x9e,0xe2,0x5e,0x71,0xcb); -DEFINE_GUID(WIA_EVENT_SCAN_IMAGE2,0xfc4767c1,0xc8b3,0x48a2,0x9c,0xfa,0x2e,0x90,0xcb,0x3d,0x35,0x90); -DEFINE_GUID(WIA_EVENT_SCAN_IMAGE3,0x154e27be,0xb617,0x4653,0xac,0xc5,0x0f,0xd7,0xbd,0x4c,0x65,0xce); -DEFINE_GUID(WIA_EVENT_SCAN_IMAGE4,0xa65b704a,0x7f3c,0x4447,0xa7,0x5d,0x8a,0x26,0xdf,0xca,0x1f,0xdf); -DEFINE_GUID(WIA_EVENT_STORAGE_CREATED,0x353308b2,0xfe73,0x46c8,0x89,0x5e,0xfa,0x45,0x51,0xcc,0xc8,0x5a); -DEFINE_GUID(WIA_EVENT_STORAGE_DELETED,0x5e41e75e,0x9390,0x44c5,0x9a,0x51,0xe4,0x70,0x19,0xe3,0x90,0xcf); -DEFINE_GUID(WIA_EVENT_STI_PROXY,0xd711f81f,0x1f0d,0x422d,0x86,0x41,0x92,0x7d,0x1b,0x93,0xe5,0xe5); -DEFINE_GUID(WIA_EVENT_CANCEL_IO,0xc860f7b8,0x9ccd,0x41ea,0xbb,0xbf,0x4d,0xd0,0x9c,0x5b,0x17,0x95); - -// Power management event GUIDs,sent by the WIA service to drivers -DEFINE_GUID(WIA_EVENT_POWER_SUSPEND,0xa0922ff9,0xc3b4,0x411c,0x9e,0x29,0x03,0xa6,0x69,0x93,0xd2,0xbe); -DEFINE_GUID(WIA_EVENT_POWER_RESUME,0x618f153e,0xf686,0x4350,0x96,0x34,0x41,0x15,0xa3,0x04,0x83,0x0c); - -// No action handler and prompt handler -DEFINE_GUID(WIA_EVENT_HANDLER_NO_ACTION,0xe0372b7d,0xe115,0x4525,0xbc,0x55,0xb6,0x29,0xe6,0x8c,0x74,0x5a); -DEFINE_GUID(WIA_EVENT_HANDLER_PROMPT,0x5f4baad0,0x4d59,0x4fcd,0xb2,0x13,0x78,0x3c,0xe7,0xa9,0x2f,0x22); - -// WIA Commands -DEFINE_GUID(WIA_CMD_SYNCHRONIZE,0x9b26b7b2,0xacad,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(WIA_CMD_TAKE_PICTURE,0xaf933cac,0xacad,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(WIA_CMD_DELETE_ALL_ITEMS,0xe208c170,0xacad,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(WIA_CMD_CHANGE_DOCUMENT,0x04e725b0,0xacae,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(WIA_CMD_UNLOAD_DOCUMENT,0x1f3b3d8e,0xacae,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(WIA_CMD_DIAGNOSTIC,0x10ff52f5,0xde04,0x4cf0,0xa5,0xad,0x69,0x1f,0x8d,0xce,0x01,0x41); - -DEFINE_GUID(WIA_CMD_DELETE_DEVICE_TREE,0x73815942,0xdbea,0x11d2,0x84,0x16,0x00,0xc0,0x4f,0xa3,0x61,0x45); -DEFINE_GUID(WIA_CMD_BUILD_DEVICE_TREE,0x9cba5ce0,0xdbea,0x11d2,0x84,0x16,0x00,0xc0,0x4f,0xa3,0x61,0x45); - -DEFINE_GUID(IID_IWiaUIExtension,0xDA319113,0x50EE,0x4C80,0xB4,0x60,0x57,0xD0,0x05,0xD4,0x4A,0x2C); - -DEFINE_GUID(IID_IWiaDevMgr,0x5eb2502a,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11); -DEFINE_GUID(IID_IEnumWIA_DEV_INFO,0x5e38b83c,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11); -DEFINE_GUID(IID_IWiaEventCallback,0xae6287b0,0x0084,0x11d2,0x97,0x3b,0x00,0xa0,0xc9,0x06,0x8f,0x2e); -DEFINE_GUID(IID_IWiaDataCallback,0xa558a866,0xa5b0,0x11d2,0xa0,0x8f,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(IID_IWiaDataTransfer,0xa6cef998,0xa5b0,0x11d2,0xa0,0x8f,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(IID_IWiaItem,0x4db1ad10,0x3391,0x11d2,0x9a,0x33,0x00,0xc0,0x4f,0xa3,0x61,0x45); -DEFINE_GUID(IID_IWiaPropertyStorage,0x98B5E8A0,0x29CC,0x491a,0xAA,0xC0,0xE6,0xDB,0x4F,0xDC,0xCE,0xB6); -DEFINE_GUID(IID_IEnumWiaItem,0x5e8383fc,0x3391,0x11d2,0x9a,0x33,0x00,0xc0,0x4f,0xa3,0x61,0x45); -DEFINE_GUID(IID_IEnumWIA_DEV_CAPS,0x1fcc4287,0xaca6,0x11d2,0xa0,0x93,0x00,0xc0,0x4f,0x72,0xdc,0x3c); -DEFINE_GUID(IID_IEnumWIA_FORMAT_INFO,0x81BEFC5B,0x656D,0x44f1,0xB2,0x4C,0xD4,0x1D,0x51,0xB4,0xDC,0x81); -DEFINE_GUID(IID_IWiaLog,0xA00C10B6,0x82A1,0x452f,0x8B,0x6C,0x86,0x06,0x2A,0xAD,0x68,0x90); -DEFINE_GUID(IID_IWiaLogEx,0xAF1F22AC,0x7A40,0x4787,0xB4,0x21,0xAE,0xb4,0x7A,0x1F,0xBD,0x0B); -DEFINE_GUID(IID_IWiaNotifyDevMgr,0x70681EA0,0xE7BF,0x4291,0x9F,0xB1,0x4E,0x88,0x13,0xA3,0xF7,0x8E); -DEFINE_GUID(IID_IWiaItemExtras,0x6291ef2c,0x36ef,0x4532,0x87,0x6a,0x8e,0x13,0x25,0x93,0x77,0x8d); -DEFINE_GUID(CLSID_WiaDevMgr,0xa1f4e726,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11); -DEFINE_GUID(CLSID_WiaLog,0xA1E75357,0x881A,0x419e,0x83,0xE2,0xBB,0x16,0xDB,0x19,0x7C,0x68); +#include diff --git a/lib/libc/mingw/math/x86/cossin.c b/lib/libc/mingw/math/x86/cossin.c index cb3340545d89..b86fbfc9e8ff 100644 --- a/lib/libc/mingw/math/x86/cossin.c +++ b/lib/libc/mingw/math/x86/cossin.c @@ -5,7 +5,6 @@ */ void sincos (double __x, double *p_sin, double *p_cos); -void sincosl (long double __x, long double *p_sin, long double *p_cos); void sincosf (float __x, float *p_sin, float *p_cos); void sincos (double __x, double *p_sin, double *p_cos) @@ -51,25 +50,3 @@ void sincosf (float __x, float *p_sin, float *p_cos) *p_sin = (float) s; *p_cos = (float) c; } - -void sincosl (long double __x, long double *p_sin, long double *p_cos) -{ - long double c, s; - - __asm__ __volatile__ ("fsincos\n\t" - "fnstsw %%ax\n\t" - "testl $0x400, %%eax\n\t" - "jz 1f\n\t" - "fldpi\n\t" - "fadd %%st(0)\n\t" - "fxch %%st(1)\n\t" - "2: fprem1\n\t" - "fnstsw %%ax\n\t" - "testl $0x400, %%eax\n\t" - "jnz 2b\n\t" - "fstp %%st(1)\n\t" - "fsincos\n\t" - "1:" : "=t" (c), "=u" (s) : "0" (__x) : "eax"); - *p_sin = s; - *p_cos = c; -} diff --git a/lib/libc/mingw/math/x86/cossinl.c b/lib/libc/mingw/math/x86/cossinl.c new file mode 100644 index 000000000000..cfd172dcbdf6 --- /dev/null +++ b/lib/libc/mingw/math/x86/cossinl.c @@ -0,0 +1,29 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +void sincosl (long double __x, long double *p_sin, long double *p_cos); + +void sincosl (long double __x, long double *p_sin, long double *p_cos) +{ + long double c, s; + + __asm__ __volatile__ ("fsincos\n\t" + "fnstsw %%ax\n\t" + "testl $0x400, %%eax\n\t" + "jz 1f\n\t" + "fldpi\n\t" + "fadd %%st(0)\n\t" + "fxch %%st(1)\n\t" + "2: fprem1\n\t" + "fnstsw %%ax\n\t" + "testl $0x400, %%eax\n\t" + "jnz 2b\n\t" + "fstp %%st(1)\n\t" + "fsincos\n\t" + "1:" : "=t" (c), "=u" (s) : "0" (__x) : "eax"); + *p_sin = s; + *p_cos = c; +} diff --git a/lib/libc/mingw/misc/isblank.c b/lib/libc/mingw/misc/isblank.c deleted file mode 100644 index ce6247c1c3ed..000000000000 --- a/lib/libc/mingw/misc/isblank.c +++ /dev/null @@ -1,7 +0,0 @@ -#define __NO_CTYPE_LINES -#include - -int __cdecl isblank (int _C) -{ - return (_isctype(_C, _BLANK) || _C == '\t'); -} diff --git a/lib/libc/mingw/misc/iswblank.c b/lib/libc/mingw/misc/iswblank.c deleted file mode 100644 index bdf73e564969..000000000000 --- a/lib/libc/mingw/misc/iswblank.c +++ /dev/null @@ -1,7 +0,0 @@ -#define _CRT_WCTYPE_NOINLINE -#include - -int __cdecl iswblank (wint_t _C) -{ - return (iswctype(_C, _BLANK) || _C == '\t'); -} diff --git a/lib/libc/mingw/misc/wctob.c b/lib/libc/mingw/misc/wctob.c index 008e69117077..995f6db6e115 100644 --- a/lib/libc/mingw/misc/wctob.c +++ b/lib/libc/mingw/misc/wctob.c @@ -25,5 +25,5 @@ int wctob (wint_t wc ) || invalid_char) return EOF; - return (int) c; + return (unsigned char) c; } diff --git a/lib/libc/mingw/misc/wctrans.c b/lib/libc/mingw/misc/wctrans.c deleted file mode 100644 index bcd9ef9fa2f1..000000000000 --- a/lib/libc/mingw/misc/wctrans.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -/* - wctrans.c - 7.25.3.2 Extensible wide-character case mapping functions - - Contributed by: Danny Smith - 2005-02-24 - - This source code is placed in the PUBLIC DOMAIN. It is modified - from the Q8 package created by Doug Gwyn - - */ - -#include -#include - -/* - This differs from the MS implementation of wctrans which - returns 0 for tolower and 1 for toupper. According to - C99, a 0 return value indicates invalid input. - - These two function go in the same translation unit so that we - can ensure that - towctrans(wc, wctrans("tolower")) == towlower(wc) - towctrans(wc, wctrans("toupper")) == towupper(wc) - It also ensures that - towctrans(wc, wctrans("")) == wc - which is not required by standard. -*/ - -static const struct { - const char *name; - wctrans_t val; } tmap[] = { - {"tolower", _LOWER}, - {"toupper", _UPPER} - }; - -#define NTMAP (sizeof tmap / sizeof tmap[0]) - -wctrans_t -wctrans (const char* property) -{ - int i; - for ( i = 0; i < (int) NTMAP; ++i ) - if (strcmp (property, tmap[i].name) == 0) - return tmap[i].val; - return 0; -} - -wint_t towctrans (wint_t wc, wctrans_t desc) -{ - switch (desc) - { - case _LOWER: - return towlower (wc); - case _UPPER: - return towupper (wc); - default: - return wc; - } -} diff --git a/lib/libc/mingw/misc/wctype.c b/lib/libc/mingw/misc/wctype.c deleted file mode 100644 index b6cfc1ddffdf..000000000000 --- a/lib/libc/mingw/misc/wctype.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -/* - wctype.c - 7.25.2.2.2 The wctype function - - Contributed by: Danny Smith - 2005-02-24 - - This source code is placed in the PUBLIC DOMAIN. It is modified - from the Q8 package created by Doug Gwyn - - The wctype function constructs a value with type wctype_t that - describes a class of wide characters identified by the string - argument property. - - In particular, we map the property strings so that: - - iswctype(wc, wctype("alnum")) == iswalnum(wc) - iswctype(wc, wctype("alpha")) == iswalpha(wc) - iswctype(wc, wctype("cntrl")) == iswcntrl(wc) - iswctype(wc, wctype("digit")) == iswdigit(wc) - iswctype(wc, wctype("graph")) == iswgraph(wc) - iswctype(wc, wctype("lower")) == iswlower(wc) - iswctype(wc, wctype("print")) == iswprint(wc) - iswctype(wc, wctype("punct")) == iswpunct(wc) - iswctype(wc, wctype("space")) == iswspace(wc) - iswctype(wc, wctype("upper")) == iswupper(wc) - iswctype(wc, wctype("xdigit")) == iswxdigit(wc) - -*/ - -#include -#include - -/* Using the bit-OR'd ctype character classification flags as return - values achieves compatibility with MS iswctype(). */ -static const struct { - const char *name; - wctype_t flags;} cmap[] = { - {"alnum", _ALPHA|_DIGIT}, - {"alpha", _ALPHA}, - {"cntrl", _CONTROL}, - {"digit", _DIGIT}, - {"graph", _PUNCT|_ALPHA|_DIGIT}, - {"lower", _LOWER}, - {"print", _BLANK|_PUNCT|_ALPHA|_DIGIT}, - {"punct", _PUNCT}, - {"space", _SPACE}, - {"upper", _UPPER}, - {"xdigit", _HEX} - }; - -#define NCMAP (sizeof cmap / sizeof cmap[0]) -wctype_t wctype (const char *property) -{ - int i; - for (i = 0; i < (int) NCMAP; ++i) - if (strcmp (property, cmap[i].name) == 0) - return cmap[i].flags; - return 0; -} diff --git a/lib/libc/mingw/stdio/mingw_fprintfw.c b/lib/libc/mingw/stdio/mingw_fwprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_fprintfw.c rename to lib/libc/mingw/stdio/mingw_fwprintf.c diff --git a/lib/libc/mingw/stdio/mingw_pformat.h b/lib/libc/mingw/stdio/mingw_pformat.h index 4777804322ab..3381ff8ba908 100644 --- a/lib/libc/mingw/stdio/mingw_pformat.h +++ b/lib/libc/mingw/stdio/mingw_pformat.h @@ -72,13 +72,20 @@ # define __printf __mingw_wprintf # define __fprintf __mingw_fwprintf -# define __sprintf __mingw_swprintf +#ifdef __BUILD_WIDEAPI_ISO +# define __snprintf __mingw_swprintf +#else # define __snprintf __mingw_snwprintf +#endif # define __vprintf __mingw_vwprintf # define __vfprintf __mingw_vfwprintf -# define __vsprintf __mingw_vswprintf +#ifdef __BUILD_WIDEAPI_ISO +# define __vsnprintf __mingw_vswprintf +#else # define __vsnprintf __mingw_vsnwprintf +#endif + #else # define __pformat __mingw_pformat #define __fputc(X,STR) fputc((X), (STR)) diff --git a/lib/libc/mingw/stdio/mingw_sformat.c b/lib/libc/mingw/stdio/mingw_sformat.c new file mode 100644 index 000000000000..040c2ae8874d --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_sformat.c @@ -0,0 +1,1602 @@ +/* + This Software is provided under the Zope Public License (ZPL) Version 2.1. + + Copyright (c) 2011 by the mingw-w64 project + + See the AUTHORS file for the list of contributors to the mingw-w64 project. + + This license has been certified as open source. It has also been designated + as GPL compatible by the Free Software Foundation (FSF). + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions in source code must retain the accompanying copyright + notice, this list of conditions, and the following disclaimer. + 2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + 3. Names of the copyright holders must not be used to endorse or promote + products derived from this software without prior written permission + from the copyright holders. + 4. The right to distribute this software or to use it for any purpose does + not give you the right to use Servicemarks (sm) or Trademarks (tm) of + the copyright holders. Use of them is covered by separate agreement + with the copyright holders. + 5. If any files are modified, you must cause the modified files to carry + prominent notices stating that you changed the files and the date of + any change. + + Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#define __LARGE_MBSTATE_T + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mingw_sformat.h" + +/* Helper flags for conversion. */ +#define IS_C 0x0001 +#define IS_S 0x0002 +#define IS_L 0x0004 +#define IS_LL 0x0008 +#define IS_SIGNED_NUM 0x0010 +#define IS_POINTER 0x0020 +#define IS_HEX_FLOAT 0x0040 +#define IS_SUPPRESSED 0x0080 +#define USE_GROUP 0x0100 +#define USE_GNU_ALLOC 0x0200 +#define USE_POSIX_ALLOC 0x0400 + +#define IS_ALLOC_USED (USE_GNU_ALLOC | USE_POSIX_ALLOC) + +static void * +get_va_nth (va_list argp, unsigned int n) +{ + va_list ap; + if (!n) abort (); + va_copy (ap, argp); + while (--n > 0) + (void) va_arg(ap, void *); + return va_arg (ap, void *); +} + +static void +optimize_alloc (char **p, char *end, size_t alloc_sz) +{ + size_t need_sz; + char *h; + + if (!p || !*p) + return; + + need_sz = end - *p; + if (need_sz == alloc_sz) + return; + + if ((h = (char *) realloc (*p, need_sz)) != NULL) + *p = h; +} + +static void +back_ch (int c, _IFP *s, size_t *rin, int not_eof) +{ + if (!not_eof && c == EOF) + return; + if (s->is_string == 0) + { + FILE *fp = s->fp; + ungetc (c, fp); + rin[0] -= 1; + return; + } + rin[0] -= 1; + s->bch[s->back_top] = c; + s->back_top += 1; +} + +static int +in_ch (_IFP *s, size_t *rin) +{ + int r; + if (s->back_top) + { + s->back_top -= 1; + r = s->bch[s->back_top]; + rin[0] += 1; + } + else if (s->seen_eof) + { + return EOF; + } + else if (s->is_string) + { + const char *ps = s->str; + r = ((int) *ps) & 0xff; + ps++; + if (r != 0) + { + rin[0] += 1; + s->str = ps; + return r; + } + s->seen_eof = 1; + return EOF; + } + else + { + FILE *fp = (FILE *) s->fp; + r = getc (fp); + if (r != EOF) + rin[0] += 1; + else s->seen_eof = 1; + } + return r; +} + +static int +match_string (_IFP *s, size_t *rin, int *c, const char *str) +{ + int ch = *c; + + if (*str == 0) + return 1; + + if (*str != (char) tolower (ch)) + return 0; + ++str; + while (*str != 0) + { + if ((ch = in_ch (s, rin)) == EOF) + { + c[0] = ch; + return 0; + } + + if (*str != (char) tolower (ch)) + { + c[0] = ch; + return 0; + } + ++str; + } + c[0] = ch; + return 1; +} + +struct gcollect +{ + size_t count; + struct gcollect *next; + char **ptrs[32]; +}; + +static void +release_ptrs (struct gcollect **pt, char **wbuf) +{ + struct gcollect *pf; + size_t cnt; + + if (wbuf) + { + free (*wbuf); + *wbuf = NULL; + } + if (!pt || (pf = *pt) == NULL) + return; + while (pf != NULL) + { + struct gcollect *pf_sv = pf; + for (cnt = 0; cnt < pf->count; ++cnt) + { + free (*pf->ptrs[cnt]); + *pf->ptrs[cnt] = NULL; + } + pf = pf->next; + free (pf_sv); + } + *pt = NULL; +} + +static int +cleanup_return (int rval, struct gcollect **pfree, char **strp, char **wbuf) +{ + if (rval == EOF) + release_ptrs (pfree, wbuf); + else + { + if (pfree) + { + struct gcollect *pf = *pfree, *pf_sv; + while (pf != NULL) + { + pf_sv = pf; + pf = pf->next; + free (pf_sv); + } + *pfree = NULL; + } + if (strp != NULL) + { + free (*strp); + *strp = NULL; + } + if (wbuf) + { + free (*wbuf); + *wbuf = NULL; + } + } + return rval; +} + +static struct gcollect * +resize_gcollect (struct gcollect *pf) +{ + struct gcollect *np; + if (pf && pf->count < 32) + return pf; + np = malloc (sizeof (struct gcollect)); + np->count = 0; + np->next = pf; + return np; +} + +static char * +resize_wbuf (size_t wpsz, size_t *wbuf_max_sz, char *old) +{ + char *wbuf; + size_t nsz; + if (*wbuf_max_sz != wpsz) + return old; + nsz = (256 > (2 * wbuf_max_sz[0]) ? 256 : (2 * wbuf_max_sz[0])); + if (!old) + wbuf = (char *) malloc (nsz); + else + wbuf = (char *) realloc (old, nsz); + if (!wbuf) + { + if (old) + free (old); + } + else + *wbuf_max_sz = nsz; + return wbuf; +} + +int +__cdecl +__mingw_sformat (_IFP *s, const char *format, va_list argp) +{ + const char *f = format; + struct gcollect *gcollect = NULL; + size_t read_in = 0, wbuf_max_sz = 0, cnt; + ssize_t str_sz = 0; + char *str = NULL, **pstr = NULL, *wbuf = NULL; + wchar_t *wstr = NULL; + int rval = 0, c = 0, ignore_ws = 0; + va_list arg; + unsigned char fc; + unsigned int npos; + int width, flags, base = 0, errno_sv; + size_t wbuf_cur_sz, read_in_sv, new_sz, n; + char seen_dot, seen_exp, is_neg, not_in; + char *tmp_wbuf_ptr, buf[MB_LEN_MAX]; + const char *lc_decimal_point, *lc_thousands_sep; + mbstate_t state, cstate; + union { + unsigned long long ull; + unsigned long ul; + long long ll; + long l; + } cv_val; + + arg = argp; + + if (!s || s->fp == NULL || !format) + { + errno = EINVAL; + return EOF; + } + + memset (&state, 0, sizeof (state)); + + lc_decimal_point = localeconv()->decimal_point; + lc_thousands_sep = localeconv()->thousands_sep; + if (lc_thousands_sep != NULL && *lc_thousands_sep == 0) + lc_thousands_sep = NULL; + + while (*f != 0) + { + if (!isascii ((unsigned char) *f)) + { + int len; + + if ((len = mbrlen (f, strlen (f), &state)) > 0) + { + do + { + if ((c = in_ch (s, &read_in)) == EOF || c != (unsigned char) *f++) + { + back_ch (c, s, &read_in, 1); + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + } + } + while (--len > 0); + + continue; + } + } + + fc = *f++; + if (fc != '%') + { + if (isspace (fc)) + ignore_ws = 1; + else + { + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + if (ignore_ws) + { + ignore_ws = 0; + if (isspace (c)) + { + do + { + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + } + while (isspace (c)); + } + } + + if (c != fc) + { + back_ch (c, s, &read_in, 0); + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + continue; + } + + width = flags = 0; + npos = 0; + wbuf_cur_sz = 0; + + if (isdigit ((unsigned char) *f)) + { + const char *svf = f; + npos = (unsigned char) *f++ - '0'; + while (isdigit ((unsigned char) *f)) + npos = npos * 10 + ((unsigned char) *f++ - '0'); + if (*f != '$') + { + npos = 0; + f = svf; + } + else + f++; + } + + do + { + if (*f == '*') + flags |= IS_SUPPRESSED; + else if (*f == '\'') + { + if (lc_thousands_sep) + flags |= USE_GROUP; + } + else if (*f == 'I') + { + /* we don't support locale's digits (i18N), but ignore it for now silently. */ + ; +#ifdef _WIN32 + if (f[1] == '6' && f[2] == '4') + { + flags |= IS_LL | IS_L; + f += 2; + } + else if (f[1] == '3' && f[2] == '2') + { + flags |= IS_L; + f += 2; + } + else + { +#ifdef _WIN64 + flags |= IS_LL | IS_L; +#else + flags |= IS_L; +#endif + } +#endif + } + else + break; + ++f; + } + while (1); + + while (isdigit ((unsigned char) *f)) + width = width * 10 + ((unsigned char) *f++ - '0'); + + if (!width) + width = -1; + + switch (*f) + { + case 'h': + ++f; + flags |= (*f == 'h' ? IS_C : IS_S); + if (*f == 'h') + ++f; + break; + case 'l': + ++f; + flags |= (*f == 'l' ? IS_LL : 0) | IS_L; + if (*f == 'l') + ++f; + break; + case 'q': case 'L': + ++f; + flags |= IS_LL | IS_L; + break; + case 'a': + if (f[1] != 's' && f[1] != 'S' && f[1] != '[') + break; + ++f; + flags |= USE_GNU_ALLOC; + break; + case 'm': + flags |= USE_POSIX_ALLOC; + ++f; + if (*f == 'l') + { + flags |= IS_L; + f++; + } + break; + case 'z': +#ifdef _WIN64 + flags |= IS_LL | IS_L; +#else + flags |= IS_L; +#endif + ++f; + break; + case 'j': + if (sizeof (uintmax_t) > sizeof (unsigned long)) + flags |= IS_LL; + else if (sizeof (uintmax_t) > sizeof (unsigned int)) + flags |= IS_L; + ++f; + break; + case 't': +#ifdef _WIN64 + flags |= IS_LL; +#else + flags |= IS_L; +#endif + ++f; + break; + case 0: + return cleanup_return (rval, &gcollect, pstr, &wbuf); + default: + break; + } + + if (*f == 0) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + fc = *f++; + if (ignore_ws || (fc != '[' && fc != 'c' && fc != 'C' && fc != 'n')) + { + errno_sv = errno; + errno = 0; + do + { + if ((c == EOF || (c = in_ch (s, &read_in)) == EOF) + && errno == EINTR) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + } + while (isspace (c)); + + ignore_ws = 0; + errno = errno_sv; + back_ch (c, s, &read_in, 0); + } + + switch (fc) + { + case 'c': + if ((flags & IS_L) != 0) + fc = 'C'; + break; + case 's': + if ((flags & IS_L) != 0) + fc = 'S'; + break; + } + + switch (fc) + { + case '%': + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + if (c != fc) + { + back_ch (c, s, &read_in, 1); + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + break; + + case 'n': + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_LL) != 0) + *(npos != 0 ? (long long *) get_va_nth (argp, npos) : va_arg (arg, long long *)) = read_in; + else if ((flags & IS_L) != 0) + *(npos != 0 ? (long *) get_va_nth (argp, npos) : va_arg (arg, long *)) = read_in; + else if ((flags & IS_S) != 0) + *(npos != 0 ? (short *) get_va_nth (argp, npos) : va_arg (arg, short *)) = read_in; + else if ((flags & IS_C) != 0) + *(npos != 0 ? (char *) get_va_nth (argp, npos) : va_arg (arg, char *)) = read_in; + else + *(npos != 0 ? (int *) get_va_nth (argp, npos) : va_arg (arg, int *)) = read_in; + } + break; + + case 'c': + if (width == -1) + width = 1; + + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + str_sz = (width > 1024 ? 1024 : width); + if ((str = *pstr = (char *) malloc (str_sz)) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + str = (char *) get_va_nth (argp, npos); + else + str = va_arg (arg, char *); + if (!str) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + if ((flags & IS_SUPPRESSED) == 0) + { + do + { + if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) + { + new_sz = str_sz + (str_sz >= width ? width - 1 : str_sz); + while ((str = (char *) realloc (*pstr, new_sz)) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!str) + { + release_ptrs (&gcollect, &wbuf); + return EOF; + } + *pstr = str; + str += str_sz; + str_sz = new_sz; + } + *str++ = c; + } + while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); + } + else + while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); + + if ((flags & IS_SUPPRESSED) == 0) + { + optimize_alloc (pstr, str, str_sz); + pstr = NULL; + ++rval; + } + + break; + + case 'C': + if (width == -1) + width = 1; + + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + str_sz = (width > 1024 ? 1024 : width); + *pstr = (char *) malloc (str_sz * sizeof (wchar_t)); + if ((wstr = (wchar_t *) *pstr) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + wstr = (wchar_t *) get_va_nth (argp, npos); + else + wstr = va_arg (arg, wchar_t *); + if (!wstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + memset (&cstate, 0, sizeof (cstate)); + + do + { + buf[0] = c; + + if ((flags & IS_SUPPRESSED) == 0 && (flags & IS_ALLOC_USED) != 0 + && wstr == ((wchar_t *) *pstr + str_sz)) + { + new_sz = str_sz + (str_sz > width ? width - 1 : str_sz); + + while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!wstr) + { + release_ptrs (&gcollect, &wbuf); + return EOF; + } + *pstr = (char *) wstr; + wstr += str_sz; + str_sz = new_sz; + } + + while (1) + { + n = mbrtowc ((flags & IS_SUPPRESSED) == 0 ? wstr : NULL, buf, 1, &cstate); + + if (n == (size_t) -2) + { + if ((c = in_ch (s, &read_in)) == EOF) + { + errno = EILSEQ; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + + buf[0] = c; + continue; + } + + if (n != 1) + { + errno = EILSEQ; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + break; + } + + ++wstr; + } + while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); + + if ((flags & IS_SUPPRESSED) == 0) + { + optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); + pstr = NULL; + ++rval; + } + break; + + case 's': + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + str_sz = 100; + if ((str = *pstr = (char *) malloc (100)) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + str = (char *) get_va_nth (argp, npos); + else + str = va_arg (arg, char *); + if (!str) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + do + { + if (isspace (c)) + { + back_ch (c, s, &read_in, 1); + break; + } + + if ((flags & IS_SUPPRESSED) == 0) + { + *str++ = c; + if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) + { + new_sz = str_sz * 2; + + while ((str = (char *) realloc (*pstr, new_sz)) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!str) + { + if ((flags & USE_POSIX_ALLOC) == 0) + { + (*pstr)[str_sz - 1] = 0; + pstr = NULL; + ++rval; + } + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + } + *pstr = str; + str += str_sz; + str_sz = new_sz; + } + } + } + while ((width <= 0 || --width > 0) && (c = in_ch (s, &read_in)) != EOF); + + if ((flags & IS_SUPPRESSED) == 0) + { + *str++ = 0; + optimize_alloc (pstr, str, str_sz); + pstr = NULL; + ++rval; + } + break; + + case 'S': + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + str_sz = 100; + *pstr = (char *) malloc (100 * sizeof (wchar_t)); + if ((wstr = (wchar_t *) *pstr) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + wstr = (wchar_t *) get_va_nth (argp, npos); + else + wstr = va_arg (arg, wchar_t *); + if (!wstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + memset (&cstate, 0, sizeof (cstate)); + + do + { + if (isspace (c)) + { + back_ch (c, s, &read_in, 1); + break; + } + + buf[0] = c; + + while (1) + { + n = mbrtowc ((flags & IS_SUPPRESSED) == 0 ? wstr : NULL, buf, 1, &cstate); + + if (n == (size_t) -2) + { + if ((c = in_ch (s, &read_in)) == EOF) + { + errno = EILSEQ; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + + buf[0] = c; + continue; + } + + if (n != 1) + { + errno = EILSEQ; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + + ++wstr; + break; + } + + if ((flags & IS_SUPPRESSED) == 0 && (flags & IS_ALLOC_USED) != 0 + && wstr == ((wchar_t *) *pstr + str_sz)) + { + new_sz = str_sz * 2; + while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!wstr) + { + if ((flags & USE_POSIX_ALLOC) == 0) + { + ((wchar_t *) (*pstr))[str_sz - 1] = 0; + pstr = NULL; + ++rval; + } + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + } + *pstr = (char *) wstr; + wstr += str_sz; + str_sz = new_sz; + } + } + while ((width <= 0 || --width > 0) && (c = in_ch (s, &read_in)) != EOF); + + if ((flags & IS_SUPPRESSED) == 0) + { + *wstr++ = 0; + optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); + pstr = NULL; + ++rval; + } + break; + + case 'd': case 'i': + case 'o': case 'p': + case 'u': + case 'x': case 'X': + switch (fc) + { + case 'd': + flags |= IS_SIGNED_NUM; + base = 10; + break; + case 'i': + flags |= IS_SIGNED_NUM; + base = 0; + break; + case 'o': + base = 8; + break; + case 'p': + base = 16; + flags &= ~(IS_S | IS_LL | IS_L); + #ifdef _WIN64 + flags |= IS_LL; + #endif + flags |= IS_L | IS_POINTER; + break; + case 'u': + base = 10; + break; + case 'x': case 'X': + base = 16; + break; + } + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + if (c == '+' || c == '-') + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + if (width > 0) + --width; + c = in_ch (s, &read_in); + } + if (width != 0 && c == '0') + { + if (width > 0) + --width; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + c = in_ch (s, &read_in); + + if (width != 0 && tolower (c) == 'x') + { + if (!base) + base = 16; + if (base == 16) + { + if (width > 0) + --width; + c = in_ch (s, &read_in); + } + } + else if (!base) + base = 8; + } + + if (!base) + base = 10; + + while (c != EOF && width != 0) + { + if (base == 16) + { + if (!isxdigit (c)) + break; + } + else if (!isdigit (c) || (int) (c - '0') >= base) + { + const char *p = lc_thousands_sep; + int remain; + + if (base != 10 || (flags & USE_GROUP) == 0) + break; + remain = width > 0 ? width : INT_MAX; + while ((unsigned char) *p == c && remain >= 0) + { + /* As our conversion routines aren't supporting thousands + separators, we are filtering them here. */ + + ++p; + if (*p == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) + break; + --remain; + } + + if (*p != 0) + { + if (p > lc_thousands_sep) + { + back_ch (c, s, &read_in, 0); + while (--p > lc_thousands_sep) + back_ch ((unsigned char) *p, s, &read_in, 1); + c = (unsigned char) *p; + } + break; + } + + if (width > 0) + width = remain; + --wbuf_cur_sz; + } + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + if (width > 0) + --width; + + c = in_ch (s, &read_in); + } + + if (!wbuf_cur_sz || (wbuf_cur_sz == 1 && (wbuf[0] == '+' || wbuf[0] == '-'))) + { + if (!wbuf_cur_sz && (flags & IS_POINTER) != 0 + && match_string (s, &read_in, &c, "(nil)")) + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = '0'; + } + else + { + back_ch (c, s, &read_in, 0); + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + else + back_ch (c, s, &read_in, 0); + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = 0; + + if ((flags & IS_LL)) + { + if (flags & IS_SIGNED_NUM) + cv_val.ll = strtoll (wbuf, &tmp_wbuf_ptr, base/*, flags & USE_GROUP*/); + else + cv_val.ull = strtoull (wbuf, &tmp_wbuf_ptr, base); + } + else + { + if (flags & IS_SIGNED_NUM) + cv_val.l = strtol (wbuf, &tmp_wbuf_ptr, base/*, flags & USE_GROUP*/); + else + cv_val.ul = strtoul (wbuf, &tmp_wbuf_ptr, base); + } + if (wbuf == tmp_wbuf_ptr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_SIGNED_NUM) != 0) + { + if ((flags & IS_LL) != 0) + *(npos != 0 ? (long long *) get_va_nth (argp, npos) : va_arg (arg, long long *)) = cv_val.ll; + else if ((flags & IS_L) != 0) + *(npos != 0 ? (long *) get_va_nth (argp, npos) : va_arg (arg, long *)) = cv_val.l; + else if ((flags & IS_S) != 0) + *(npos != 0 ? (short *) get_va_nth (argp, npos) : va_arg (arg, short *)) = (short) cv_val.l; + else if ((flags & IS_C) != 0) + *(npos != 0 ? (signed char *) get_va_nth (argp, npos) : va_arg (arg, signed char *)) = (signed char) cv_val.ul; + else + *(npos != 0 ? (int *) get_va_nth (argp, npos) : va_arg (arg, int *)) = (int) cv_val.l; + } + else + { + if ((flags & IS_LL) != 0) + *(npos != 0 ? (unsigned long long *) get_va_nth (argp, npos) : va_arg (arg, unsigned long long *)) = cv_val.ull; + else if ((flags & IS_L) != 0) + *(npos != 0 ? (unsigned long *) get_va_nth (argp, npos) : va_arg (arg, unsigned long *)) = cv_val.ul; + else if ((flags & IS_S) != 0) + *(npos != 0 ? (unsigned short *) get_va_nth (argp, npos) : va_arg (arg, unsigned short *)) + = (unsigned short) cv_val.ul; + else if ((flags & IS_C) != 0) + *(npos != 0 ? (unsigned char *) get_va_nth (argp, npos) : va_arg (arg, unsigned char *)) = (unsigned char) cv_val.ul; + else + *(npos != 0 ? (unsigned int *) get_va_nth (argp, npos) : va_arg (arg, unsigned int *)) = (unsigned int) cv_val.ul; + } + ++rval; + } + break; + + case 'e': case 'E': + case 'f': case 'F': + case 'g': case 'G': + case 'a': case 'A': + if (width > 0) + --width; + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + seen_dot = seen_exp = 0; + is_neg = (c == '-' ? 1 : 0); + + if (c == '-' || c == '+') + { + if (width == 0 || (c = in_ch (s, &read_in)) == EOF) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + if (width > 0) + --width; + } + + if (tolower (c) == 'n') + { + const char *match_txt = "nan"; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + + ++match_txt; + do + { + if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + if (width > 0) + --width; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + ++match_txt; + } + while (*match_txt != 0); + } + else if (tolower (c) == 'i') + { + const char *match_txt = "inf"; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + + ++match_txt; + do + { + if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + if (width > 0) + --width; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + ++match_txt; + } + while (*match_txt != 0); + + if (width != 0 && (c = in_ch (s, &read_in)) != EOF && tolower (c) == 'i') + { + match_txt = "inity"; + + if (width > 0) + --width; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + ++match_txt; + + do + { + if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + if (width > 0) + --width; + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + ++match_txt; + } + while (*match_txt != 0); + } + else if (width != 0 && c != EOF) + back_ch (c, s, &read_in, 0); + } + else + { + not_in = 'e'; + if (width != 0 && c == '0') + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + + c = in_ch (s, &read_in); + if (width > 0) + --width; + if (width != 0 && tolower (c) == 'x') + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + + flags |= IS_HEX_FLOAT; + not_in = 'p'; + + flags &= ~USE_GROUP; + c = in_ch (s, &read_in); + if (width > 0) + --width; + } + } + + while (1) + { + if (isdigit (c) || (!seen_exp && (flags & IS_HEX_FLOAT) != 0 && isxdigit (c)) + || (seen_exp && wbuf[wbuf_cur_sz - 1] == not_in && (c == '-' || c == '+'))) + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = c; + } + else if (wbuf_cur_sz > 0 && !seen_exp && (char) tolower (c) == not_in) + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = not_in; + seen_exp = seen_dot = 1; + } + else + { + const char *p = lc_decimal_point; + int remain = width > 0 ? width : INT_MAX; + + if (! seen_dot) + { + while ((unsigned char) *p == c && remain >= 0) + { + ++p; + if (*p == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) + break; + --remain; + } + } + + if (*p == 0) + { + for (p = lc_decimal_point; *p != 0; ++p) + { + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = (unsigned char) *p; + } + if (width > 0) + width = remain; + seen_dot = 1; + } + else + { + const char *pp = lc_thousands_sep; + + if (!seen_dot && (flags & USE_GROUP) != 0) + { + while ((pp - lc_thousands_sep) < (p - lc_decimal_point) + && *pp == lc_decimal_point[(pp - lc_thousands_sep)]) + ++pp; + if ((pp - lc_thousands_sep) == (p - lc_decimal_point)) + { + while ((unsigned char) *pp == c && remain >= 0) + { + ++pp; + if (*pp == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) + break; + --remain; + } + } + } + + if (pp != NULL && *pp == 0) + { + /* As our conversion routines aren't supporting thousands + separators, we are filtering them here. */ + if (width > 0) + width = remain; + } + else + { + back_ch (c, s, &read_in, 0); + break; + } + } + } + + if (width == 0 || (c = in_ch (s, &read_in)) == EOF) + break; + + if (width > 0) + --width; + } + + if (!wbuf_cur_sz || ((flags & IS_HEX_FLOAT) != 0 && wbuf_cur_sz == 2)) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + + wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); + wbuf[wbuf_cur_sz++] = 0; + + if ((flags & IS_LL) != 0) + { + long double ld; + ld = __mingw_strtold (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); + if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) + *(npos != 0 ? (long double *) get_va_nth (argp, npos) : va_arg (arg, long double *)) = is_neg ? -ld : ld; + } + else if ((flags & IS_L) != 0) + { + double d; + d = (double) __mingw_strtold (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); + if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) + *(npos != 0 ? (double *) get_va_nth (argp, npos) : va_arg (arg, double *)) = is_neg ? -d : d; + } + else + { + float d = __mingw_strtof (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); + if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) + *(npos != 0 ? (float *) get_va_nth (argp, npos) : va_arg (arg, float *)) = is_neg ? -d : d; + } + + if (wbuf == tmp_wbuf_ptr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + if ((flags & IS_SUPPRESSED) == 0) + ++rval; + break; + + case '[': + if ((flags & IS_L) != 0) + { + if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + str_sz = 100; + *pstr = (char *) malloc (100 * sizeof (wchar_t)); + + if ((wstr = (wchar_t *) *pstr) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + wstr = (wchar_t *) get_va_nth (argp, npos); + else + wstr = va_arg (arg, wchar_t *); + if (!wstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + } + else if ((flags & IS_SUPPRESSED) == 0) + { + if ((flags & IS_ALLOC_USED) != 0) + { + if (npos != 0) + pstr = (char **) get_va_nth (argp, npos); + else + pstr = va_arg (arg, char **); + + if (!pstr) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + str_sz = 100; + if ((str = *pstr = (char *) malloc (100)) == NULL) + return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); + + gcollect = resize_gcollect (gcollect); + gcollect->ptrs[gcollect->count++] = pstr; + } + else + { + if (npos != 0) + str = (char *) get_va_nth (argp, npos); + else + str = va_arg (arg, char *); + if (!str) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + not_in = (*f == '^' ? 1 : 0); + if (*f == '^') + f++; + + if (width < 0) + width = INT_MAX; + + if (wbuf_max_sz < 256) + { + wbuf_max_sz = 256; + if (wbuf) + free (wbuf); + wbuf = (char *) malloc (wbuf_max_sz); + } + memset (wbuf, 0, 256); + + fc = *f; + if (fc == ']' || fc == '-') + { + wbuf[fc] = 1; + ++f; + } + + while ((fc = *f++) != 0 && fc != ']') + { + if (fc == '-' && *f != 0 && *f != ']' && (unsigned char) f[-2] <= (unsigned char) *f) + { + for (fc = (unsigned char) f[-2]; fc < (unsigned char) *f; ++fc) + wbuf[fc] = 1; + } + else + wbuf[fc] = 1; + } + + if (!fc) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + if ((flags & IS_L) != 0) + { + read_in_sv = read_in; + cnt = 0; + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + memset (&cstate, 0, sizeof (cstate)); + + do + { + if (wbuf[c] == not_in) + { + back_ch (c, s, &read_in, 1); + break; + } + + if ((flags & IS_SUPPRESSED) == 0) + { + buf[0] = c; + n = mbrtowc (wstr, buf, 1, &cstate); + + if (n == (size_t) -2) + { + ++cnt; + continue; + } + cnt = 0; + + ++wstr; + if ((flags & IS_ALLOC_USED) != 0 && wstr == ((wchar_t *) *pstr + str_sz)) + { + new_sz = str_sz * 2; + while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!wstr) + { + if ((flags & USE_POSIX_ALLOC) == 0) + { + ((wchar_t *) (*pstr))[str_sz - 1] = 0; + pstr = NULL; + ++rval; + } + else + rval = EOF; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + *pstr = (char *) wstr; + wstr += str_sz; + str_sz = new_sz; + } + } + + if (--width <= 0) + break; + } + while ((c = in_ch (s, &read_in)) != EOF); + + if (cnt != 0) + { + errno = EILSEQ; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + + if (read_in_sv == read_in) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + + if ((flags & IS_SUPPRESSED) == 0) + { + *wstr++ = 0; + optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); + pstr = NULL; + ++rval; + } + } + else + { + read_in_sv = read_in; + + if ((c = in_ch (s, &read_in)) == EOF) + return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); + + do + { + if (wbuf[c] == not_in) + { + back_ch (c, s, &read_in, 1); + break; + } + + if ((flags & IS_SUPPRESSED) == 0) + { + *str++ = c; + if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) + { + new_sz = str_sz * 2; + + while ((str = (char *) realloc (*pstr, new_sz)) == NULL + && new_sz > (size_t) (str_sz + 1)) + new_sz = str_sz + 1; + if (!str) + { + if ((flags & USE_POSIX_ALLOC) == 0) + { + (*pstr)[str_sz - 1] = 0; + pstr = NULL; + ++rval; + } + else + rval = EOF; + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + *pstr = str; + str += str_sz; + str_sz = new_sz; + } + } + } + while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); + + if (read_in_sv == read_in) + return cleanup_return (rval, &gcollect, pstr, &wbuf); + + if ((flags & IS_SUPPRESSED) == 0) + { + *str++ = 0; + optimize_alloc (pstr, str, str_sz); + pstr = NULL; + ++rval; + } + } + break; + + default: + return cleanup_return (rval, &gcollect, pstr, &wbuf); + } + } + + if (ignore_ws) + { + while (isspace ((c = in_ch (s, &read_in)))); + back_ch (c, s, &read_in, 0); + } + + return cleanup_return (rval, &gcollect, pstr, &wbuf); +} diff --git a/lib/libc/mingw/stdio/mingw_sformat.h b/lib/libc/mingw/stdio/mingw_sformat.h new file mode 100644 index 000000000000..7d133dd7f29b --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_sformat.h @@ -0,0 +1,63 @@ +/* + This Software is provided under the Zope Public License (ZPL) Version 2.1. + + Copyright (c) 2011 by the mingw-w64 project + + See the AUTHORS file for the list of contributors to the mingw-w64 project. + + This license has been certified as open source. It has also been designated + as GPL compatible by the Free Software Foundation (FSF). + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions in source code must retain the accompanying copyright + notice, this list of conditions, and the following disclaimer. + 2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + 3. Names of the copyright holders must not be used to endorse or promote + products derived from this software without prior written permission + from the copyright holders. + 4. The right to distribute this software or to use it for any purpose does + not give you the right to use Servicemarks (sm) or Trademarks (tm) of + the copyright holders. Use of them is covered by separate agreement + with the copyright holders. + 5. If any files are modified, you must cause the modified files to carry + prominent notices stating that you changed the files and the date of + any change. + + Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SFORMAT_H +#define SFORMAT_H + +/* internal stream structure with back-buffer. */ +typedef struct _IFP +{ + __extension__ union { + void *fp; + const char *str; + }; + int bch[1024]; + unsigned int is_string : 1; + int back_top; + unsigned int seen_eof : 1; +} _IFP; + +int __cdecl __mingw_sformat(_IFP *, const char *, va_list) __MINGW_NOTHROW; + +#endif /* !defined SFORMAT_H */ diff --git a/lib/libc/mingw/stdio/mingw_snprintfw.c b/lib/libc/mingw/stdio/mingw_snwprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_snprintfw.c rename to lib/libc/mingw/stdio/mingw_snwprintf.c diff --git a/lib/libc/mingw/stdio/mingw_wvfscanf.c b/lib/libc/mingw/stdio/mingw_swformat.c similarity index 97% rename from lib/libc/mingw/stdio/mingw_wvfscanf.c rename to lib/libc/mingw/stdio/mingw_swformat.c index 81cb46b661e9..5f4b2c08f395 100644 --- a/lib/libc/mingw/stdio/mingw_wvfscanf.c +++ b/lib/libc/mingw/stdio/mingw_swformat.c @@ -57,6 +57,8 @@ #include #include +#include "mingw_swformat.h" + #ifndef CP_UTF8 #define CP_UTF8 65001 #endif @@ -80,19 +82,6 @@ #define IS_ALLOC_USED (USE_GNU_ALLOC | USE_POSIX_ALLOC) -/* internal stream structure with back-buffer. */ -typedef struct _IFP -{ - __extension__ union { - void *fp; - const wchar_t *str; - }; - int bch[1024]; - unsigned int is_string : 1; - int back_top; - unsigned int seen_eof : 1; -} _IFP; - static void * get_va_nth (va_list argp, unsigned int n) { @@ -123,7 +112,7 @@ optimize_alloc (char **p, char *end, size_t alloc_sz) } static void -back_ch (int c, _IFP *s, size_t *rin, int not_eof) +back_ch (int c, _IFPW *s, size_t *rin, int not_eof) { if (!not_eof && c == WEOF) return; @@ -140,7 +129,7 @@ back_ch (int c, _IFP *s, size_t *rin, int not_eof) } static int -in_ch (_IFP *s, size_t *rin) +in_ch (_IFPW *s, size_t *rin) { int r; if (s->back_top) @@ -179,7 +168,7 @@ in_ch (_IFP *s, size_t *rin) } static int -match_string (_IFP *s, size_t *rin, wint_t *c, const wchar_t *str) +match_string (_IFPW *s, size_t *rin, wint_t *c, const wchar_t *str) { int ch = *c; @@ -308,8 +297,9 @@ resize_wbuf (size_t wpsz, size_t *wbuf_max_sz, wchar_t *old) return wbuf; } -static int -__mingw_swformat (_IFP *s, const wchar_t *format, va_list argp) +int +__cdecl +__mingw_swformat (_IFPW *s, const wchar_t *format, va_list argp) { const wchar_t *f = format; struct gcollect *gcollect = NULL; @@ -1609,23 +1599,3 @@ __mingw_swformat (_IFP *s, const wchar_t *format, va_list argp) return cleanup_return (rval, &gcollect, pstr, &wbuf); } - -int -__mingw_vfwscanf (FILE *s, const wchar_t *format, va_list argp) -{ - _IFP ifp; - memset (&ifp, 0, sizeof (_IFP)); - ifp.fp = s; - return __mingw_swformat (&ifp, format, argp); -} - -int -__mingw_vswscanf (const wchar_t *s, const wchar_t *format, va_list argp) -{ - _IFP ifp; - memset (&ifp, 0, sizeof (_IFP)); - ifp.str = s; - ifp.is_string = 1; - return __mingw_swformat (&ifp, format, argp); -} - diff --git a/lib/libc/mingw/stdio/mingw_swformat.h b/lib/libc/mingw/stdio/mingw_swformat.h new file mode 100644 index 000000000000..aea4c53fb6b0 --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_swformat.h @@ -0,0 +1,63 @@ +/* + This Software is provided under the Zope Public License (ZPL) Version 2.1. + + Copyright (c) 2011 by the mingw-w64 project + + See the AUTHORS file for the list of contributors to the mingw-w64 project. + + This license has been certified as open source. It has also been designated + as GPL compatible by the Free Software Foundation (FSF). + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions in source code must retain the accompanying copyright + notice, this list of conditions, and the following disclaimer. + 2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + 3. Names of the copyright holders must not be used to endorse or promote + products derived from this software without prior written permission + from the copyright holders. + 4. The right to distribute this software or to use it for any purpose does + not give you the right to use Servicemarks (sm) or Trademarks (tm) of + the copyright holders. Use of them is covered by separate agreement + with the copyright holders. + 5. If any files are modified, you must cause the modified files to carry + prominent notices stating that you changed the files and the date of + any change. + + Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SWFORMAT_H +#define SWFORMAT_H + +/* internal stream structure with back-buffer. */ +typedef struct _IFPW +{ + __extension__ union { + void *fp; + const wchar_t *str; + }; + int bch[1024]; + unsigned int is_string : 1; + int back_top; + unsigned int seen_eof : 1; +} _IFPW; + +int __cdecl __mingw_swformat(_IFPW *, const wchar_t *, va_list) __MINGW_NOTHROW; + +#endif /* !defined SWFORMAT_H */ diff --git a/lib/libc/mingw/stdio/mingw_sprintfw.c b/lib/libc/mingw/stdio/mingw_swprintf.c similarity index 78% rename from lib/libc/mingw/stdio/mingw_sprintfw.c rename to lib/libc/mingw/stdio/mingw_swprintf.c index 0baf1e4f387d..179c27970e6b 100644 --- a/lib/libc/mingw/stdio/mingw_sprintfw.c +++ b/lib/libc/mingw/stdio/mingw_swprintf.c @@ -4,7 +4,7 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ #define __BUILD_WIDEAPI 1 -#define _CRT_NON_CONFORMING_SWPRINTFS 1 +#define __BUILD_WIDEAPI_ISO 1 -#include "mingw_sprintf.c" +#include "mingw_snprintf.c" diff --git a/lib/libc/mingw/stdio/mingw_vfscanf.c b/lib/libc/mingw/stdio/mingw_vfscanf.c index 8ca81b54e117..eadc9be321bc 100644 --- a/lib/libc/mingw/stdio/mingw_vfscanf.c +++ b/lib/libc/mingw/stdio/mingw_vfscanf.c @@ -1,1615 +1,8 @@ -/* - This Software is provided under the Zope Public License (ZPL) Version 2.1. - - Copyright (c) 2011 by the mingw-w64 project - - See the AUTHORS file for the list of contributors to the mingw-w64 project. - - This license has been certified as open source. It has also been designated - as GPL compatible by the Free Software Foundation (FSF). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions in source code must retain the accompanying copyright - notice, this list of conditions, and the following disclaimer. - 2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - 3. Names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission - from the copyright holders. - 4. The right to distribute this software or to use it for any purpose does - not give you the right to use Servicemarks (sm) or Trademarks (tm) of - the copyright holders. Use of them is covered by separate agreement - with the copyright holders. - 5. If any files are modified, you must cause the modified files to carry - prominent notices stating that you changed the files and the date of - any change. - - Disclaimer - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#define __LARGE_MBSTATE_T - -#include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include - -/* Helper flags for conversion. */ -#define IS_C 0x0001 -#define IS_S 0x0002 -#define IS_L 0x0004 -#define IS_LL 0x0008 -#define IS_SIGNED_NUM 0x0010 -#define IS_POINTER 0x0020 -#define IS_HEX_FLOAT 0x0040 -#define IS_SUPPRESSED 0x0080 -#define USE_GROUP 0x0100 -#define USE_GNU_ALLOC 0x0200 -#define USE_POSIX_ALLOC 0x0400 - -#define IS_ALLOC_USED (USE_GNU_ALLOC | USE_POSIX_ALLOC) - -/* internal stream structure with back-buffer. */ -typedef struct _IFP -{ - __extension__ union { - void *fp; - const char *str; - }; - int bch[1024]; - unsigned int is_string : 1; - int back_top; - unsigned int seen_eof : 1; -} _IFP; - -static void * -get_va_nth (va_list argp, unsigned int n) -{ - va_list ap; - if (!n) abort (); - va_copy (ap, argp); - while (--n > 0) - (void) va_arg(ap, void *); - return va_arg (ap, void *); -} - -static void -optimize_alloc (char **p, char *end, size_t alloc_sz) -{ - size_t need_sz; - char *h; - - if (!p || !*p) - return; - - need_sz = end - *p; - if (need_sz == alloc_sz) - return; - - if ((h = (char *) realloc (*p, need_sz)) != NULL) - *p = h; -} - -static void -back_ch (int c, _IFP *s, size_t *rin, int not_eof) -{ - if (!not_eof && c == EOF) - return; - if (s->is_string == 0) - { - FILE *fp = s->fp; - ungetc (c, fp); - rin[0] -= 1; - return; - } - rin[0] -= 1; - s->bch[s->back_top] = c; - s->back_top += 1; -} - -static int -in_ch (_IFP *s, size_t *rin) -{ - int r; - if (s->back_top) - { - s->back_top -= 1; - r = s->bch[s->back_top]; - rin[0] += 1; - } - else if (s->seen_eof) - { - return EOF; - } - else if (s->is_string) - { - const char *ps = s->str; - r = ((int) *ps) & 0xff; - ps++; - if (r != 0) - { - rin[0] += 1; - s->str = ps; - return r; - } - s->seen_eof = 1; - return EOF; - } - else - { - FILE *fp = (FILE *) s->fp; - r = getc (fp); - if (r != EOF) - rin[0] += 1; - else s->seen_eof = 1; - } - return r; -} - -static int -match_string (_IFP *s, size_t *rin, int *c, const char *str) -{ - int ch = *c; - - if (*str == 0) - return 1; - - if (*str != (char) tolower (ch)) - return 0; - ++str; - while (*str != 0) - { - if ((ch = in_ch (s, rin)) == EOF) - { - c[0] = ch; - return 0; - } - - if (*str != (char) tolower (ch)) - { - c[0] = ch; - return 0; - } - ++str; - } - c[0] = ch; - return 1; -} - -struct gcollect -{ - size_t count; - struct gcollect *next; - char **ptrs[32]; -}; - -static void -release_ptrs (struct gcollect **pt, char **wbuf) -{ - struct gcollect *pf; - size_t cnt; - - if (wbuf) - { - free (*wbuf); - *wbuf = NULL; - } - if (!pt || (pf = *pt) == NULL) - return; - while (pf != NULL) - { - struct gcollect *pf_sv = pf; - for (cnt = 0; cnt < pf->count; ++cnt) - { - free (*pf->ptrs[cnt]); - *pf->ptrs[cnt] = NULL; - } - pf = pf->next; - free (pf_sv); - } - *pt = NULL; -} - -static int -cleanup_return (int rval, struct gcollect **pfree, char **strp, char **wbuf) -{ - if (rval == EOF) - release_ptrs (pfree, wbuf); - else - { - if (pfree) - { - struct gcollect *pf = *pfree, *pf_sv; - while (pf != NULL) - { - pf_sv = pf; - pf = pf->next; - free (pf_sv); - } - *pfree = NULL; - } - if (strp != NULL) - { - free (*strp); - *strp = NULL; - } - if (wbuf) - { - free (*wbuf); - *wbuf = NULL; - } - } - return rval; -} - -static struct gcollect * -resize_gcollect (struct gcollect *pf) -{ - struct gcollect *np; - if (pf && pf->count < 32) - return pf; - np = malloc (sizeof (struct gcollect)); - np->count = 0; - np->next = pf; - return np; -} - -static char * -resize_wbuf (size_t wpsz, size_t *wbuf_max_sz, char *old) -{ - char *wbuf; - size_t nsz; - if (*wbuf_max_sz != wpsz) - return old; - nsz = (256 > (2 * wbuf_max_sz[0]) ? 256 : (2 * wbuf_max_sz[0])); - if (!old) - wbuf = (char *) malloc (nsz); - else - wbuf = (char *) realloc (old, nsz); - if (!wbuf) - { - if (old) - free (old); - } - else - *wbuf_max_sz = nsz; - return wbuf; -} - -static int -__mingw_sformat (_IFP *s, const char *format, va_list argp) -{ - const char *f = format; - struct gcollect *gcollect = NULL; - size_t read_in = 0, wbuf_max_sz = 0, cnt; - ssize_t str_sz = 0; - char *str = NULL, **pstr = NULL, *wbuf = NULL; - wchar_t *wstr = NULL; - int rval = 0, c = 0, ignore_ws = 0; - va_list arg; - unsigned char fc; - unsigned int npos; - int width, flags, base = 0, errno_sv; - size_t wbuf_cur_sz, read_in_sv, new_sz, n; - char seen_dot, seen_exp, is_neg, not_in; - char *tmp_wbuf_ptr, buf[MB_LEN_MAX]; - const char *lc_decimal_point, *lc_thousands_sep; - mbstate_t state, cstate; - union { - unsigned long long ull; - unsigned long ul; - long long ll; - long l; - } cv_val; - - arg = argp; - - if (!s || s->fp == NULL || !format) - { - errno = EINVAL; - return EOF; - } - - memset (&state, 0, sizeof (state)); - - lc_decimal_point = localeconv()->decimal_point; - lc_thousands_sep = localeconv()->thousands_sep; - if (lc_thousands_sep != NULL && *lc_thousands_sep == 0) - lc_thousands_sep = NULL; - - while (*f != 0) - { - if (!isascii ((unsigned char) *f)) - { - int len; - - if ((len = mbrlen (f, strlen (f), &state)) > 0) - { - do - { - if ((c = in_ch (s, &read_in)) == EOF || c != (unsigned char) *f++) - { - back_ch (c, s, &read_in, 1); - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - } - } - while (--len > 0); - - continue; - } - } - - fc = *f++; - if (fc != '%') - { - if (isspace (fc)) - ignore_ws = 1; - else - { - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - if (ignore_ws) - { - ignore_ws = 0; - if (isspace (c)) - { - do - { - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - } - while (isspace (c)); - } - } - - if (c != fc) - { - back_ch (c, s, &read_in, 0); - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - continue; - } - - width = flags = 0; - npos = 0; - wbuf_cur_sz = 0; - - if (isdigit ((unsigned char) *f)) - { - const char *svf = f; - npos = (unsigned char) *f++ - '0'; - while (isdigit ((unsigned char) *f)) - npos = npos * 10 + ((unsigned char) *f++ - '0'); - if (*f != '$') - { - npos = 0; - f = svf; - } - else - f++; - } - - do - { - if (*f == '*') - flags |= IS_SUPPRESSED; - else if (*f == '\'') - { - if (lc_thousands_sep) - flags |= USE_GROUP; - } - else if (*f == 'I') - { - /* we don't support locale's digits (i18N), but ignore it for now silently. */ - ; -#ifdef _WIN32 - if (f[1] == '6' && f[2] == '4') - { - flags |= IS_LL | IS_L; - f += 2; - } - else if (f[1] == '3' && f[2] == '2') - { - flags |= IS_L; - f += 2; - } - else - { -#ifdef _WIN64 - flags |= IS_LL | IS_L; -#else - flags |= IS_L; -#endif - } -#endif - } - else - break; - ++f; - } - while (1); - - while (isdigit ((unsigned char) *f)) - width = width * 10 + ((unsigned char) *f++ - '0'); - - if (!width) - width = -1; - - switch (*f) - { - case 'h': - ++f; - flags |= (*f == 'h' ? IS_C : IS_S); - if (*f == 'h') - ++f; - break; - case 'l': - ++f; - flags |= (*f == 'l' ? IS_LL : 0) | IS_L; - if (*f == 'l') - ++f; - break; - case 'q': case 'L': - ++f; - flags |= IS_LL | IS_L; - break; - case 'a': - if (f[1] != 's' && f[1] != 'S' && f[1] != '[') - break; - ++f; - flags |= USE_GNU_ALLOC; - break; - case 'm': - flags |= USE_POSIX_ALLOC; - ++f; - if (*f == 'l') - { - flags |= IS_L; - f++; - } - break; - case 'z': -#ifdef _WIN64 - flags |= IS_LL | IS_L; -#else - flags |= IS_L; -#endif - ++f; - break; - case 'j': - if (sizeof (uintmax_t) > sizeof (unsigned long)) - flags |= IS_LL; - else if (sizeof (uintmax_t) > sizeof (unsigned int)) - flags |= IS_L; - ++f; - break; - case 't': -#ifdef _WIN64 - flags |= IS_LL; -#else - flags |= IS_L; -#endif - ++f; - break; - case 0: - return cleanup_return (rval, &gcollect, pstr, &wbuf); - default: - break; - } - - if (*f == 0) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - fc = *f++; - if (ignore_ws || (fc != '[' && fc != 'c' && fc != 'C' && fc != 'n')) - { - errno_sv = errno; - errno = 0; - do - { - if ((c == EOF || (c = in_ch (s, &read_in)) == EOF) - && errno == EINTR) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - } - while (isspace (c)); - - ignore_ws = 0; - errno = errno_sv; - back_ch (c, s, &read_in, 0); - } - - switch (fc) - { - case 'c': - if ((flags & IS_L) != 0) - fc = 'C'; - break; - case 's': - if ((flags & IS_L) != 0) - fc = 'S'; - break; - } - - switch (fc) - { - case '%': - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - if (c != fc) - { - back_ch (c, s, &read_in, 1); - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - break; - - case 'n': - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_LL) != 0) - *(npos != 0 ? (long long *) get_va_nth (argp, npos) : va_arg (arg, long long *)) = read_in; - else if ((flags & IS_L) != 0) - *(npos != 0 ? (long *) get_va_nth (argp, npos) : va_arg (arg, long *)) = read_in; - else if ((flags & IS_S) != 0) - *(npos != 0 ? (short *) get_va_nth (argp, npos) : va_arg (arg, short *)) = read_in; - else if ((flags & IS_C) != 0) - *(npos != 0 ? (char *) get_va_nth (argp, npos) : va_arg (arg, char *)) = read_in; - else - *(npos != 0 ? (int *) get_va_nth (argp, npos) : va_arg (arg, int *)) = read_in; - } - break; - - case 'c': - if (width == -1) - width = 1; - - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - str_sz = (width > 1024 ? 1024 : width); - if ((str = *pstr = (char *) malloc (str_sz)) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - str = (char *) get_va_nth (argp, npos); - else - str = va_arg (arg, char *); - if (!str) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - if ((flags & IS_SUPPRESSED) == 0) - { - do - { - if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) - { - new_sz = str_sz + (str_sz >= width ? width - 1 : str_sz); - while ((str = (char *) realloc (*pstr, new_sz)) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!str) - { - release_ptrs (&gcollect, &wbuf); - return EOF; - } - *pstr = str; - str += str_sz; - str_sz = new_sz; - } - *str++ = c; - } - while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); - } - else - while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); - - if ((flags & IS_SUPPRESSED) == 0) - { - optimize_alloc (pstr, str, str_sz); - pstr = NULL; - ++rval; - } - - break; - - case 'C': - if (width == -1) - width = 1; - - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - str_sz = (width > 1024 ? 1024 : width); - *pstr = (char *) malloc (str_sz * sizeof (wchar_t)); - if ((wstr = (wchar_t *) *pstr) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - wstr = (wchar_t *) get_va_nth (argp, npos); - else - wstr = va_arg (arg, wchar_t *); - if (!wstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - memset (&cstate, 0, sizeof (cstate)); - - do - { - buf[0] = c; - - if ((flags & IS_SUPPRESSED) == 0 && (flags & IS_ALLOC_USED) != 0 - && wstr == ((wchar_t *) *pstr + str_sz)) - { - new_sz = str_sz + (str_sz > width ? width - 1 : str_sz); - - while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!wstr) - { - release_ptrs (&gcollect, &wbuf); - return EOF; - } - *pstr = (char *) wstr; - wstr += str_sz; - str_sz = new_sz; - } - - while (1) - { - n = mbrtowc ((flags & IS_SUPPRESSED) == 0 ? wstr : NULL, buf, 1, &cstate); - - if (n == (size_t) -2) - { - if ((c = in_ch (s, &read_in)) == EOF) - { - errno = EILSEQ; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - - buf[0] = c; - continue; - } - - if (n != 1) - { - errno = EILSEQ; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - break; - } - - ++wstr; - } - while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); - - if ((flags & IS_SUPPRESSED) == 0) - { - optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); - pstr = NULL; - ++rval; - } - break; - - case 's': - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - str_sz = 100; - if ((str = *pstr = (char *) malloc (100)) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - str = (char *) get_va_nth (argp, npos); - else - str = va_arg (arg, char *); - if (!str) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - do - { - if (isspace (c)) - { - back_ch (c, s, &read_in, 1); - break; - } - - if ((flags & IS_SUPPRESSED) == 0) - { - *str++ = c; - if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) - { - new_sz = str_sz * 2; - - while ((str = (char *) realloc (*pstr, new_sz)) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!str) - { - if ((flags & USE_POSIX_ALLOC) == 0) - { - (*pstr)[str_sz - 1] = 0; - pstr = NULL; - ++rval; - } - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - } - *pstr = str; - str += str_sz; - str_sz = new_sz; - } - } - } - while ((width <= 0 || --width > 0) && (c = in_ch (s, &read_in)) != EOF); - if ((flags & IS_SUPPRESSED) == 0) - { - *str++ = 0; - optimize_alloc (pstr, str, str_sz); - pstr = NULL; - ++rval; - } - break; - - case 'S': - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - str_sz = 100; - *pstr = (char *) malloc (100 * sizeof (wchar_t)); - if ((wstr = (wchar_t *) *pstr) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - wstr = (wchar_t *) get_va_nth (argp, npos); - else - wstr = va_arg (arg, wchar_t *); - if (!wstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - memset (&cstate, 0, sizeof (cstate)); - - do - { - if (isspace (c)) - { - back_ch (c, s, &read_in, 1); - break; - } - - buf[0] = c; - - while (1) - { - n = mbrtowc ((flags & IS_SUPPRESSED) == 0 ? wstr : NULL, buf, 1, &cstate); - - if (n == (size_t) -2) - { - if ((c = in_ch (s, &read_in)) == EOF) - { - errno = EILSEQ; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - - buf[0] = c; - continue; - } - - if (n != 1) - { - errno = EILSEQ; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - - ++wstr; - break; - } - - if ((flags & IS_SUPPRESSED) == 0 && (flags & IS_ALLOC_USED) != 0 - && wstr == ((wchar_t *) *pstr + str_sz)) - { - new_sz = str_sz * 2; - while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!wstr) - { - if ((flags & USE_POSIX_ALLOC) == 0) - { - ((wchar_t *) (*pstr))[str_sz - 1] = 0; - pstr = NULL; - ++rval; - } - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - } - *pstr = (char *) wstr; - wstr += str_sz; - str_sz = new_sz; - } - } - while ((width <= 0 || --width > 0) && (c = in_ch (s, &read_in)) != EOF); - - if ((flags & IS_SUPPRESSED) == 0) - { - *wstr++ = 0; - optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); - pstr = NULL; - ++rval; - } - break; - - case 'd': case 'i': - case 'o': case 'p': - case 'u': - case 'x': case 'X': - switch (fc) - { - case 'd': - flags |= IS_SIGNED_NUM; - base = 10; - break; - case 'i': - flags |= IS_SIGNED_NUM; - base = 0; - break; - case 'o': - base = 8; - break; - case 'p': - base = 16; - flags &= ~(IS_S | IS_LL | IS_L); - #ifdef _WIN64 - flags |= IS_LL; - #endif - flags |= IS_L | IS_POINTER; - break; - case 'u': - base = 10; - break; - case 'x': case 'X': - base = 16; - break; - } - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - if (c == '+' || c == '-') - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - if (width > 0) - --width; - c = in_ch (s, &read_in); - } - if (width != 0 && c == '0') - { - if (width > 0) - --width; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - c = in_ch (s, &read_in); - - if (width != 0 && tolower (c) == 'x') - { - if (!base) - base = 16; - if (base == 16) - { - if (width > 0) - --width; - c = in_ch (s, &read_in); - } - } - else if (!base) - base = 8; - } - - if (!base) - base = 10; - - while (c != EOF && width != 0) - { - if (base == 16) - { - if (!isxdigit (c)) - break; - } - else if (!isdigit (c) || (int) (c - '0') >= base) - { - const char *p = lc_thousands_sep; - int remain; - - if (base != 10 || (flags & USE_GROUP) == 0) - break; - remain = width > 0 ? width : INT_MAX; - while ((unsigned char) *p == c && remain >= 0) - { - /* As our conversion routines aren't supporting thousands - separators, we are filtering them here. */ - - ++p; - if (*p == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) - break; - --remain; - } - - if (*p != 0) - { - if (p > lc_thousands_sep) - { - back_ch (c, s, &read_in, 0); - while (--p > lc_thousands_sep) - back_ch ((unsigned char) *p, s, &read_in, 1); - c = (unsigned char) *p; - } - break; - } - - if (width > 0) - width = remain; - --wbuf_cur_sz; - } - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - if (width > 0) - --width; - - c = in_ch (s, &read_in); - } - - if (!wbuf_cur_sz || (wbuf_cur_sz == 1 && (wbuf[0] == '+' || wbuf[0] == '-'))) - { - if (!wbuf_cur_sz && (flags & IS_POINTER) != 0 - && match_string (s, &read_in, &c, "(nil)")) - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = '0'; - } - else - { - back_ch (c, s, &read_in, 0); - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - else - back_ch (c, s, &read_in, 0); - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = 0; - - if ((flags & IS_LL)) - { - if (flags & IS_SIGNED_NUM) - cv_val.ll = strtoll (wbuf, &tmp_wbuf_ptr, base/*, flags & USE_GROUP*/); - else - cv_val.ull = strtoull (wbuf, &tmp_wbuf_ptr, base); - } - else - { - if (flags & IS_SIGNED_NUM) - cv_val.l = strtol (wbuf, &tmp_wbuf_ptr, base/*, flags & USE_GROUP*/); - else - cv_val.ul = strtoul (wbuf, &tmp_wbuf_ptr, base); - } - if (wbuf == tmp_wbuf_ptr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_SIGNED_NUM) != 0) - { - if ((flags & IS_LL) != 0) - *(npos != 0 ? (long long *) get_va_nth (argp, npos) : va_arg (arg, long long *)) = cv_val.ll; - else if ((flags & IS_L) != 0) - *(npos != 0 ? (long *) get_va_nth (argp, npos) : va_arg (arg, long *)) = cv_val.l; - else if ((flags & IS_S) != 0) - *(npos != 0 ? (short *) get_va_nth (argp, npos) : va_arg (arg, short *)) = (short) cv_val.l; - else if ((flags & IS_C) != 0) - *(npos != 0 ? (signed char *) get_va_nth (argp, npos) : va_arg (arg, signed char *)) = (signed char) cv_val.ul; - else - *(npos != 0 ? (int *) get_va_nth (argp, npos) : va_arg (arg, int *)) = (int) cv_val.l; - } - else - { - if ((flags & IS_LL) != 0) - *(npos != 0 ? (unsigned long long *) get_va_nth (argp, npos) : va_arg (arg, unsigned long long *)) = cv_val.ull; - else if ((flags & IS_L) != 0) - *(npos != 0 ? (unsigned long *) get_va_nth (argp, npos) : va_arg (arg, unsigned long *)) = cv_val.ul; - else if ((flags & IS_S) != 0) - *(npos != 0 ? (unsigned short *) get_va_nth (argp, npos) : va_arg (arg, unsigned short *)) - = (unsigned short) cv_val.ul; - else if ((flags & IS_C) != 0) - *(npos != 0 ? (unsigned char *) get_va_nth (argp, npos) : va_arg (arg, unsigned char *)) = (unsigned char) cv_val.ul; - else - *(npos != 0 ? (unsigned int *) get_va_nth (argp, npos) : va_arg (arg, unsigned int *)) = (unsigned int) cv_val.ul; - } - ++rval; - } - break; - - case 'e': case 'E': - case 'f': case 'F': - case 'g': case 'G': - case 'a': case 'A': - if (width > 0) - --width; - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - seen_dot = seen_exp = 0; - is_neg = (c == '-' ? 1 : 0); - - if (c == '-' || c == '+') - { - if (width == 0 || (c = in_ch (s, &read_in)) == EOF) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - if (width > 0) - --width; - } - - if (tolower (c) == 'n') - { - const char *match_txt = "nan"; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - - ++match_txt; - do - { - if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - if (width > 0) - --width; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - ++match_txt; - } - while (*match_txt != 0); - } - else if (tolower (c) == 'i') - { - const char *match_txt = "inf"; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - - ++match_txt; - do - { - if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - if (width > 0) - --width; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - ++match_txt; - } - while (*match_txt != 0); - - if (width != 0 && (c = in_ch (s, &read_in)) != EOF && tolower (c) == 'i') - { - match_txt = "inity"; - - if (width > 0) - --width; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - ++match_txt; - - do - { - if (width == 0 || (c = in_ch (s, &read_in)) == EOF || tolower (c) != match_txt[0]) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - if (width > 0) - --width; - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - ++match_txt; - } - while (*match_txt != 0); - } - else if (width != 0 && c != EOF) - back_ch (c, s, &read_in, 0); - } - else - { - not_in = 'e'; - if (width != 0 && c == '0') - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - - c = in_ch (s, &read_in); - if (width > 0) - --width; - if (width != 0 && tolower (c) == 'x') - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - - flags |= IS_HEX_FLOAT; - not_in = 'p'; - - flags &= ~USE_GROUP; - c = in_ch (s, &read_in); - if (width > 0) - --width; - } - } - - while (1) - { - if (isdigit (c) || (!seen_exp && (flags & IS_HEX_FLOAT) != 0 && isxdigit (c)) - || (seen_exp && wbuf[wbuf_cur_sz - 1] == not_in && (c == '-' || c == '+'))) - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = c; - } - else if (wbuf_cur_sz > 0 && !seen_exp && (char) tolower (c) == not_in) - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = not_in; - seen_exp = seen_dot = 1; - } - else - { - const char *p = lc_decimal_point; - int remain = width > 0 ? width : INT_MAX; - - if (! seen_dot) - { - while ((unsigned char) *p == c && remain >= 0) - { - ++p; - if (*p == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) - break; - --remain; - } - } - - if (*p == 0) - { - for (p = lc_decimal_point; *p != 0; ++p) - { - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = (unsigned char) *p; - } - if (width > 0) - width = remain; - seen_dot = 1; - } - else - { - const char *pp = lc_thousands_sep; - - if (!seen_dot && (flags & USE_GROUP) != 0) - { - while ((pp - lc_thousands_sep) < (p - lc_decimal_point) - && *pp == lc_decimal_point[(pp - lc_thousands_sep)]) - ++pp; - if ((pp - lc_thousands_sep) == (p - lc_decimal_point)) - { - while ((unsigned char) *pp == c && remain >= 0) - { - ++pp; - if (*pp == 0 || !remain || (c = in_ch (s, &read_in)) == EOF) - break; - --remain; - } - } - } - - if (pp != NULL && *pp == 0) - { - /* As our conversion routines aren't supporting thousands - separators, we are filtering them here. */ - if (width > 0) - width = remain; - } - else - { - back_ch (c, s, &read_in, 0); - break; - } - } - } - - if (width == 0 || (c = in_ch (s, &read_in)) == EOF) - break; - - if (width > 0) - --width; - } - - if (!wbuf_cur_sz || ((flags & IS_HEX_FLOAT) != 0 && wbuf_cur_sz == 2)) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - - wbuf = resize_wbuf (wbuf_cur_sz, &wbuf_max_sz, wbuf); - wbuf[wbuf_cur_sz++] = 0; - - if ((flags & IS_LL) != 0) - { - long double ld; - ld = __mingw_strtold (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); - if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) - *(npos != 0 ? (long double *) get_va_nth (argp, npos) : va_arg (arg, long double *)) = is_neg ? -ld : ld; - } - else if ((flags & IS_L) != 0) - { - double d; - d = (double) __mingw_strtold (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); - if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) - *(npos != 0 ? (double *) get_va_nth (argp, npos) : va_arg (arg, double *)) = is_neg ? -d : d; - } - else - { - float d = __mingw_strtof (wbuf, &tmp_wbuf_ptr/*, flags & USE_GROUP*/); - if ((flags & IS_SUPPRESSED) == 0 && tmp_wbuf_ptr != wbuf) - *(npos != 0 ? (float *) get_va_nth (argp, npos) : va_arg (arg, float *)) = is_neg ? -d : d; - } - - if (wbuf == tmp_wbuf_ptr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - if ((flags & IS_SUPPRESSED) == 0) - ++rval; - break; - - case '[': - if ((flags & IS_L) != 0) - { - if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - str_sz = 100; - *pstr = (char *) malloc (100 * sizeof (wchar_t)); - - if ((wstr = (wchar_t *) *pstr) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - wstr = (wchar_t *) get_va_nth (argp, npos); - else - wstr = va_arg (arg, wchar_t *); - if (!wstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - } - else if ((flags & IS_SUPPRESSED) == 0) - { - if ((flags & IS_ALLOC_USED) != 0) - { - if (npos != 0) - pstr = (char **) get_va_nth (argp, npos); - else - pstr = va_arg (arg, char **); - - if (!pstr) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - str_sz = 100; - if ((str = *pstr = (char *) malloc (100)) == NULL) - return cleanup_return (((flags & USE_POSIX_ALLOC) != 0 ? EOF : rval), &gcollect, pstr, &wbuf); - - gcollect = resize_gcollect (gcollect); - gcollect->ptrs[gcollect->count++] = pstr; - } - else - { - if (npos != 0) - str = (char *) get_va_nth (argp, npos); - else - str = va_arg (arg, char *); - if (!str) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - not_in = (*f == '^' ? 1 : 0); - if (*f == '^') - f++; - - if (width < 0) - width = INT_MAX; - - if (wbuf_max_sz < 256) - { - wbuf_max_sz = 256; - if (wbuf) - free (wbuf); - wbuf = (char *) malloc (wbuf_max_sz); - } - memset (wbuf, 0, 256); - - fc = *f; - if (fc == ']' || fc == '-') - { - wbuf[fc] = 1; - ++f; - } - - while ((fc = *f++) != 0 && fc != ']') - { - if (fc == '-' && *f != 0 && *f != ']' && (unsigned char) f[-2] <= (unsigned char) *f) - { - for (fc = (unsigned char) f[-2]; fc < (unsigned char) *f; ++fc) - wbuf[fc] = 1; - } - else - wbuf[fc] = 1; - } - - if (!fc) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - if ((flags & IS_L) != 0) - { - read_in_sv = read_in; - cnt = 0; - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - memset (&cstate, 0, sizeof (cstate)); - - do - { - if (wbuf[c] == not_in) - { - back_ch (c, s, &read_in, 1); - break; - } - - if ((flags & IS_SUPPRESSED) == 0) - { - buf[0] = c; - n = mbrtowc (wstr, buf, 1, &cstate); - - if (n == (size_t) -2) - { - ++cnt; - continue; - } - cnt = 0; - - ++wstr; - if ((flags & IS_ALLOC_USED) != 0 && wstr == ((wchar_t *) *pstr + str_sz)) - { - new_sz = str_sz * 2; - while ((wstr = (wchar_t *) realloc (*pstr, new_sz * sizeof (wchar_t))) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!wstr) - { - if ((flags & USE_POSIX_ALLOC) == 0) - { - ((wchar_t *) (*pstr))[str_sz - 1] = 0; - pstr = NULL; - ++rval; - } - else - rval = EOF; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - *pstr = (char *) wstr; - wstr += str_sz; - str_sz = new_sz; - } - } - - if (--width <= 0) - break; - } - while ((c = in_ch (s, &read_in)) != EOF); - - if (cnt != 0) - { - errno = EILSEQ; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - - if (read_in_sv == read_in) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - - if ((flags & IS_SUPPRESSED) == 0) - { - *wstr++ = 0; - optimize_alloc (pstr, (char *) wstr, str_sz * sizeof (wchar_t)); - pstr = NULL; - ++rval; - } - } - else - { - read_in_sv = read_in; - - if ((c = in_ch (s, &read_in)) == EOF) - return cleanup_return ((!rval ? EOF : rval), &gcollect, pstr, &wbuf); - - do - { - if (wbuf[c] == not_in) - { - back_ch (c, s, &read_in, 1); - break; - } - - if ((flags & IS_SUPPRESSED) == 0) - { - *str++ = c; - if ((flags & IS_ALLOC_USED) != 0 && str == (*pstr + str_sz)) - { - new_sz = str_sz * 2; - - while ((str = (char *) realloc (*pstr, new_sz)) == NULL - && new_sz > (size_t) (str_sz + 1)) - new_sz = str_sz + 1; - if (!str) - { - if ((flags & USE_POSIX_ALLOC) == 0) - { - (*pstr)[str_sz - 1] = 0; - pstr = NULL; - ++rval; - } - else - rval = EOF; - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - *pstr = str; - str += str_sz; - str_sz = new_sz; - } - } - } - while (--width > 0 && (c = in_ch (s, &read_in)) != EOF); - - if (read_in_sv == read_in) - return cleanup_return (rval, &gcollect, pstr, &wbuf); - - if ((flags & IS_SUPPRESSED) == 0) - { - *str++ = 0; - optimize_alloc (pstr, str, str_sz); - pstr = NULL; - ++rval; - } - } - break; - - default: - return cleanup_return (rval, &gcollect, pstr, &wbuf); - } - } - - if (ignore_ws) - { - while (isspace ((c = in_ch (s, &read_in)))); - back_ch (c, s, &read_in, 0); - } - - return cleanup_return (rval, &gcollect, pstr, &wbuf); -} +#include "mingw_sformat.h" int __mingw_vfscanf (FILE *s, const char *format, va_list argp) @@ -1619,14 +12,3 @@ __mingw_vfscanf (FILE *s, const char *format, va_list argp) ifp.fp = s; return __mingw_sformat (&ifp, format, argp); } - -int -__mingw_vsscanf (const char *s, const char *format, va_list argp) -{ - _IFP ifp; - memset (&ifp, 0, sizeof (_IFP)); - ifp.str = s; - ifp.is_string = 1; - return __mingw_sformat (&ifp, format, argp); -} - diff --git a/lib/libc/mingw/stdio/mingw_vfprintfw.c b/lib/libc/mingw/stdio/mingw_vfwprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_vfprintfw.c rename to lib/libc/mingw/stdio/mingw_vfwprintf.c diff --git a/lib/libc/mingw/stdio/mingw_vfwscanf.c b/lib/libc/mingw/stdio/mingw_vfwscanf.c new file mode 100644 index 000000000000..dfb156f6d059 --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_vfwscanf.c @@ -0,0 +1,14 @@ +#include +#include +#include + +#include "mingw_swformat.h" + +int +__mingw_vfwscanf (FILE *s, const wchar_t *format, va_list argp) +{ + _IFPW ifp; + memset (&ifp, 0, sizeof (_IFPW)); + ifp.fp = s; + return __mingw_swformat (&ifp, format, argp); +} diff --git a/lib/libc/mingw/stdio/mingw_vsnprintf.c b/lib/libc/mingw/stdio/mingw_vsnprintf.c index b477300f9700..b9c3578627d1 100644 --- a/lib/libc/mingw/stdio/mingw_vsnprintf.c +++ b/lib/libc/mingw/stdio/mingw_vsnprintf.c @@ -34,11 +34,20 @@ int __cdecl __vsnprintf(APICHAR *buf, size_t length, const APICHAR *fmt, va_list register int retval; if( length == (size_t)(0) ) + { +#if defined(__BUILD_WIDEAPI) && defined(__BUILD_WIDEAPI_ISO) + /* No buffer; for wide api ISO C95+ vswprintf() function + * simply returns negative value as required by ISO C95+. + */ + return -1; +#else /* * No buffer; simply compute and return the size required, * without actually emitting any data. */ return __pformat( 0, buf, 0, fmt, argv); +#endif + } /* If we get to here, then we have a buffer... * Emit data up to the limit of buffer length less one, @@ -47,6 +56,15 @@ int __cdecl __vsnprintf(APICHAR *buf, size_t length, const APICHAR *fmt, va_list retval = __pformat( 0, buf, --length, fmt, argv ); buf[retval < (int) length ? retval : (int)length] = '\0'; +#if defined(__BUILD_WIDEAPI) && defined(__BUILD_WIDEAPI_ISO) + /* For wide api ISO C95+ vswprintf() when requested length + * is equal or larger than buffer length, returns negative + * value as required by ISO C95+. + */ + if( retval >= (int) length ) + retval = -1; +#endif + return retval; } diff --git a/lib/libc/mingw/stdio/mingw_vsnprintfw.c b/lib/libc/mingw/stdio/mingw_vsnwprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_vsnprintfw.c rename to lib/libc/mingw/stdio/mingw_vsnwprintf.c diff --git a/lib/libc/mingw/stdio/mingw_vsscanf.c b/lib/libc/mingw/stdio/mingw_vsscanf.c new file mode 100644 index 000000000000..52d72d9f0aa8 --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_vsscanf.c @@ -0,0 +1,15 @@ +#include +#include +#include + +#include "mingw_sformat.h" + +int +__mingw_vsscanf (const char *s, const char *format, va_list argp) +{ + _IFP ifp; + memset (&ifp, 0, sizeof (_IFP)); + ifp.str = s; + ifp.is_string = 1; + return __mingw_sformat (&ifp, format, argp); +} diff --git a/lib/libc/mingw/stdio/mingw_vsprintfw.c b/lib/libc/mingw/stdio/mingw_vswprintf.c similarity index 78% rename from lib/libc/mingw/stdio/mingw_vsprintfw.c rename to lib/libc/mingw/stdio/mingw_vswprintf.c index fd8808bf477d..6d70b2cfa1e5 100644 --- a/lib/libc/mingw/stdio/mingw_vsprintfw.c +++ b/lib/libc/mingw/stdio/mingw_vswprintf.c @@ -4,7 +4,7 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ #define __BUILD_WIDEAPI 1 -#define _CRT_NON_CONFORMING_SWPRINTFS 1 +#define __BUILD_WIDEAPI_ISO 1 -#include "mingw_vsprintf.c" +#include "mingw_vsnprintf.c" diff --git a/lib/libc/mingw/stdio/mingw_vswscanf.c b/lib/libc/mingw/stdio/mingw_vswscanf.c new file mode 100644 index 000000000000..48767f229735 --- /dev/null +++ b/lib/libc/mingw/stdio/mingw_vswscanf.c @@ -0,0 +1,15 @@ +#include +#include +#include + +#include "mingw_swformat.h" + +int +__mingw_vswscanf (const wchar_t *s, const wchar_t *format, va_list argp) +{ + _IFPW ifp; + memset (&ifp, 0, sizeof (_IFPW)); + ifp.str = s; + ifp.is_string = 1; + return __mingw_swformat (&ifp, format, argp); +} diff --git a/lib/libc/mingw/stdio/mingw_vprintfw.c b/lib/libc/mingw/stdio/mingw_vwprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_vprintfw.c rename to lib/libc/mingw/stdio/mingw_vwprintf.c diff --git a/lib/libc/mingw/stdio/mingw_pformatw.c b/lib/libc/mingw/stdio/mingw_wpformat.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_pformatw.c rename to lib/libc/mingw/stdio/mingw_wpformat.c diff --git a/lib/libc/mingw/stdio/mingw_printfw.c b/lib/libc/mingw/stdio/mingw_wprintf.c similarity index 100% rename from lib/libc/mingw/stdio/mingw_printfw.c rename to lib/libc/mingw/stdio/mingw_wprintf.c diff --git a/lib/libc/mingw/stdio/scanf.S b/lib/libc/mingw/stdio/scanf.S deleted file mode 100644 index 41ff64598c59..000000000000 --- a/lib/libc/mingw/stdio/scanf.S +++ /dev/null @@ -1,243 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -/* vsscanf, vswscanf, vfscanf, and vfwscanf all come here for i386 and arm. - - The goal of this routine is to turn a call to v*scanf into a call to - s*scanf. This is needed because mingw-w64 uses msvcr100.dll, which doesn't - support the v*scanf functions instead of msvcr120.dll which does. -*/ - -/* The function prototype here is (essentially): - - int __ms_v*scanf_internal (void *s, - void *format, - void *arg, - size_t count, - void *func); - - I say 'essentially' because passing a function pointer as void in ISO - is not supported. But in the end, I take the first parameter (which - may be a char *, a wchar_t *, or a FILE *) and put it into the newly - formed stack, and eventually call the address in func. */ - -#if defined (__x86_64__) - - .text - .align 16 - - /* scl 2: C_EXT - External (public) symbol - covers globals and externs - type 32: DT_FCN - function returning T - */ - .def __argtos; .scl 2; .type 32; .endef - - .seh_proc __argtos -__argtos: - - /* When we are done: - - s must be in rcx. That's where it is on entry. - - format must be in rdx. That's where it is on entry. - - The first pointer in arg must be in r8. arg is in r8 on entry. - - The second pointer in arg must be in r9. arg is in r8 on entry. - - The (count - 2) other pointers in arg must be on the stack, - starting 32bytes into rsp. */ - - pushq %rbp - .seh_pushreg %rbp - movq %rsp, %rbp - .seh_setframe %rbp, 0 - - /* We need to always reserve space to shadow 4 parameters. */ - subq $32, %rsp - .seh_stackalloc 32 - .seh_endprologue - - movq 48(%rbp), %r10 /* func. */ - - /* We need enough room to shadow all the other args. - Except the first 2, since they will be loaded in registers. */ - cmpq $2, %r9 /* count. */ - jbe .SKIP - subq $2, %r9 /* # of ptrs to copy. */ - /* Calculate stack size (arg is 8byte) and keep the stack 16byte aligned. */ - leaq 8(, %r9, 8), %rax /* %rax = (%r9 + 1) * 8 */ - andq $-16, %rax - subq %rax, %rsp - - /* We are going to copy parameters from arg to our local stack. - The first 32 bytes are in registers, but by spec, space - must still be reserved for them on the stack. Put the - rest of the pointers in the stack after that. */ - lea 32(%rsp), %r11 /* dst. */ - -.LOOP: - subq $1, %r9 - - /* Use 16 to skip over the first 2 pointers. */ - movq 16(%r8, %r9, 8), %rax - movq %rax, (%r11, %r9, 8) - jnz .LOOP - -.SKIP: - /* The stack is now correctly populated, and so are rcx and rdx. - But we need to load the last 2 regs before making the call. */ - movq 0x8(%r8), %r9 /* 2nd dest location (may be garbage if only 1 arg). */ - movq (%r8), %r8 /* 1st dest location (may be garbage if no arg). */ - - /* Make the call. */ - callq *%r10 - - /* Restore stack. */ - movq %rbp, %rsp - - popq %rbp - retq - .seh_endproc - -#elif defined (_X86_) - - .text - .align 16 - - /* scl 2: C_EXT - External (public) symbol - covers globals and externs - type 32: DT_FCN - function returning T - */ - .def __argtos; .scl 2; .type 32; .endef - -__argtos: - pushl %ebp - movl %esp, %ebp - pushl %edi - pushl %ebx - - /* Reserve enough stack space for everything. - - Stack usage will look like: - 4 bytes - s - 4 bytes - format - 4*count bytes - variable # of parameters for sscanf (all ptrs). */ - - movl 20(%ebp), %ebx /* count. */ - addl $2, %ebx /* s + format. */ - sall $2, %ebx /* (count + 2) * 4. */ - subl %ebx, %esp - - /* Write out s and format where they need to be for the sscanf call. */ - movl 8(%ebp), %eax - movl %eax, (%esp) /* s. */ - movl 12(%ebp), %edx - movl %edx, 0x4(%esp) /* format. */ - - /* We are going to copy _count_ pointers from arg to our - local stack. */ - movl 20(%ebp), %ecx /* # of ptrs to copy. */ - testl %ecx, %ecx - jz .SKIP - lea 8(%esp), %edi /* dst. */ - movl 16(%ebp), %edx /* src. */ - -.LOOP: - subl $1, %ecx - - movl (%edx, %ecx, 4), %eax - movl %eax, (%edi, %ecx, 4) - jnz .LOOP - -.SKIP: - /* The stack is now correctly populated. */ - - /* Make the call. */ - call *24(%ebp) - - /* Restore stack. */ - addl %ebx, %esp - - popl %ebx - popl %edi - leave - - ret - -#elif defined (__arm__) - - .text - .align 2 - .thumb_func - .globl __argtos - -__argtos: - push {r4-r8, lr} - ldr r12, [sp, #24] - - ldr r5, [r2], #4 - ldr r6, [r2], #4 - - subs r3, r3, #2 - mov r8, #0 - ble 2f - - /* Round the number of entries to an even number, to maintain - * 8 byte stack alignment. */ - mov r8, r3 - add r8, r8, #1 - bic r8, r8, #1 - sub sp, sp, r8, lsl #2 - mov r4, sp -1: ldr r7, [r2], #4 - subs r3, r3, #1 - str r7, [r4], #4 - bne 1b - -2: - mov r2, r5 - mov r3, r6 - blx r12 - - add sp, sp, r8, lsl #2 - pop {r4-r8, pc} - -#elif defined (__aarch64__) - - .text - .align 2 - .globl __argtos - -__argtos: - stp x29, x30, [sp, #-16]! - mov x29, sp - mov x10, x2 - mov x11, x3 - mov x12, x4 - - ldr x2, [x10], #8 - ldr x3, [x10], #8 - ldr x4, [x10], #8 - ldr x5, [x10], #8 - ldr x6, [x10], #8 - ldr x7, [x10], #8 - - subs x11, x11, #6 - b.le 2f - - /* Round the number of entries to an even number, to maintain - * 16 byte stack alignment. */ - mov x13, x11 - add x13, x13, #1 - bic x13, x13, #1 - sub sp, sp, x13, lsl #3 - mov x9, sp -1: ldr x13, [x10], #8 - subs x11, x11, #1 - str x13, [x9], #8 - b.ne 1b - -2: - blr x12 - mov sp, x29 - ldp x29, x30, [sp], #16 - ret - -#endif diff --git a/lib/libc/mingw/stdio/scanf2-argcount-char.c b/lib/libc/mingw/stdio/scanf2-argcount-char.c deleted file mode 100644 index bc18dc5685f5..000000000000 --- a/lib/libc/mingw/stdio/scanf2-argcount-char.c +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#define FUNC __ms_scanf_max_arg_count_internal -#define TYPE char -#include "scanf2-argcount-template.c" diff --git a/lib/libc/mingw/stdio/scanf2-argcount-template.c b/lib/libc/mingw/stdio/scanf2-argcount-template.c deleted file mode 100644 index fec8a093971b..000000000000 --- a/lib/libc/mingw/stdio/scanf2-argcount-template.c +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include - -size_t FUNC(const TYPE *format); -size_t FUNC(const TYPE *format) -{ - size_t count = 0; - for (; *format; format++) { - if (*format == (TYPE)'%') - count++; - } - return count; -} diff --git a/lib/libc/mingw/stdio/scanf2-argcount-wchar.c b/lib/libc/mingw/stdio/scanf2-argcount-wchar.c deleted file mode 100644 index cece837a3ebb..000000000000 --- a/lib/libc/mingw/stdio/scanf2-argcount-wchar.c +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#define FUNC __ms_wscanf_max_arg_count_internal -#define TYPE wchar_t -#include "scanf2-argcount-template.c" diff --git a/lib/libc/mingw/stdio/scanf2-template.S b/lib/libc/mingw/stdio/scanf2-template.S deleted file mode 100644 index 3c9aa2a4bc9a..000000000000 --- a/lib/libc/mingw/stdio/scanf2-template.S +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#if defined(_ARM_) || defined(__arm__) - .thumb -#endif - .text - .p2align 4,,15 - .globl FCT - .def FCT; .scl 2; .type 32; .endef -#ifdef __x86_64__ - .seh_proc FCT -#endif -FCT: -#ifdef __x86_64__ - .seh_endprologue -#endif -#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) - jmp FWD -#elif defined(_ARM_) || defined(__arm__) - .thumb_func - b FWD -#elif defined(_ARM64_) || defined(__aarch64__) - b FWD -#endif -#ifdef __x86_64__ - .seh_endproc -#endif - .def FWD; .scl 2; .type 32; .endef diff --git a/lib/libc/mingw/stdio/snwprintf.c b/lib/libc/mingw/stdio/snwprintf.c index c57a46d893ce..6abf77a44424 100644 --- a/lib/libc/mingw/stdio/snwprintf.c +++ b/lib/libc/mingw/stdio/snwprintf.c @@ -12,7 +12,7 @@ int __cdecl __ms_snwprintf(wchar_t *buffer, size_t n, const wchar_t *format, ... va_list argptr; va_start(argptr, format); - retval = _vsnwprintf(buffer, n, format, argptr); + retval = __ms_vsnwprintf(buffer, n, format, argptr); va_end(argptr); return retval; } diff --git a/lib/libc/mingw/stdio/ucrt_ms_fprintf.c b/lib/libc/mingw/stdio/ucrt_ms_fprintf.c new file mode 100644 index 000000000000..15588bcae709 --- /dev/null +++ b/lib/libc/mingw/stdio/ucrt_ms_fprintf.c @@ -0,0 +1,22 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#undef __MSVCRT_VERSION__ +#define _UCRT + +#include +#include + +int __cdecl __ms_fprintf(FILE * restrict file, const char * restrict format, ...) +{ + va_list ap; + int ret; + va_start(ap, format); + ret = __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, ap); + va_end(ap); + return ret; +} +int __cdecl (*__MINGW_IMP_SYMBOL(__ms_fprintf))(FILE * restrict, const char * restrict, ...) = __ms_fprintf; diff --git a/lib/libc/mingw/stdio/vfscanf.c b/lib/libc/mingw/stdio/vfscanf.c deleted file mode 100644 index c3282a3edbf7..000000000000 --- a/lib/libc/mingw/stdio/vfscanf.c +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include -#include - -extern int __ms_vfscanf_internal ( - FILE * s, - const char * format, - va_list arg, - size_t count, - int (*func)(FILE * __restrict__, const char * __restrict__, ...)) - asm("__argtos"); - -extern size_t __ms_scanf_max_arg_count_internal (const char * format); - -int __ms_vfscanf (FILE * __restrict__ stream, const char * __restrict__ format, va_list arg) -{ - size_t count = __ms_scanf_max_arg_count_internal (format); - int ret; - -#if defined(_AMD64_) || defined(__x86_64__) || \ - defined(_X86_) || defined(__i386__) || \ - defined(_ARM_) || defined(__arm__) || \ - defined(_ARM64_) || defined(__aarch64__) - ret = __ms_vfscanf_internal (stream, format, arg, count, fscanf); -#else -#error "unknown platform" -#endif - - return ret; -} diff --git a/lib/libc/mingw/stdio/vfscanf2.S b/lib/libc/mingw/stdio/vfscanf2.S deleted file mode 100644 index 36f38c5fd88e..000000000000 --- a/lib/libc/mingw/stdio/vfscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vfscanf) -#define FWD __MINGW_USYMBOL(__ms_vfscanf) - - .file "vfscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/stdio/vfwscanf.c b/lib/libc/mingw/stdio/vfwscanf.c deleted file mode 100644 index f8e465d3616c..000000000000 --- a/lib/libc/mingw/stdio/vfwscanf.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include -#include - -extern int __ms_vfwscanf_internal ( - FILE * s, - const wchar_t * format, - va_list arg, - size_t count, - int (*func)(FILE * __restrict__, const wchar_t * __restrict__, ...)) - asm("__argtos"); - -extern size_t __ms_wscanf_max_arg_count_internal (const wchar_t * format); - -int __ms_vfwscanf (FILE * __restrict__ stream, - const wchar_t * __restrict__ format, va_list arg) -{ - size_t count = __ms_wscanf_max_arg_count_internal (format); - int ret; - -#if defined(_AMD64_) || defined(__x86_64__) || \ - defined(_X86_) || defined(__i386__) || \ - defined(_ARM_) || defined(__arm__) || \ - defined (_ARM64_) || defined (__aarch64__) - ret = __ms_vfwscanf_internal (stream, format, arg, count, fwscanf); -#else -#error "unknown platform" -#endif - - return ret; -} diff --git a/lib/libc/mingw/stdio/vfwscanf2.S b/lib/libc/mingw/stdio/vfwscanf2.S deleted file mode 100644 index 9d98647a764f..000000000000 --- a/lib/libc/mingw/stdio/vfwscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vfwscanf) -#define FWD __MINGW_USYMBOL(__ms_vfwscanf) - - .file "vfwscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/stdio/vscanf.c b/lib/libc/mingw/stdio/vscanf.c deleted file mode 100644 index f255e6825c2a..000000000000 --- a/lib/libc/mingw/stdio/vscanf.c +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -// By aaronwl 2003-01-28 for mingw-msvcrt -// Public domain: all copyrights disclaimed, absolutely no warranties - -#include -#include - -int __ms_vscanf(const char * __restrict__ format, va_list arg) -{ - return __ms_vfscanf(stdin, format, arg); -} diff --git a/lib/libc/mingw/stdio/vscanf2.S b/lib/libc/mingw/stdio/vscanf2.S deleted file mode 100644 index b0e2a09f0753..000000000000 --- a/lib/libc/mingw/stdio/vscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vscanf) -#define FWD __MINGW_USYMBOL(__ms_vscanf) - - .file "vscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/stdio/vsnwprintf.c b/lib/libc/mingw/stdio/vsnwprintf.c index b5c5ae65cf74..626889a30499 100644 --- a/lib/libc/mingw/stdio/vsnwprintf.c +++ b/lib/libc/mingw/stdio/vsnwprintf.c @@ -12,5 +12,23 @@ int __cdecl __ms_vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, int __cdecl __ms_vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr) { - return _vsnwprintf(buffer, n, format, argptr); + int retval; + + /* _vsnwprintf() does not work with zero length buffer + * so count number of characters by _vscwprintf() call */ + if (n == 0) + return _vscwprintf(format, argptr); + + retval = _vsnwprintf(buffer, n, format, argptr); + + /* _vsnwprintf() does not fill trailing null character if there is not place for it */ + if (retval < 0 || (size_t)retval == n) + buffer[n-1] = '\0'; + + /* _vsnwprintf() returns negative number if buffer is too small + * so count number of characters by _vscwprintf() call */ + if (retval < 0) + retval = _vscwprintf(format, argptr); + + return retval; } diff --git a/lib/libc/mingw/stdio/vsscanf.c b/lib/libc/mingw/stdio/vsscanf.c deleted file mode 100644 index 9b3b650ded51..000000000000 --- a/lib/libc/mingw/stdio/vsscanf.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include -#include - -extern int __ms_vsscanf_internal ( - const char * s, - const char * format, - va_list arg, - size_t count, - int (*func)(const char * __restrict__, const char * __restrict__, ...)) - asm("__argtos"); - -extern size_t __ms_scanf_max_arg_count_internal (const char * format); - -int __ms_vsscanf (const char * __restrict__ s, - const char * __restrict__ format, va_list arg) -{ - size_t count = __ms_scanf_max_arg_count_internal (format); - int ret; - -#if defined(_AMD64_) || defined(__x86_64__) || \ - defined(_X86_) || defined(__i386__) || \ - defined(_ARM_) || defined(__arm__) || \ - defined(_ARM64_) || defined(__aarch64__) - ret = __ms_vsscanf_internal (s, format, arg, count, sscanf); -#else -#error "unknown platform" -#endif - - return ret; -} diff --git a/lib/libc/mingw/stdio/vsscanf2.S b/lib/libc/mingw/stdio/vsscanf2.S deleted file mode 100644 index e840a972b6cf..000000000000 --- a/lib/libc/mingw/stdio/vsscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vsscanf) -#define FWD __MINGW_USYMBOL(__ms_vsscanf) - - .file "vsscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/stdio/vswscanf.c b/lib/libc/mingw/stdio/vswscanf.c deleted file mode 100644 index 01c811b32ee3..000000000000 --- a/lib/libc/mingw/stdio/vswscanf.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include -#include - -extern int __ms_vswscanf_internal ( - const wchar_t * s, - const wchar_t * format, - va_list arg, - size_t count, - int (*func)(const wchar_t * __restrict__, const wchar_t * __restrict__, ...)) - asm("__argtos"); - -extern size_t __ms_wscanf_max_arg_count_internal (const wchar_t * format); - -int __ms_vswscanf(const wchar_t * __restrict__ s, const wchar_t * __restrict__ format, - va_list arg) -{ - size_t count = __ms_wscanf_max_arg_count_internal (format); - int ret; - -#if defined(_AMD64_) || defined(__x86_64__) || \ - defined(_X86_) || defined(__i386__) || \ - defined(_ARM_) || defined(__arm__) || \ - defined(_ARM64_) || defined(__aarch64__) - ret = __ms_vswscanf_internal (s, format, arg, count, swscanf); -#else -#error "unknown platform" -#endif - - return ret; -} diff --git a/lib/libc/mingw/stdio/vswscanf2.S b/lib/libc/mingw/stdio/vswscanf2.S deleted file mode 100644 index 529f71b7edb3..000000000000 --- a/lib/libc/mingw/stdio/vswscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vswscanf) -#define FWD __MINGW_USYMBOL(__ms_vswscanf) - - .file "vswscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/stdio/vwscanf.c b/lib/libc/mingw/stdio/vwscanf.c deleted file mode 100644 index 3360eefad149..000000000000 --- a/lib/libc/mingw/stdio/vwscanf.c +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -// By aaronwl 2003-01-28 for mingw-msvcrt. -// Public domain: all copyrights disclaimed, absolutely no warranties. - -#include -#include -#include - -int __ms_vwscanf (const wchar_t * __restrict__ format, va_list arg) -{ - return __ms_vfwscanf(stdin, format, arg); -} diff --git a/lib/libc/mingw/stdio/vwscanf2.S b/lib/libc/mingw/stdio/vwscanf2.S deleted file mode 100644 index e52c8c2a0d30..000000000000 --- a/lib/libc/mingw/stdio/vwscanf2.S +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - -#define FCT __MINGW_USYMBOL(vwscanf) -#define FWD __MINGW_USYMBOL(__ms_vwscanf) - - .file "vwscanf2.S" -#include "scanf2-template.S" diff --git a/lib/libc/mingw/winpthreads/thread.c b/lib/libc/mingw/winpthreads/thread.c index 68858cfa6363..d5b3aaa05472 100644 --- a/lib/libc/mingw/winpthreads/thread.c +++ b/lib/libc/mingw/winpthreads/thread.c @@ -970,7 +970,8 @@ void _pthread_cleanup_dest (pthread_t t) { _pthread_v *tv; - unsigned int i, j; + unsigned int j; + int i; if (!t) return; @@ -983,7 +984,7 @@ _pthread_cleanup_dest (pthread_t t) int flag = 0; pthread_spin_lock (&tv->spin_keys); - for (i = 0; i < tv->keymax; i++) + for (i = tv->keymax - 1; i >= 0; i--) { void *val = tv->keyval[i]; diff --git a/lib/libc/mingw/winpthreads/thread.h b/lib/libc/mingw/winpthreads/thread.h index 5b88226e980e..1603bae5896a 100644 --- a/lib/libc/mingw/winpthreads/thread.h +++ b/lib/libc/mingw/winpthreads/thread.h @@ -74,6 +74,6 @@ void thread_print_set(int state); void thread_print(volatile pthread_t t, char *txt); #endif int __pthread_shallcancel(void); -struct _pthread_v *WINPTHREAD_API __pth_gpointer_locked (pthread_t id); +WINPTHREAD_API struct _pthread_v * __pth_gpointer_locked (pthread_t id); #endif diff --git a/src/mingw.zig b/src/mingw.zig index 17c0a49b11ef..d24921909cb9 100644 --- a/src/mingw.zig +++ b/src/mingw.zig @@ -497,7 +497,7 @@ const mingw32_generic_src = [_][]const u8{ "crt" ++ path.sep_str ++ "cxa_atexit.c", "crt" ++ path.sep_str ++ "cxa_thread_atexit.c", "crt" ++ path.sep_str ++ "tls_atexit.c", - "crt" ++ path.sep_str ++ "intrincs" ++ path.sep_str ++ "RtlSecureZeroMemory.c", + "intrincs" ++ path.sep_str ++ "RtlSecureZeroMemory.c", // mingwex "cfguard" ++ path.sep_str ++ "mingw_cfguard_support.c", "complex" ++ path.sep_str ++ "_cabs.c", @@ -630,8 +630,6 @@ const mingw32_generic_src = [_][]const u8{ "misc" ++ path.sep_str ++ "getlogin.c", "misc" ++ path.sep_str ++ "getopt.c", "misc" ++ path.sep_str ++ "gettimeofday.c", - "misc" ++ path.sep_str ++ "isblank.c", - "misc" ++ path.sep_str ++ "iswblank.c", "misc" ++ path.sep_str ++ "mempcpy.c", "misc" ++ path.sep_str ++ "mingw-access.c", "misc" ++ path.sep_str ++ "mingw-aligned-malloc.c", @@ -658,8 +656,6 @@ const mingw32_generic_src = [_][]const u8{ "misc" ++ path.sep_str ++ "wcstold.c", "misc" ++ path.sep_str ++ "wcstoumax.c", "misc" ++ path.sep_str ++ "wctob.c", - "misc" ++ path.sep_str ++ "wctrans.c", - "misc" ++ path.sep_str ++ "wctype.c", "misc" ++ path.sep_str ++ "wdirent.c", "misc" ++ path.sep_str ++ "winbs_uint64.c", "misc" ++ path.sep_str ++ "winbs_ulong.c", @@ -692,35 +688,36 @@ const mingw32_generic_src = [_][]const u8{ "stdio" ++ path.sep_str ++ "lseek64.c", "stdio" ++ path.sep_str ++ "mingw_asprintf.c", "stdio" ++ path.sep_str ++ "mingw_fprintf.c", - "stdio" ++ path.sep_str ++ "mingw_fprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_fwprintf.c", "stdio" ++ path.sep_str ++ "mingw_fscanf.c", "stdio" ++ path.sep_str ++ "mingw_fwscanf.c", "stdio" ++ path.sep_str ++ "mingw_pformat.c", - "stdio" ++ path.sep_str ++ "mingw_pformatw.c", + "stdio" ++ path.sep_str ++ "mingw_sformat.c", + "stdio" ++ path.sep_str ++ "mingw_swformat.c", + "stdio" ++ path.sep_str ++ "mingw_wpformat.c", "stdio" ++ path.sep_str ++ "mingw_printf.c", - "stdio" ++ path.sep_str ++ "mingw_printfw.c", + "stdio" ++ path.sep_str ++ "mingw_wprintf.c", "stdio" ++ path.sep_str ++ "mingw_scanf.c", "stdio" ++ path.sep_str ++ "mingw_snprintf.c", - "stdio" ++ path.sep_str ++ "mingw_snprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_snwprintf.c", "stdio" ++ path.sep_str ++ "mingw_sprintf.c", - "stdio" ++ path.sep_str ++ "mingw_sprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_swprintf.c", "stdio" ++ path.sep_str ++ "mingw_sscanf.c", "stdio" ++ path.sep_str ++ "mingw_swscanf.c", "stdio" ++ path.sep_str ++ "mingw_vasprintf.c", "stdio" ++ path.sep_str ++ "mingw_vfprintf.c", - "stdio" ++ path.sep_str ++ "mingw_vfprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_vfwprintf.c", "stdio" ++ path.sep_str ++ "mingw_vfscanf.c", "stdio" ++ path.sep_str ++ "mingw_vprintf.c", - "stdio" ++ path.sep_str ++ "mingw_vprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_vsscanf.c", + "stdio" ++ path.sep_str ++ "mingw_vwprintf.c", "stdio" ++ path.sep_str ++ "mingw_vsnprintf.c", - "stdio" ++ path.sep_str ++ "mingw_vsnprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_vsnwprintf.c", "stdio" ++ path.sep_str ++ "mingw_vsprintf.c", - "stdio" ++ path.sep_str ++ "mingw_vsprintfw.c", + "stdio" ++ path.sep_str ++ "mingw_vswprintf.c", "stdio" ++ path.sep_str ++ "mingw_wscanf.c", - "stdio" ++ path.sep_str ++ "mingw_wvfscanf.c", - "stdio" ++ path.sep_str ++ "scanf2-argcount-char.c", - "stdio" ++ path.sep_str ++ "scanf2-argcount-wchar.c", - "stdio" ++ path.sep_str ++ "scanf.S", + "stdio" ++ path.sep_str ++ "mingw_vfwscanf.c", + "stdio" ++ path.sep_str ++ "mingw_vswscanf.c", "stdio" ++ path.sep_str ++ "snprintf.c", "stdio" ++ path.sep_str ++ "snwprintf.c", "stdio" ++ path.sep_str ++ "strtok_r.c", @@ -728,20 +725,8 @@ const mingw32_generic_src = [_][]const u8{ "stdio" ++ path.sep_str ++ "ulltoa.c", "stdio" ++ path.sep_str ++ "ulltow.c", "stdio" ++ path.sep_str ++ "vasprintf.c", - "stdio" ++ path.sep_str ++ "vfscanf.c", - "stdio" ++ path.sep_str ++ "vfscanf2.S", - "stdio" ++ path.sep_str ++ "vfwscanf.c", - "stdio" ++ path.sep_str ++ "vfwscanf2.S", - "stdio" ++ path.sep_str ++ "vscanf.c", - "stdio" ++ path.sep_str ++ "vscanf2.S", "stdio" ++ path.sep_str ++ "vsnprintf.c", "stdio" ++ path.sep_str ++ "vsnwprintf.c", - "stdio" ++ path.sep_str ++ "vsscanf.c", - "stdio" ++ path.sep_str ++ "vsscanf2.S", - "stdio" ++ path.sep_str ++ "vswscanf.c", - "stdio" ++ path.sep_str ++ "vswscanf2.S", - "stdio" ++ path.sep_str ++ "vwscanf.c", - "stdio" ++ path.sep_str ++ "vwscanf2.S", "stdio" ++ path.sep_str ++ "wtoll.c", // mingwthrd "libsrc" ++ path.sep_str ++ "mingwthrd_mt.c", @@ -768,6 +753,7 @@ const mingw32_generic_src = [_][]const u8{ "stdio" ++ path.sep_str ++ "ucrt_fprintf.c", "stdio" ++ path.sep_str ++ "ucrt_fscanf.c", "stdio" ++ path.sep_str ++ "ucrt_fwprintf.c", + "stdio" ++ path.sep_str ++ "ucrt_ms_fprintf.c", "stdio" ++ path.sep_str ++ "ucrt_ms_fwprintf.c", "stdio" ++ path.sep_str ++ "ucrt_printf.c", "stdio" ++ path.sep_str ++ "ucrt_scanf.c", @@ -933,6 +919,7 @@ const mingw32_x86_src = [_][]const u8{ "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl_internal.S", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cossin.c", + "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cossinl.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "exp2l.S", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expl.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expm1l.c", From 51b44be9ccc216dd06ab1399b05a36a9771f13fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 24 Feb 2025 12:01:12 +0100 Subject: [PATCH 4/4] std.zig.target: Support new wiaguid library name for MinGW-w64. --- lib/std/zig/target.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/zig/target.zig b/lib/std/zig/target.zig index 107422015b78..f4c6ae688558 100644 --- a/lib/std/zig/target.zig +++ b/lib/std/zig/target.zig @@ -242,6 +242,8 @@ pub fn isLibCLibName(target: std.Target, name: []const u8) bool { return true; if (eqlIgnoreCase(ignore_case, name, "wbemuuid")) return true; + if (eqlIgnoreCase(ignore_case, name, "wiaguid")) + return true; if (eqlIgnoreCase(ignore_case, name, "winpthread")) return true; if (eqlIgnoreCase(ignore_case, name, "wmcodecdspuuid"))