Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2020
- 79 participants
- 771 discussions
03 Sep '20
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/mountmgr.sys/mountmgr.c | 99 ++++++++++++++++++++++++++++++++++++
include/ddk/mountmgr.h | 1 +
2 files changed, 100 insertions(+)
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index d55ca643018..c3b9135ce10 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -731,6 +731,94 @@ static NTSTATUS read_credential( void *buff, SIZE_T insize, SIZE_T outsize, IO_S
iosb->Information = size;
return (size > outsize) ? STATUS_BUFFER_OVERFLOW : STATUS_SUCCESS;
}
+
+static NTSTATUS write_credential( void *buff, SIZE_T insize, SIZE_T outsize, IO_STATUS_BLOCK *iosb )
+{
+ const struct mountmgr_credential *cred = buff;
+ int status, len, len_password = 0;
+ const WCHAR *ptr;
+ SecKeychainItemRef keychain_item;
+ char *targetname, *username = NULL, *password = NULL;
+ SecKeychainAttribute attrs[1];
+ SecKeychainAttributeList attr_list;
+ NTSTATUS ret = STATUS_NO_MEMORY;
+
+ if (!check_credential_string( buff, insize, cred->targetname_size, cred->targetname_offset ) ||
+ !check_credential_string( buff, insize, cred->username_size, cred->username_offset ) ||
+ ((cred->blob_size && cred->blob_size % sizeof(WCHAR)) || cred->blob_offset + cred->blob_size > insize) ||
+ (cred->comment_size && !check_credential_string( buff, insize, cred->comment_size, cred->comment_offset )) ||
+ sizeof(*cred) + cred->targetname_size + cred->username_size + cred->blob_size + cred->comment_size > insize)
+ {
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ ptr = (const WCHAR *)((const char *)cred + cred->targetname_offset);
+ len = WideCharToMultiByte( CP_UTF8, 0, ptr, -1, NULL, 0, NULL, NULL );
+ if (!(targetname = RtlAllocateHeap( GetProcessHeap(), 0, len ))) goto error;
+ WideCharToMultiByte( CP_UTF8, 0, ptr, -1, targetname, len, NULL, NULL );
+
+ ptr = (const WCHAR *)((const char *)cred + cred->username_offset);
+ len = WideCharToMultiByte( CP_UTF8, 0, ptr, -1, NULL, 0, NULL, NULL );
+ if (!(username = RtlAllocateHeap( GetProcessHeap(), 0, len ))) goto error;
+ WideCharToMultiByte( CP_UTF8, 0, ptr, -1, username, len, NULL, NULL );
+
+ if (cred->blob_size)
+ {
+ ptr = (const WCHAR *)((const char *)cred + cred->blob_offset);
+ len_password = WideCharToMultiByte( CP_UTF8, 0, ptr, cred->blob_size / sizeof(WCHAR), NULL, 0, NULL, NULL );
+ if (!(password = RtlAllocateHeap( GetProcessHeap(), 0, len_password ))) goto error;
+ WideCharToMultiByte( CP_UTF8, 0, ptr, cred->blob_size / sizeof(WCHAR), password, len_password, NULL, NULL );
+ }
+
+ TRACE("adding target %s, username %s using Keychain\n", targetname, username );
+ status = SecKeychainAddGenericPassword( NULL, strlen(targetname), targetname, strlen(username), username,
+ len_password, password, &keychain_item );
+ if (status != noErr) ERR( "SecKeychainAddGenericPassword returned %d\n", status );
+ if (status == errSecDuplicateItem)
+ {
+ status = SecKeychainFindGenericPassword( NULL, strlen(targetname), targetname, strlen(username), username, NULL,
+ NULL, &keychain_item );
+ if (status != noErr) ERR( "SecKeychainFindGenericPassword returned %d\n", status );
+ }
+ RtlFreeHeap( GetProcessHeap(), 0, username );
+ RtlFreeHeap( GetProcessHeap(), 0, targetname );
+ if (status != noErr)
+ {
+ RtlFreeHeap( GetProcessHeap(), 0, password );
+ return STATUS_UNSUCCESSFUL;
+ }
+ if (cred->comment_size)
+ {
+ attr_list.count = 1;
+ attr_list.attr = attrs;
+ attrs[0].tag = kSecCommentItemAttr;
+ ptr = (const WCHAR *)((const char *)cred + cred->comment_offset);
+ attrs[0].length = WideCharToMultiByte( CP_UTF8, 0, ptr, -1, NULL, 0, NULL, NULL );
+ if (attrs[0].length) attrs[0].length--;
+ if (!(attrs[0].data = RtlAllocateHeap( GetProcessHeap(), 0, attrs[0].length ))) goto error;
+ WideCharToMultiByte( CP_UTF8, 0, ptr, -1, attrs[0].data, attrs[0].length, NULL, NULL );
+ }
+ else
+ {
+ attr_list.count = 0;
+ attr_list.attr = NULL;
+ }
+ status = SecKeychainItemModifyAttributesAndData( keychain_item, &attr_list, cred->blob_preserve ? 0 : len_password,
+ cred->blob_preserve ? NULL : password );
+
+ if (cred->comment_size) RtlFreeHeap( GetProcessHeap(), 0, attrs[0].data );
+ RtlFreeHeap( GetProcessHeap(), 0, password );
+ /* FIXME: set TargetAlias attribute */
+ CFRelease( keychain_item );
+ if (status != noErr) return STATUS_UNSUCCESSFUL;
+ return STATUS_SUCCESS;
+
+error:
+ RtlFreeHeap( GetProcessHeap(), 0, username );
+ RtlFreeHeap( GetProcessHeap(), 0, targetname );
+ RtlFreeHeap( GetProcessHeap(), 0, password );
+ return ret;
+}
#endif /* __APPLE__ */
/* handler for ioctls on the mount manager device */
@@ -810,6 +898,17 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
irpsp->Parameters.DeviceIoControl.OutputBufferLength,
&irp->IoStatus );
break;
+ case IOCTL_MOUNTMGR_WRITE_CREDENTIAL:
+ if (irpsp->Parameters.DeviceIoControl.InputBufferLength < sizeof(struct mountmgr_credential))
+ {
+ irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
+ break;
+ }
+ irp->IoStatus.u.Status = write_credential( irp->AssociatedIrp.SystemBuffer,
+ irpsp->Parameters.DeviceIoControl.InputBufferLength,
+ irpsp->Parameters.DeviceIoControl.OutputBufferLength,
+ &irp->IoStatus );
+ break;
#endif
default:
FIXME( "ioctl %x not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode );
diff --git a/include/ddk/mountmgr.h b/include/ddk/mountmgr.h
index c3d94078197..162bbf71076 100644
--- a/include/ddk/mountmgr.h
+++ b/include/ddk/mountmgr.h
@@ -75,6 +75,7 @@ struct mountmgr_unix_drive
};
#define IOCTL_MOUNTMGR_READ_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 48, METHOD_BUFFERED, FILE_READ_ACCESS)
+#define IOCTL_MOUNTMGR_WRITE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 49, METHOD_BUFFERED, FILE_WRITE_ACCESS)
struct mountmgr_credential
{
--
2.20.1
1
0
03 Sep '20
Fixes the following error with this sample idl:
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
import "wtypes.idl";
namespace Windows {
[object]
interface IFoo {}
[object]
interface IBar { HRESULT DoBar([in] IFoo *foo); }
}
$ widl -o windows.foo.h windows.foo.idl
windows.foo.idl:13: error: type 'IFoo' not found
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
v3: I included sample idl with each patch to better show the use case
they cover. The whole series then will allow us to declare WinRT
interfaces in the correct idl files, in order to stub several DLLs
that are required for Death Stranding and Flight Simulator to start.
The DLL stubbing would look like the following patches I intend to
send next if this widl series is accepted:
* https://gitlab.com/rbernon/wine/-/commit/478b77d3f8.patch
* https://gitlab.com/rbernon/wine/-/commit/a2d705e0f5.patch
* https://gitlab.com/rbernon/wine/-/commit/cca2304aa1.patch
* https://gitlab.com/rbernon/wine/-/commit/03f0f3a9d1.patch
* https://gitlab.com/rbernon/wine/-/commit/745b9f01e4.patch
tools/widl/parser.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 3ef8d89ba1c..91c5b809bb3 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1959,7 +1959,7 @@ type_t *find_type(const char *name, struct namespace *namespace, int t)
static type_t *find_type_or_error(const char *name, int t)
{
- type_t *type = find_type(name, NULL, t);
+ type_t *type = find_type(name, current_namespace, t);
if (!type) {
error_loc("type '%s' not found\n", name);
return NULL;
--
2.28.0
2
9
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/msxml6.idl | 104 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 1f657a8cde..8fd58cc98e 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -109,6 +109,8 @@ interface ISchemaAny;
interface ISchemaIdentityConstraint;
interface ISchemaNotation;
+interface IXMLHTTPRequest2Callback;
+interface IXMLHTTPRequest3Callback;
cpp_quote("#define DOMDocument DOMDocument2")
cpp_quote("#define CLSID_DOMDocument CLSID_DOMDocument2")
@@ -261,6 +263,35 @@ typedef enum _SCHEMATYPEVARIETY
SCHEMATYPEVARIETY_UNION = 2,
} SCHEMATYPEVARIETY;
+typedef struct tagXHR_COOKIE
+{
+ [ref, string] WCHAR *url;
+ [ref, string] WCHAR *name;
+ [unique, string] WCHAR *value;
+ [unique, string] WCHAR *p3_policy;
+ FILETIME expire_time;
+ DWORD flags;
+} XHR_COOKIE;
+
+typedef [v1_enum] enum _XHR_PROPERTY
+{
+ XHR_PROP_NO_CRED_PROMPT = 0x0,
+ XHR_PROP_NO_AUTH = 0x1,
+ XHR_PROP_TIMEOUT = 0x2,
+ XHR_PROP_NO_DEFAULT_HEADERS = 0x3,
+ XHR_PROP_REPORT_REDIRECT_STATUS = 0x4,
+ XHR_PROP_NO_CACHE = 0x5,
+ XHR_PROP_EXTENDED_ERROR = 0x6,
+ XHR_PROP_QUERY_STRING_UTF8 = 0x7,
+ XHR_PROP_IGNORE_CERT_ERRORS = 0x8,
+} XHR_PROPERTY;
+
+typedef struct tagXHR_CERT
+{
+ DWORD cbCert;
+ [ref, size_is(cbCert)] BYTE *pbCert;
+} XHR_CERT;
+
[
local,
object,
@@ -1265,6 +1296,68 @@ interface IXMLHTTPRequest : IDispatch
HRESULT onreadystatechange([in] IDispatch *pReadyStateSink);
}
+[
+ object,
+ uuid(e5d37dc0-552a-4d52-9cc0-a14d546fbd04),
+ helpstring("IXMLHTTPRequest2 Interface")
+]
+interface IXMLHTTPRequest2 : IUnknown
+{
+ HRESULT Open([in] const WCHAR *method, [in] const WCHAR *url,
+ [in] IXMLHTTPRequest2Callback *callback,
+ [in] const WCHAR *username, [in] const WCHAR *password,
+ [in] const WCHAR *proxy_username, [in] const WCHAR *proxy_password);
+ HRESULT Send([in] ISequentialStream *body, [in] ULONGLONG body_size);
+ HRESULT Abort();
+ HRESULT SetCookie([in] const XHR_COOKIE *cookie, [out] DWORD *state);
+ HRESULT SetCustomResponseStream([in] ISequentialStream *stream);
+ HRESULT SetProperty([in] XHR_PROPERTY property, [in] ULONGLONG value);
+ HRESULT SetRequestHeader([in] const WCHAR *header, [in] const WCHAR *value);
+ HRESULT GetAllResponseHeaders([out] WCHAR **headers);
+ HRESULT GetCookie([in] const WCHAR *url, [in] const WCHAR *name, [in] DWORD dwFlags,
+ [out] ULONG *cookies_count, [out, retval] XHR_COOKIE **cookies);
+ HRESULT GetResponseHeader([in] const WCHAR *header, [out, retval] WCHAR **value);
+}
+
+[
+ object,
+ uuid(a1c9feee-0617-4f23-9d58-8961ea43567c),
+ helpstring("IXMLHttpRequest3 Interface")
+]
+interface IXMLHTTPRequest3 : IXMLHTTPRequest2
+{
+ HRESULT SetClientCertificate([in] DWORD hash_size, [in] const BYTE *hash, [in] const WCHAR *pin);
+};
+
+[
+ object,
+ uuid(A44A9299-E321-40DE-8866-341B41669162),
+ helpstring("IXMLHTTPRequest2Callback Interface"),
+ pointer_default(ref)
+]
+interface IXMLHTTPRequest2Callback : IUnknown
+{
+ HRESULT OnRedirect([in] IXMLHTTPRequest2 *request, [in] const WCHAR* redirect_url);
+ HRESULT OnHeadersAvailable([in] IXMLHTTPRequest2 *request, [in] DWORD status, [in] const WCHAR *status_str);
+ HRESULT OnDataAvailable([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnResponseReceived([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnError([in] IXMLHTTPRequest2 *request, [in] HRESULT error);
+}
+
+[
+ object,
+ uuid(b9e57830-8c6c-4a6f-9c13-47772bb047bb),
+ helpstring("IXMLHttpRequest3Callback Interface")
+]
+interface IXMLHTTPRequest3Callback : IXMLHTTPRequest2Callback
+{
+ HRESULT OnServerCertificateReceived([in] IXMLHTTPRequest3 *request, [in] DWORD errors,
+ [in] DWORD chain_size, [in] const XHR_CERT *chain);
+ HRESULT OnClientCertificateRequested([in] IXMLHTTPRequest3 *request, [in] DWORD issuers_size,
+ [in] const WCHAR **issuers);
+};
+
+
[
object,
dual,
@@ -1554,6 +1647,17 @@ coclass XMLHTTP60
[default] interface IXMLHTTPRequest;
}
+[
+ helpstring("Free Threaded XML HTTP Request class 6.0"),
+ progid("Msxml2.FreeThreadedXMLHTTP60.6.0"),
+ threading(both),
+ uuid(88d96a09-f192-11d4-a65f-0040963251e5)
+]
+coclass FreeThreadedXMLHTTP60
+{
+ [default] interface IXMLHTTPRequest2;
+}
+
[
uuid(afba6b42-5692-48ea-8141-dc517dcf0ef1)
]
--
2.28.0
2
1
Based on semi-stubs by Gijs Vermeulen.
Tested with Power Tab Editor and GraphCalc - the crashes are gone and loading
saved files seems to work correctly.
ifstream::setbuf() is left as a stub - it will need some changes to
filebuf::setbuf() first.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22616
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30014
Signed-off-by: Arkadiusz Hiler <ahiler(a)codeweavers.com>
---
v4:
* add failbit flag to current state instead of overwriting it completely
* test for that behavior
v3:
* constructors now return NULL and print a FIXME in OOM cases
* ifstream_open_ctor and ifstream_open now come with implicit OPENMODE_in
* IOSTATE is now handled in open, close and attach
* test for IOSTATE changes as well as for lack of them
* win32: fixed compilation warnings
* fixed psb/pfb mixup
v2:
* use correct mangled symbols in the comment on top of setmode
* set p_ifstream_dtor and p_ifstream_vbase_dtor in win32 path
dlls/msvcirt/msvcirt.c | 185 ++++++++++++++++++++++++++
dlls/msvcirt/msvcirt.spec | 68 +++++-----
dlls/msvcirt/tests/msvcirt.c | 251 +++++++++++++++++++++++++++++++++++
dlls/msvcrt20/msvcrt20.spec | 68 +++++-----
dlls/msvcrt40/msvcrt40.spec | 68 +++++-----
5 files changed, 538 insertions(+), 102 deletions(-)
diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index f76eaf6d7ac..7e1d9977b78 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -192,6 +192,8 @@ extern const vtable_ptr MSVCP_istream_vtable;
extern const vtable_ptr MSVCP_istream_withassign_vtable;
/* ??_7istrstream@@6B@ */
extern const vtable_ptr MSVCP_istrstream_vtable;
+/* ??_7ifstream@@6B@ */
+extern const vtable_ptr MSVCP_ifstream_vtable;
/* ??_7iostream@@6B@ */
extern const vtable_ptr MSVCP_iostream_vtable;
/* ??_7strstream@@6B@ */
@@ -262,6 +264,8 @@ __ASM_BLOCK_BEGIN(vtables)
VTABLE_ADD_FUNC(istream_vector_dtor));
__ASM_VTABLE(istrstream,
VTABLE_ADD_FUNC(istream_vector_dtor));
+ __ASM_VTABLE(ifstream,
+ VTABLE_ADD_FUNC(istream_vector_dtor));
__ASM_VTABLE(iostream,
VTABLE_ADD_FUNC(iostream_vector_dtor));
__ASM_VTABLE(strstream,
@@ -280,6 +284,7 @@ const int ostream_vbtable[] = {0, VBTABLE_ENTRY(ostream, FIELD_OFFSET(ostream, v
/* ??_8istream@@7B@ */
/* ??_8istream_withassign@@7B@ */
/* ??_8istrstream@@7B@ */
+/* ??_8ifstream@@7B@ */
const int istream_vbtable[] = {0, VBTABLE_ENTRY(istream, FIELD_OFFSET(istream, vbtable), ios)};
/* ??_8iostream@@7Bistream@@@ */
/* ??_8stdiostream@@7Bistream@@@ */
@@ -305,6 +310,8 @@ DEFINE_RTTI_DATA2(istream_withassign, sizeof(istream),
&istream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AVistream_withassign@@")
DEFINE_RTTI_DATA2(istrstream, sizeof(istream),
&istream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AVistrstream@@")
+DEFINE_RTTI_DATA2(ifstream, sizeof(istream),
+ &istream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AVifstream@@")
DEFINE_RTTI_DATA4(iostream, sizeof(iostream),
&istream_rtti_base_descriptor, &ios_rtti_base_descriptor,
&ostream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AViostream@@")
@@ -3113,6 +3120,8 @@ istream* __thiscall istream_copy_ctor(istream *this, const istream *copy, BOOL v
/* ??1istream_withassign@@UEAA(a)XZ */
/* ??1istrstream@@UAE(a)XZ */
/* ??1istrstream@@UEAA(a)XZ */
+/* ??1ifstream@@UAE(a)XZ */
+/* ??1ifstream@@UEAA(a)XZ */
DEFINE_THISCALL_WRAPPER(istream_dtor, 4)
void __thiscall istream_dtor(ios *base)
{
@@ -3152,6 +3161,8 @@ istream* __thiscall istream_assign_sb(istream *this, streambuf *sb)
/* ??4istream_withassign@@QEAAAEAVistream@@AEBV1@@Z */
/* ??4istrstream@@QAEAAV0(a)ABV0@@Z */
/* ??4istrstream@@QEAAAEAV0(a)AEBV0@@Z */
+/* ??4ifstream@@QAEAAV0(a)ABV0@@Z */
+/* ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z */
DEFINE_THISCALL_WRAPPER(istream_assign, 8)
istream* __thiscall istream_assign(istream *this, const istream *rhs)
{
@@ -3164,6 +3175,8 @@ istream* __thiscall istream_assign(istream *this, const istream *rhs)
/* ??_Distream_withassign@@QEAAXXZ */
/* ??_Distrstream@@QAEXXZ */
/* ??_Distrstream@@QEAAXXZ */
+/* ??_Difstream@@QAEXXZ */
+/* ??_Difstream@@QEAAXXZ */
DEFINE_THISCALL_WRAPPER(istream_vbase_dtor, 4)
void __thiscall istream_vbase_dtor(istream *this)
{
@@ -3178,6 +3191,7 @@ void __thiscall istream_vbase_dtor(istream *this)
/* ??_Eistream@@UAEPAXI(a)Z */
/* ??_Eistream_withassign@@UAEPAXI(a)Z */
/* ??_Eistrstream@@UAEPAXI(a)Z */
+/* ??_Eifstream@@UAEPAXI(a)Z */
DEFINE_THISCALL_WRAPPER(istream_vector_dtor, 8)
istream* __thiscall istream_vector_dtor(ios *base, unsigned int flags)
{
@@ -3203,6 +3217,7 @@ istream* __thiscall istream_vector_dtor(ios *base, unsigned int flags)
/* ??_Gistream@@UAEPAXI(a)Z */
/* ??_Gistream_withassign@@UAEPAXI(a)Z */
/* ??_Gistrstream@@UAEPAXI(a)Z */
+/* ??_Gifstream@@UAEPAXI(a)Z */
DEFINE_THISCALL_WRAPPER(istream_scalar_dtor, 8)
istream* __thiscall istream_scalar_dtor(ios *base, unsigned int flags)
{
@@ -4089,6 +4104,175 @@ char* __thiscall istrstream_str(istream *this)
return strstreambuf_str(istrstream_rdbuf(this));
}
+/* ??0ifstream@@QAE(a)ABV0@@Z */
+/* ??0ifstream@@QEAA(a)AEBV0@@Z */
+DEFINE_THISCALL_WRAPPER(ifstream_copy_ctor, 12)
+istream* __thiscall ifstream_copy_ctor(istream *this, const istream *copy, BOOL virt_init)
+{
+ TRACE("(%p %p %d)\n", this, copy, virt_init);
+ istream_withassign_copy_ctor(this, copy, virt_init);
+ istream_get_ios(this)->vtable = &MSVCP_ifstream_vtable;
+ return this;
+}
+
+/* ??0ifstream@@QAE(a)HPADH@Z */
+/* ??0ifstream@@QEAA(a)HPEADH@Z */
+DEFINE_THISCALL_WRAPPER(ifstream_buffer_ctor, 20)
+istream* __thiscall ifstream_buffer_ctor(istream *this, filedesc fd, char *buffer, int length, BOOL virt_init)
+{
+ ios *base;
+ filebuf *fb = MSVCRT_operator_new(sizeof(filebuf));
+
+ TRACE("(%p %d %p %d %d)\n", this, fd, buffer, length, virt_init);
+
+ if (!fb)
+ {
+ FIXME("out of memory\n");
+ return NULL;
+ }
+
+ filebuf_fd_reserve_ctor(fb, fd, buffer, length);
+ istream_sb_ctor(this, &fb->base, virt_init);
+
+ base = istream_get_ios(this);
+ base->vtable = &MSVCP_ifstream_vtable;
+ base->delbuf = 1;
+
+ return this;
+}
+
+/* ??0ifstream@@QAE(a)H@Z */
+/* ??0ifstream@@QEAA(a)H@Z */
+DEFINE_THISCALL_WRAPPER(ifstream_fd_ctor, 12)
+istream* __thiscall ifstream_fd_ctor(istream *this, filedesc fd, BOOL virt_init)
+{
+ ios *base;
+ filebuf *fb = MSVCRT_operator_new(sizeof(filebuf));
+
+ TRACE("(%p %d %d)\n", this, fd, virt_init);
+
+ if (!fb)
+ {
+ FIXME("out of memory\n");
+ return NULL;
+ }
+
+ filebuf_fd_ctor(fb, fd);
+ istream_sb_ctor(this, &fb->base, virt_init);
+
+ base = istream_get_ios(this);
+ base->vtable = &MSVCP_ifstream_vtable;
+ base->delbuf = 1;
+
+ return this;
+}
+
+/* ??0ifstream@@QAE(a)PBDHH@Z */
+/* ??0ifstream@@QEAA(a)PEBDHH@Z */
+DEFINE_THISCALL_WRAPPER(ifstream_open_ctor, 20)
+istream* __thiscall ifstream_open_ctor(istream *this, const char *name, ios_open_mode mode, int protection, BOOL virt_init)
+{
+ ios *base;
+ filebuf *fb = MSVCRT_operator_new(sizeof(filebuf));
+
+ TRACE("(%p %s %d %d %d)\n", this, name, mode, protection, virt_init);
+
+ if (!fb)
+ {
+ FIXME("out of memory\n");
+ return NULL;
+ }
+
+ filebuf_ctor(fb);
+ istream_sb_ctor(this, &fb->base, virt_init);
+ filebuf_open(fb, name, mode|OPENMODE_in, protection);
+
+ base = istream_get_ios(this);
+ base->vtable = &MSVCP_ifstream_vtable;
+ base->delbuf = 1;
+
+ return this;
+}
+
+/* ??0ifstream@@QAE(a)XZ */
+/* ??0ifstream@@QEAA(a)XZ */
+DEFINE_THISCALL_WRAPPER(ifstream_ctor, 8)
+istream* __thiscall ifstream_ctor(istream *this, BOOL virt_init)
+{
+ return ifstream_fd_ctor(this, -1, virt_init);
+}
+
+/* ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ */
+/* ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ */
+DEFINE_THISCALL_WRAPPER(ifstream_rdbuf, 4)
+filebuf* __thiscall ifstream_rdbuf(const istream *this)
+{
+ TRACE("(%p)\n", this);
+ return (filebuf*) istream_get_ios(this)->sb;
+}
+
+/* ?fd(a)ifstream@@QBEHXZ */
+/* ?fd(a)ifstream@@QEBAHXZ */
+DEFINE_THISCALL_WRAPPER(ifstream_fd, 4)
+filedesc __thiscall ifstream_fd(istream *this)
+{
+ TRACE("(%p)\n", this);
+ return filebuf_fd(ifstream_rdbuf(this));
+}
+
+/* ?attach(a)ifstream@@QAEXH(a)Z */
+/* ?attach(a)ifstream@@QEAAXH(a)Z */
+DEFINE_THISCALL_WRAPPER(ifstream_attach, 8)
+void __thiscall ifstream_attach(istream *this, filedesc fd)
+{
+ ios *base = istream_get_ios(this);
+ TRACE("(%p %d)\n", this, fd);
+ if (filebuf_attach(ifstream_rdbuf(this), fd) == NULL)
+ ios_clear(base, base->state | IOSTATE_failbit);
+}
+
+/* ?close(a)ifstream@@QAEXXZ */
+/* ?close(a)ifstream@@QEAAXXZ */
+DEFINE_THISCALL_WRAPPER(ifstream_close, 4)
+void __thiscall ifstream_close(istream *this)
+{
+ ios *base = istream_get_ios(this);
+ TRACE("(%p)\n", this);
+ if (filebuf_close(ifstream_rdbuf(this)) == NULL)
+ ios_clear(base, base->state | IOSTATE_failbit);
+ else
+ ios_clear(base, IOSTATE_goodbit);
+}
+
+/* ?is_open(a)ifstream@@QBEHXZ */
+/* ?is_open(a)ifstream@@QEBAHXZ */
+DEFINE_THISCALL_WRAPPER(ifstream_is_open, 4)
+int __thiscall ifstream_is_open(const istream *this)
+{
+ TRACE("(%p)\n", this);
+ return filebuf_is_open(ifstream_rdbuf(this));
+}
+
+/* ?open(a)ifstream@@QAEXPBDHH(a)Z */
+/* ?open(a)ifstream@@QEAAXPEBDHH(a)Z */
+DEFINE_THISCALL_WRAPPER(ifstream_open, 16)
+void __thiscall ifstream_open(istream *this, const char *name, ios_open_mode mode, int protection)
+{
+ ios *base = istream_get_ios(this);
+ TRACE("(%p %s %d %d)\n", this, name, mode, protection);
+ if (filebuf_open(ifstream_rdbuf(this), name, mode|OPENMODE_in, protection) == NULL)
+ ios_clear(base, base->state | IOSTATE_failbit);
+}
+
+/* ?setmode(a)ifstream@@QAEHH(a)Z */
+/* ?setmode(a)ifstream@@QEAAHH(a)Z */
+DEFINE_THISCALL_WRAPPER(ifstream_setmode, 8)
+int __thiscall ifstream_setmode(istream *this, int mode)
+{
+ TRACE("(%p %d)\n", this, mode);
+ return filebuf_setmode(ifstream_rdbuf(this), mode);
+}
+
static inline ios* iostream_to_ios(const iostream *this)
{
return (ios*)((char*)this + iostream_vbtable_istream[1]);
@@ -4522,6 +4706,7 @@ static void init_io(void *base)
init_istream_rtti(base);
init_istream_withassign_rtti(base);
init_istrstream_rtti(base);
+ init_ifstream_rtti(base);
init_iostream_rtti(base);
init_strstream_rtti(base);
init_stdiostream_rtti(base);
diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec
index f2e875695ef..75ae312b486 100644
--- a/dlls/msvcirt/msvcirt.spec
+++ b/dlls/msvcirt/msvcirt.spec
@@ -26,16 +26,16 @@
@ stub -arch=win64 ??0fstream@@QEAA(a)PEBDHH@Z
@ stub -arch=win32 ??0fstream@@QAE(a)XZ # __thiscall fstream::fstream(void)
@ stub -arch=win64 ??0fstream@@QEAA(a)XZ
-@ stub -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z # __thiscall ifstream::ifstream(class ifstream const &)
-@ stub -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)H@Z # __thiscall ifstream::ifstream(int)
-@ stub -arch=win64 ??0ifstream@@QEAA(a)H@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)HPADH@Z # __thiscall ifstream::ifstream(int,char *,int)
-@ stub -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z # __thiscall ifstream::ifstream(char const *,int,int)
-@ stub -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)XZ # __thiscall ifstream::ifstream(void)
-@ stub -arch=win64 ??0ifstream@@QEAA(a)XZ
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z(ptr ptr long) ifstream_copy_ctor
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z(ptr ptr long) ifstream_copy_ctor
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)H@Z(ptr long long) ifstream_fd_ctor
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)H@Z(ptr long long) ifstream_fd_ctor
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)HPADH@Z(ptr long ptr long long) ifstream_buffer_ctor
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z(ptr long ptr long long) ifstream_buffer_ctor
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z(ptr str long long long) ifstream_open_ctor
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z(ptr str long long long) ifstream_open_ctor
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)XZ(ptr long) ifstream_ctor
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)XZ(ptr long) ifstream_ctor
@ thiscall -arch=win32 ??0ios@@IAE(a)ABV0@@Z(ptr ptr) ios_copy_ctor
@ cdecl -arch=win64 ??0ios@@IEAA(a)AEBV0@@Z(ptr ptr) ios_copy_ctor
@ thiscall -arch=win32 ??0ios@@IAE(a)XZ(ptr) ios_ctor
@@ -138,8 +138,8 @@
@ cdecl -arch=win64 ??1filebuf@@UEAA(a)XZ(ptr) filebuf_dtor
@ stub -arch=win32 ??1fstream@@UAE(a)XZ # virtual __thiscall fstream::~fstream(void)
@ stub -arch=win64 ??1fstream@@UEAA(a)XZ
-@ stub -arch=win32 ??1ifstream@@UAE(a)XZ # virtual __thiscall ifstream::~ifstream(void)
-@ stub -arch=win64 ??1ifstream@@UEAA(a)XZ
+@ thiscall -arch=win32 ??1ifstream@@UAE(a)XZ(ptr) istream_dtor
+@ cdecl -arch=win64 ??1ifstream@@UEAA(a)XZ(ptr) istream_dtor
@ thiscall -arch=win32 ??1ios@@UAE(a)XZ(ptr) ios_dtor
@ cdecl -arch=win64 ??1ios@@UEAA(a)XZ(ptr) ios_dtor
@ thiscall -arch=win32 ??1iostream@@UAE(a)XZ(ptr) iostream_dtor
@@ -178,8 +178,8 @@
@ cdecl -arch=win64 ??4filebuf@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) filebuf_assign
@ stub -arch=win32 ??4fstream@@QAEAAV0(a)AAV0@@Z # class fstream & __thiscall fstream::operator=(class fstream &)
@ stub -arch=win64 ??4fstream@@QEAAAEAV0(a)AEAV0@@Z
-@ stub -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z # class ifstream & __thiscall ifstream::operator=(class ifstream const &)
-@ stub -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z
+@ thiscall -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z(ptr ptr) istream_assign
+@ cdecl -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) istream_assign
@ thiscall -arch=win32 ??4ios@@IAEAAV0(a)ABV0@@Z(ptr ptr) ios_assign
@ cdecl -arch=win64 ??4ios@@IEAAAEAV0(a)AEBV0@@Z(ptr ptr) ios_assign
@ thiscall -arch=win32 ??4iostream@@IAEAAV0(a)AAV0@@Z(ptr ptr) iostream_assign
@@ -305,7 +305,7 @@
@ extern ??_7exception@@6B@ MSVCP_exception_vtable
@ extern ??_7filebuf@@6B@ MSVCP_filebuf_vtable
# @ extern ??_7fstream@@6B@ # const fstream::`vftable'
-# @ extern ??_7ifstream@@6B@ # const ifstream::`vftable'
+@ extern ??_7ifstream@@6B@ MSVCP_ifstream_vtable
@ extern ??_7ios@@6B@ MSVCP_ios_vtable
@ extern ??_7iostream@@6B@ MSVCP_iostream_vtable
@ extern ??_7istream@@6B@ MSVCP_istream_vtable
@@ -323,7 +323,7 @@
@ extern ??_7strstreambuf@@6B@ MSVCP_strstreambuf_vtable
# @ extern ??_8fstream@@7Bistream@@@ # const fstream::`vbtable'{for `istream'}
# @ extern ??_8fstream@@7Bostream@@@ # const fstream::`vbtable'{for `ostream'}
-# @ extern ??_8ifstream@@7B@ # const ifstream::`vbtable'
+@ extern ??_8ifstream@@7B@ istream_vbtable
@ extern ??_8iostream@@7Bistream@@@ iostream_vbtable_istream
@ extern ??_8iostream@@7Bostream@@@ iostream_vbtable_ostream
@ extern ??_8istream@@7B@ istream_vbtable
@@ -339,8 +339,8 @@
@ extern ??_8strstream@@7Bostream@@@ iostream_vbtable_ostream
@ stub -arch=win32 ??_Dfstream@@QAEXXZ # void __thiscall fstream::`vbase destructor'(void)
@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
-@ stub -arch=win32 ??_Difstream@@QAEXXZ # void __thiscall ifstream::`vbase destructor'(void)
-@ stub -arch=win64 ??_Difstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) istream_vbase_dtor
+@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) istream_vbase_dtor
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) iostream_vbase_dtor
@ cdecl -arch=win64 ??_Diostream@@QEAAXXZ(ptr) iostream_vbase_dtor
@ thiscall -arch=win32 ??_Distream@@QAEXXZ(ptr) istream_vbase_dtor
@@ -364,7 +364,7 @@
@ thiscall -arch=win32 ??_Eexception@@UAEPAXI(a)Z(ptr long) MSVCP_exception_vector_dtor
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI(a)Z(ptr long) filebuf_vector_dtor
@ stub -arch=win32 ??_Efstream@@UAEPAXI(a)Z # virtual void * __thiscall fstream::`vector deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Eifstream@@UAEPAXI(a)Z # virtual void * __thiscall ifstream::`vector deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI(a)Z(ptr long) istream_vector_dtor
@ thiscall -arch=win32 ??_Eios@@UAEPAXI(a)Z(ptr long) ios_vector_dtor
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI(a)Z(ptr long) iostream_vector_dtor
@ thiscall -arch=win32 ??_Eistream@@UAEPAXI(a)Z(ptr long) istream_vector_dtor
@@ -383,7 +383,7 @@
@ thiscall -arch=win32 ??_Gexception@@UAEPAXI(a)Z(ptr long) MSVCP_exception_scalar_dtor
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI(a)Z(ptr long) filebuf_scalar_dtor
@ stub -arch=win32 ??_Gfstream@@UAEPAXI(a)Z # virtual void * __thiscall fstream::`scalar deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Gifstream@@UAEPAXI(a)Z # virtual void * __thiscall ifstream::`scalar deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI(a)Z(ptr long) istream_scalar_dtor
@ thiscall -arch=win32 ??_Gios@@UAEPAXI(a)Z(ptr long) ios_scalar_dtor
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI(a)Z(ptr long) iostream_scalar_dtor
@ thiscall -arch=win32 ??_Gistream@@UAEPAXI(a)Z(ptr long) istream_scalar_dtor
@@ -406,8 +406,8 @@
@ cdecl -arch=win64 ?attach(a)filebuf@@QEAAPEAV1(a)H@Z(ptr long) filebuf_attach
@ stub -arch=win32 ?attach(a)fstream@@QAEXH(a)Z # void __thiscall fstream::attach(int)
@ stub -arch=win64 ?attach(a)fstream@@QEAAXH(a)Z
-@ stub -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z # void __thiscall ifstream::attach(int)
-@ stub -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z
+@ thiscall -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z(ptr long) ifstream_attach
+@ cdecl -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z(ptr long) ifstream_attach
@ stub -arch=win32 ?attach(a)ofstream@@QAEXH(a)Z # void __thiscall ofstream::attach(int)
@ stub -arch=win64 ?attach(a)ofstream@@QEAAXH(a)Z
@ thiscall -arch=win32 ?bad(a)ios@@QBEHXZ(ptr) ios_bad
@@ -428,8 +428,8 @@
@ cdecl -arch=win64 ?close(a)filebuf@@QEAAPEAV1(a)XZ(ptr) filebuf_close
@ stub -arch=win32 ?close(a)fstream@@QAEXXZ # void __thiscall fstream::close(void)
@ stub -arch=win64 ?close(a)fstream@@QEAAXXZ
-@ stub -arch=win32 ?close(a)ifstream@@QAEXXZ # void __thiscall ifstream::close(void)
-@ stub -arch=win64 ?close(a)ifstream@@QEAAXXZ
+@ thiscall -arch=win32 ?close(a)ifstream@@QAEXXZ(ptr) ifstream_close
+@ cdecl -arch=win64 ?close(a)ifstream@@QEAAXXZ(ptr) ifstream_close
@ stub -arch=win32 ?close(a)ofstream@@QAEXXZ # void __thiscall ofstream::close(void)
@ stub -arch=win64 ?close(a)ofstream@@QEAAXXZ
@ cdecl -arch=win32 ?clrlock(a)ios@@QAAXXZ(ptr) ios_clrlock
@@ -472,8 +472,8 @@
@ cdecl -arch=win64 ?fd(a)filebuf@@QEBAHXZ(ptr) filebuf_fd
@ stub -arch=win32 ?fd(a)fstream@@QBEHXZ # int __thiscall fstream::fd(void)const
@ stub -arch=win64 ?fd(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?fd(a)ifstream@@QBEHXZ # int __thiscall ifstream::fd(void)const
-@ stub -arch=win64 ?fd(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?fd(a)ifstream@@QBEHXZ(ptr) ifstream_fd
+@ cdecl -arch=win64 ?fd(a)ifstream@@QEBAHXZ(ptr) ifstream_fd
@ stub -arch=win32 ?fd(a)ofstream@@QBEHXZ # int __thiscall ofstream::fd(void)const
@ stub -arch=win64 ?fd(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?fill(a)ios@@QAEDD(a)Z(ptr long) ios_fill_set
@@ -541,8 +541,8 @@
@ cdecl -arch=win64 ?is_open(a)filebuf@@QEBAHXZ(ptr) filebuf_is_open
@ stub -arch=win32 ?is_open(a)fstream@@QBEHXZ # int __thiscall fstream::is_open(void)const
@ stub -arch=win64 ?is_open(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?is_open(a)ifstream@@QBEHXZ # int __thiscall ifstream::is_open(void)const
-@ stub -arch=win64 ?is_open(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?is_open(a)ifstream@@QBEHXZ(ptr) ifstream_is_open
+@ cdecl -arch=win64 ?is_open(a)ifstream@@QEBAHXZ(ptr) ifstream_is_open
@ stub -arch=win32 ?is_open(a)ofstream@@QBEHXZ # int __thiscall ofstream::is_open(void)const
@ stub -arch=win64 ?is_open(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?isfx(a)istream@@QAEXXZ(ptr) istream_isfx
@@ -566,8 +566,8 @@
@ cdecl -arch=win64 ?open(a)filebuf@@QEAAPEAV1(a)PEBDHH@Z(ptr str long long) filebuf_open
@ stub -arch=win32 ?open(a)fstream@@QAEXPBDHH(a)Z # void __thiscall fstream::open(char const *,int,int)
@ stub -arch=win64 ?open(a)fstream@@QEAAXPEBDHH(a)Z
-@ stub -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z # void __thiscall ifstream::open(char const *,int,int)
-@ stub -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z
+@ thiscall -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z(ptr str long long) ifstream_open
+@ cdecl -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z(ptr str long long) ifstream_open
@ stub -arch=win32 ?open(a)ofstream@@QAEXPBDHH(a)Z # void __thiscall ofstream::open(char const *,int,int)
@ stub -arch=win64 ?open(a)ofstream@@QEAAXPEBDHH(a)Z
@ extern ?openprot(a)filebuf@@2HB filebuf_openprot
@@ -615,8 +615,8 @@
@ cdecl -arch=win64 ?pword(a)ios@@QEBAAEAPEAXH(a)Z(ptr long) ios_pword
@ stub -arch=win32 ?rdbuf(a)fstream@@QBEPAVfilebuf@@XZ # class filebuf * __thiscall fstream::rdbuf(void)const
@ stub -arch=win64 ?rdbuf(a)fstream@@QEBAPEAVfilebuf@@XZ
-@ stub -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ # class filebuf * __thiscall ifstream::rdbuf(void)const
-@ stub -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ
+@ thiscall -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ(ptr) ifstream_rdbuf
+@ cdecl -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ(ptr) ifstream_rdbuf
@ thiscall -arch=win32 ?rdbuf(a)ios@@QBEPAVstreambuf@@XZ(ptr) ios_rdbuf
@ cdecl -arch=win64 ?rdbuf(a)ios@@QEBAPEAVstreambuf@@XZ(ptr) ios_rdbuf
@ thiscall -arch=win32 ?rdbuf(a)istrstream@@QBEPAVstrstreambuf@@XZ(ptr) istrstream_rdbuf
@@ -685,8 +685,8 @@
@ cdecl -arch=win64 ?setmode(a)filebuf@@QEAAHH(a)Z(ptr long) filebuf_setmode
@ stub -arch=win32 ?setmode(a)fstream@@QAEHH(a)Z # int __thiscall fstream::setmode(int)
@ stub -arch=win64 ?setmode(a)fstream@@QEAAHH(a)Z
-@ stub -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z # int __thiscall ifstream::setmode(int)
-@ stub -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z
+@ thiscall -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z(ptr long) ifstream_setmode
+@ cdecl -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z(ptr long) ifstream_setmode
@ stub -arch=win32 ?setmode(a)ofstream@@QAEHH(a)Z # int __thiscall ofstream::setmode(int)
@ stub -arch=win64 ?setmode(a)ofstream@@QEAAHH(a)Z
@ thiscall -arch=win32 ?setp(a)streambuf@@IAEXPAD0(a)Z(ptr ptr ptr) streambuf_setp
diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c
index 6440bc0dab7..4f9f859a861 100644
--- a/dlls/msvcirt/tests/msvcirt.c
+++ b/dlls/msvcirt/tests/msvcirt.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
+#include <sys/stat.h>
#include "wine/test.h"
typedef void (*vtable_ptr)(void);
@@ -403,6 +404,22 @@ static void (*__thiscall p_iostream_vbase_dtor)(iostream*);
static iostream* (*__thiscall p_iostream_assign_sb)(iostream*, streambuf*);
static iostream* (*__thiscall p_iostream_assign)(iostream*, const iostream*);
+/* ifstream */
+static istream* (*__thiscall p_ifstream_copy_ctor)(istream*, const istream*, BOOL);
+static istream* (*__thiscall p_ifstream_buffer_ctor)(istream*, filedesc, char*, int, BOOL);
+static istream* (*__thiscall p_ifstream_fd_ctor)(istream*, filedesc fd, BOOL virt_init);
+static istream* (*__thiscall p_ifstream_open_ctor)(istream*, const char *name, ios_open_mode, int, BOOL);
+static istream* (*__thiscall p_ifstream_ctor)(istream*, BOOL);
+static void (*__thiscall p_ifstream_dtor)(ios*);
+static void (*__thiscall p_ifstream_vbase_dtor)(istream*);
+static void (*__thiscall p_ifstream_attach)(istream*, filedesc);
+static void (*__thiscall p_ifstream_close)(istream*);
+static filedesc (*__thiscall p_ifstream_fd)(istream*);
+static int (*__thiscall p_ifstream_is_open)(const istream*);
+static void (*__thiscall p_ifstream_open)(istream*, const char*, ios_open_mode, int);
+static filebuf* (*__thiscall p_ifstream_rdbuf)(const istream*);
+static int (*__thiscall p_ifstream_setmode)(istream*, int);
+
/* strstream */
static iostream* (*__thiscall p_strstream_copy_ctor)(iostream*, const iostream*, BOOL);
static iostream* (*__thiscall p_strstream_buffer_ctor)(iostream*, char*, int, int, BOOL);
@@ -703,6 +720,21 @@ static BOOL init(void)
SET(p_iostream_assign_sb, "??4iostream@@IEAAAEAV0(a)PEAVstreambuf@@@Z");
SET(p_iostream_assign, "??4iostream@@IEAAAEAV0(a)AEAV0@@Z");
+ SET(p_ifstream_copy_ctor, "??0ifstream@@QEAA(a)AEBV0@@Z");
+ SET(p_ifstream_buffer_ctor, "??0ifstream@@QEAA(a)HPEADH@Z");
+ SET(p_ifstream_fd_ctor, "??0ifstream@@QEAA(a)H@Z");
+ SET(p_ifstream_open_ctor, "??0ifstream@@QEAA(a)PEBDHH@Z");
+ SET(p_ifstream_ctor, "??0ifstream@@QEAA(a)XZ");
+ SET(p_ifstream_dtor, "??1ifstream@@UEAA(a)XZ");
+ SET(p_ifstream_vbase_dtor, "??_Difstream@@QEAAXXZ");
+ SET(p_ifstream_attach, "?attach(a)ifstream@@QEAAXH(a)Z");
+ SET(p_ifstream_close, "?close(a)ifstream@@QEAAXXZ");
+ SET(p_ifstream_fd, "?fd(a)ifstream@@QEBAHXZ");
+ SET(p_ifstream_is_open, "?is_open(a)ifstream@@QEBAHXZ");
+ SET(p_ifstream_open, "?open(a)ifstream@@QEAAXPEBDHH(a)Z");
+ SET(p_ifstream_rdbuf, "?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ");
+ SET(p_ifstream_setmode, "?setmode(a)ifstream@@QEAAHH(a)Z");
+
SET(p_strstream_copy_ctor, "??0strstream@@QEAA(a)AEBV0@@Z");
SET(p_strstream_buffer_ctor, "??0strstream@@QEAA(a)PEADHH@Z");
SET(p_strstream_ctor, "??0strstream@@QEAA(a)XZ");
@@ -917,6 +949,21 @@ static BOOL init(void)
SET(p_iostream_assign_sb, "??4iostream@@IAEAAV0(a)PAVstreambuf@@@Z");
SET(p_iostream_assign, "??4iostream@@IAEAAV0(a)AAV0@@Z");
+ SET(p_ifstream_copy_ctor, "??0ifstream@@QAE(a)ABV0@@Z");
+ SET(p_ifstream_fd_ctor, "??0ifstream@@QAE(a)H@Z");
+ SET(p_ifstream_buffer_ctor, "??0ifstream@@QAE(a)HPADH@Z");
+ SET(p_ifstream_open_ctor, "??0ifstream@@QAE(a)PBDHH@Z");
+ SET(p_ifstream_ctor, "??0ifstream@@QAE(a)XZ");
+ SET(p_ifstream_dtor, "??1ifstream@@UAE(a)XZ");
+ SET(p_ifstream_vbase_dtor, "??_Difstream@@QAEXXZ");
+ SET(p_ifstream_attach, "?attach(a)ifstream@@QAEXH(a)Z");
+ SET(p_ifstream_close, "?close(a)ifstream@@QAEXXZ");
+ SET(p_ifstream_fd, "?fd(a)ifstream@@QBEHXZ");
+ SET(p_ifstream_is_open, "?is_open(a)ifstream@@QBEHXZ");
+ SET(p_ifstream_open, "?open(a)ifstream@@QAEXPBDHH(a)Z");
+ SET(p_ifstream_rdbuf, "?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ");
+ SET(p_ifstream_setmode, "?setmode(a)ifstream@@QAEHH(a)Z");
+
SET(p_strstream_copy_ctor, "??0strstream@@QAE(a)ABV0@@Z");
SET(p_strstream_buffer_ctor, "??0strstream@@QAE(a)PADHH@Z");
SET(p_strstream_ctor, "??0strstream@@QAE(a)XZ");
@@ -6720,6 +6767,209 @@ static void test_iostream(void)
ok(ios2.base_ios.do_lock == 0xcdcdcdcd, "expected %d got %d\n", 0xcdcdcdcd, ios2.base_ios.do_lock);
}
+static void test_ifstream(void)
+{
+ const char *filename = "ifstream_test";
+ istream ifs, ifs_copy, *pifs;
+ filebuf *pfb;
+ char buffer[64];
+ char st[8];
+ int fd, ret, i;
+
+ memset(&ifs, 0xab, sizeof(istream));
+
+ /* constructors/destructors */
+ pifs = call_func2(p_ifstream_ctor, &ifs, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(ifs.extract_delim == 0, "expected 0 got %d\n", ifs.extract_delim);
+ ok(ifs.count == 0, "expected 0 got %d\n", ifs.count);
+ ok(ifs.base_ios.sb != NULL, "expected not %p got %p\n", NULL, ifs.base_ios.sb);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(ifs.base_ios.delbuf == 1, "expected 1 got %d\n", ifs.base_ios.delbuf);
+ ok(ifs.base_ios.tie == NULL, "expected %p got %p\n", NULL, ifs.base_ios.tie);
+ ok(ifs.base_ios.flags == FLAGS_skipws, "expected %x got %x\n", FLAGS_skipws, ifs.base_ios.flags);
+ ok(ifs.base_ios.precision == 6, "expected 6 got %d\n", ifs.base_ios.precision);
+ ok(ifs.base_ios.fill == ' ', "expected 32 got %d\n", ifs.base_ios.fill);
+ ok(ifs.base_ios.width == 0, "expected 0 got %d\n", ifs.base_ios.width);
+ ok(ifs.base_ios.do_lock == -1, "expected -1 got %d\n", ifs.base_ios.do_lock);
+ ok(pfb->fd == -1, "wrong fd, expected -1 got %d\n", pfb->fd);
+ ok(pfb->close == 0, "wrong value, expected 0 got %d\n", pfb->close);
+ ok(pfb->base.allocated == 0, "wrong allocate value, expected 0 got %d\n", pfb->base.allocated);
+ ok(pfb->base.unbuffered == 0, "wrong unbuffered value, expected 0 got %d\n", pfb->base.unbuffered);
+ ok(pfb->base.base == NULL, "wrong buffer, expected %p got %p\n", NULL, pfb->base.base);
+ ok(pfb->base.ebuf == NULL, "wrong ebuf, expected %p got %p\n", NULL, pfb->base.ebuf);
+ ok(pfb->fd == -1, "wrong fd, expected 0 got %d\n", pfb->fd);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+
+ pifs = call_func3(p_ifstream_fd_ctor, &ifs, 42, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(ifs.base_ios.delbuf == 1, "expected 1 got %d\n", ifs.base_ios.delbuf);
+ ok(pfb->base.allocated == 0, "wrong allocate value, expected 0 got %d\n", pfb->base.allocated);
+ ok(pfb->base.unbuffered == 0, "wrong unbuffered value, expected 0 got %d\n", pfb->base.unbuffered);
+ ok(pfb->base.base == NULL, "wrong buffer, expected %p got %p\n", NULL, pfb->base.base);
+ ok(pfb->base.ebuf == NULL, "wrong ebuf, expected %p got %p\n", NULL, pfb->base.ebuf);
+ ok(pfb->fd == 42, "wrong fd, expected 42 got %d\n", pfb->fd);
+ ok(pfb->close == 0, "wrong value, expected 0 got %d\n", pfb->close);
+
+ pifs = call_func3(p_ifstream_copy_ctor, &ifs_copy, &ifs, TRUE);
+ pfb = (filebuf*) ifs_copy.base_ios.sb;
+ ok(pifs == &ifs_copy, "wrong return, expected %p got %p\n", &ifs_copy, pifs);
+ ok(ifs_copy.base_ios.sb == ifs.base_ios.sb, "expected shared streambuf\n");
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(ifs_copy.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs_copy.base_ios.state);
+
+ call_func1(p_ifstream_vbase_dtor, &ifs_copy);
+ call_func1(p_ifstream_dtor, &ifs.base_ios);
+
+ pifs = call_func5(p_ifstream_buffer_ctor, &ifs, 53, buffer, ARRAY_SIZE(buffer), TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(ifs.base_ios.delbuf == 1, "expected 1 got %d\n", ifs.base_ios.delbuf);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(pfb->base.allocated == 0, "wrong allocate value, expected 0 got %d\n", pfb->base.allocated);
+ ok(pfb->base.unbuffered == 0, "wrong unbuffered value, expected 0 got %d\n", pfb->base.unbuffered);
+ ok(pfb->base.base == buffer, "wrong buffer, expected %p got %p\n", buffer, pfb->base.base);
+ ok(pfb->base.ebuf == buffer + ARRAY_SIZE(buffer), "wrong ebuf, expected %p got %p\n", buffer + ARRAY_SIZE(buffer), pfb->base.ebuf);
+ ok(pfb->fd == 53, "wrong fd, expected 53 got %d\n", pfb->fd);
+ ok(pfb->close == 0, "wrong value, expected 0 got %d\n", pfb->close);
+ call_func1(p_ifstream_dtor, &ifs.base_ios);
+
+ pifs = call_func5(p_ifstream_buffer_ctor, &ifs, 64, NULL, 0, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(ifs.base_ios.delbuf == 1, "expected 1 got %d\n", ifs.base_ios.delbuf);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(pfb->base.allocated == 0, "wrong allocate value, expected 0 got %d\n", pfb->base.allocated);
+ ok(pfb->base.unbuffered == 1, "wrong unbuffered value, expected 1 got %d\n", pfb->base.unbuffered);
+ ok(pfb->base.base == NULL, "wrong buffer, expected %p got %p\n", NULL, pfb->base.base);
+ ok(pfb->base.ebuf == NULL, "wrong ebuf, expected %p got %p\n", NULL, pfb->base.ebuf);
+ ok(pfb->fd == 64, "wrong fd, expected 64 got %d\n", pfb->fd);
+ ok(pfb->close == 0, "wrong value, expected 0 got %d\n", pfb->close);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+
+ pifs = call_func5(p_ifstream_open_ctor, &ifs, filename, OPENMODE_in, filebuf_openprot, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(ifs.base_ios.delbuf == 1, "expected 1 got %d\n", ifs.base_ios.delbuf);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(pfb->base.allocated == 1, "wrong allocate value, expected 1 got %d\n", pfb->base.allocated);
+ ok(pfb->base.unbuffered == 0, "wrong unbuffered value, expected 0 got %d\n", pfb->base.unbuffered);
+ ok(pfb->base.base != NULL, "wrong buffer, expected not %p got %p\n", NULL, pfb->base.base);
+ ok(pfb->base.ebuf != NULL, "wrong ebuf, expected not %p got %p\n", NULL, pfb->base.ebuf);
+ ok(pfb->fd != -1, "wrong fd, expected not -1 got %d\n", pfb->fd);
+ fd = pfb->fd;
+ ok(pfb->close == 1, "wrong value, expected 1 got %d\n", pfb->close);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+ ok(_close(fd) == -1, "expected ifstream to close opened file\n");
+
+ /* attach */
+ pifs = call_func2(p_ifstream_ctor, &ifs, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ call_func2(p_ifstream_attach, &ifs, 42);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "attaching on vanilla stream set some state bits\n");
+ fd = (int) call_func1(p_ifstream_fd, &ifs);
+ ok(fd == 42, "wrong fd, expected 42 got %d\n", fd);
+ ok(pfb->close == 0, "wrong close value, expected 0 got %d\n", pfb->close);
+ ifs.base_ios.state = IOSTATE_eofbit;
+ call_func2(p_ifstream_attach, &ifs, 53);
+ ok(ifs.base_ios.state == (IOSTATE_eofbit | IOSTATE_failbit), "attaching on already setup stream did not set failbit\n");
+ ok(fd == 42, "wrong fd, expected 42 got %d\n", fd);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+
+ /* fd */
+ pifs = call_func2(p_ifstream_ctor, &ifs, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ fd = (int) call_func1(p_ifstream_fd, &ifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(fd == -1, "wrong fd, expected -1 but got %d\n", fd);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+
+ pifs = call_func5(p_ifstream_open_ctor, &ifs, filename, OPENMODE_in, filebuf_openprot, TRUE);
+ pfb = (filebuf*) ifs.base_ios.sb;
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ fd = (int) call_func1(p_ifstream_fd, &ifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ok(fd == pfb->fd, "wrong fd, expected %d but got %d\n", pfb->fd, fd);
+
+ /* rdbuf */
+ pfb = (filebuf*) call_func1(p_ifstream_rdbuf, &ifs);
+ ok((streambuf*) pfb == ifs.base_ios.sb, "wrong return, expected %p got %p\n", ifs.base_ios.sb, pfb);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+
+ /* setmode */
+ ret = (int) call_func2(p_ifstream_setmode, &ifs, filebuf_binary);
+ ok(ret == filebuf_text, "wrong return, expected %d got %d\n", filebuf_text, ret);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ret = (int) call_func2(p_ifstream_setmode, &ifs, filebuf_binary);
+ ok(ret == filebuf_binary, "wrong return, expected %d got %d\n", filebuf_binary, ret);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ret = (int) call_func2(p_ifstream_setmode, &ifs, filebuf_text);
+ ok(ret == filebuf_binary, "wrong return, expected %d got %d\n", filebuf_binary, ret);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+ ret = (int) call_func2(p_ifstream_setmode, &ifs, 0x9000);
+ ok(ret == -1, "wrong return, expected -1 got %d\n", ret);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, ifs.base_ios.state);
+
+ /* close && is_open */
+ ok((int) call_func1(p_ifstream_is_open, &ifs) == 1, "expected ifstream to be open\n");
+ ifs.base_ios.state = IOSTATE_eofbit | IOSTATE_failbit;
+ call_func1(p_ifstream_close, &ifs);
+ ok(ifs.base_ios.state == IOSTATE_goodbit, "close did not clear state = %d\n", ifs.base_ios.state);
+ ifs.base_ios.state = IOSTATE_eofbit;
+ call_func1(p_ifstream_close, &ifs);
+ ok(ifs.base_ios.state == (IOSTATE_eofbit | IOSTATE_failbit), "close on a closed stream did not set failbit\n");
+ ok((int) call_func1(p_ifstream_is_open, &ifs) == 0, "expected ifstream to not be open\n");
+ ok(_close(fd) == -1, "expected close to close the opened file\n");
+
+ /* open */
+ ifs.base_ios.state = IOSTATE_eofbit;
+ call_func4(p_ifstream_open, &ifs, filename, OPENMODE_in, filebuf_openprot);
+ fd = (int) call_func1(p_ifstream_fd, &ifs);
+ ok(fd != -1, "wrong fd, expected not -1 got %d\n", fd);
+ ok(ifs.base_ios.state == IOSTATE_eofbit, "open did not succeed\n");
+ call_func4(p_ifstream_open, &ifs, filename, OPENMODE_in, filebuf_openprot);
+ ok(ifs.base_ios.state == (IOSTATE_eofbit | IOSTATE_failbit), "second open did not set failbit\n");
+ call_func1(p_ifstream_close, &ifs);
+
+ /* write something we can read later */
+ fd = _open(filename, _O_TRUNC|_O_CREAT|_O_RDWR, _S_IWRITE);
+ ok(fd != -1, "_open failed\n");
+ ok(_write(fd, "test 12", 7) == 7, "_write failed\n");
+ ok(_close(fd) == 0, "_close failed\n");
+
+ /* integration with parent istream - reading */
+ ifs.base_ios.state = IOSTATE_goodbit; /* open doesn't clear the state */
+ call_func4(p_ifstream_open, &ifs, filename, OPENMODE_out, filebuf_openprot); /* make sure that OPENMODE_in is implicit */
+ memset(st, 'A', sizeof(st));
+ st[7] = 0;
+ pifs = call_func2(p_istream_read_str, &ifs, st);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(!strcmp(st, "test"), "expected 'test' got '%s'\n", st);
+
+ i = 12345;
+ pifs = call_func2(p_istream_read_int, pifs, &i);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(i == 12, "expected 12 got %d\n", i);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+
+ /* make sure that OPENMODE_in is implicit with open_ctor */
+ pifs = call_func5(p_ifstream_open_ctor, &ifs, filename, OPENMODE_out, filebuf_openprot, TRUE);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ memset(st, 'A', sizeof(st));
+ st[7] = 0;
+ pifs = call_func2(p_istream_read_str, &ifs, st);
+ ok(pifs == &ifs, "wrong return, expected %p got %p\n", &ifs, pifs);
+ ok(!strcmp(st, "test"), "expected 'test' got '%s'\n", st);
+ call_func1(p_ifstream_vbase_dtor, &ifs);
+ ok(_unlink(filename) == 0, "Couldn't unlink file named '%s'\n", filename);
+}
+
static void test_strstream(void)
{
iostream ios1, ios2, *pios;
@@ -7538,6 +7788,7 @@ START_TEST(msvcirt)
test_istream_withassign();
test_istrstream();
test_iostream();
+ test_ifstream();
test_strstream();
test_stdiostream();
test_Iostream_init();
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index f06a53cc601..96c6c681478 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -20,16 +20,16 @@
@ stub -arch=win64 ??0fstream@@QEAA(a)PEBDHH@Z
@ stub -arch=win32 ??0fstream@@QAE(a)XZ
@ stub -arch=win64 ??0fstream@@QEAA(a)XZ
-@ stub -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)H@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)H@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)HPADH@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)XZ
-@ stub -arch=win64 ??0ifstream@@QEAA(a)XZ
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QAE(a)ABV0@@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QEAA(a)AEBV0@@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)H@Z(ptr long long) msvcirt.??0ifstream@@QAE(a)H@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)H@Z(ptr long long) msvcirt.??0ifstream@@QEAA(a)H@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)HPADH@Z(ptr long ptr long long) msvcirt.??0ifstream@@QAE(a)HPADH@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z(ptr long ptr long long) msvcirt.??0ifstream@@QEAA(a)HPEADH@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z(ptr str long long long) msvcirt.??0ifstream@@QAE(a)PBDHH@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z(ptr str long long long) msvcirt.??0ifstream@@QEAA(a)PEBDHH@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)XZ(ptr long) msvcirt.??0ifstream@@QAE(a)XZ
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)XZ(ptr long) msvcirt.??0ifstream@@QEAA(a)XZ
@ thiscall -arch=win32 ??0ios@@IAE(a)ABV0@@Z(ptr ptr) msvcirt.??0ios@@IAE(a)ABV0@@Z
@ cdecl -arch=win64 ??0ios@@IEAA(a)AEBV0@@Z(ptr ptr) msvcirt.??0ios@@IEAA(a)AEBV0@@Z
@ thiscall -arch=win32 ??0ios@@IAE(a)XZ(ptr) msvcirt.??0ios@@IAE(a)XZ
@@ -124,8 +124,8 @@
@ cdecl -arch=win64 ??1filebuf@@UEAA(a)XZ(ptr) msvcirt.??1filebuf@@UEAA(a)XZ
@ stub -arch=win32 ??1fstream@@UAE(a)XZ
@ stub -arch=win64 ??1fstream@@UEAA(a)XZ
-@ stub -arch=win32 ??1ifstream@@UAE(a)XZ
-@ stub -arch=win64 ??1ifstream@@UEAA(a)XZ
+@ thiscall -arch=win32 ??1ifstream@@UAE(a)XZ(ptr) msvcirt.??1ifstream@@UAE(a)XZ
+@ cdecl -arch=win64 ??1ifstream@@UEAA(a)XZ(ptr) msvcirt.??1ifstream@@UEAA(a)XZ
@ thiscall -arch=win32 ??1ios@@UAE(a)XZ(ptr) msvcirt.??1ios@@UAE(a)XZ
@ cdecl -arch=win64 ??1ios@@UEAA(a)XZ(ptr) msvcirt.??1ios@@UEAA(a)XZ
@ thiscall -arch=win32 ??1iostream@@UAE(a)XZ(ptr) msvcirt.??1iostream@@UAE(a)XZ
@@ -164,8 +164,8 @@
@ cdecl -arch=win64 ??4filebuf@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4filebuf@@QEAAAEAV0(a)AEBV0@@Z
@ stub -arch=win32 ??4fstream@@QAEAAV0(a)AAV0@@Z
@ stub -arch=win64 ??4fstream@@QEAAAEAV0(a)AEAV0@@Z
-@ stub -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z
-@ stub -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z
+@ thiscall -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z(ptr ptr) msvcirt.??4ifstream@@QAEAAV0(a)ABV0@@Z
+@ cdecl -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4ifstream@@QEAAAEAV0(a)AEBV0@@Z
@ thiscall -arch=win32 ??4ios@@IAEAAV0(a)ABV0@@Z(ptr ptr) msvcirt.??4ios@@IAEAAV0(a)ABV0@@Z
@ cdecl -arch=win64 ??4ios@@IEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4ios@@IEAAAEAV0(a)AEBV0@@Z
@ thiscall -arch=win32 ??4iostream@@IAEAAV0(a)AAV0@@Z(ptr ptr) msvcirt.??4iostream@@IAEAAV0(a)AAV0@@Z
@@ -288,7 +288,7 @@
@ cdecl -arch=win64 ??Bios@@QEBAPEAXXZ(ptr) msvcirt.??Bios@@QEBAPEAXXZ
@ extern ??_7filebuf@@6B@ msvcirt.??_7filebuf@@6B@
# @ extern ??_7fstream@@6B@
-# @ extern ??_7ifstream@@6B@
+@ extern ??_7ifstream@@6B@ msvcirt.??_7ifstream@@6B@
@ extern ??_7ios@@6B@ msvcirt.??_7ios@@6B@
@ extern ??_7iostream@@6B@ msvcirt.??_7iostream@@6B@
@ extern ??_7istream@@6B@ msvcirt.??_7istream@@6B@
@@ -305,7 +305,7 @@
@ extern ??_7strstreambuf@@6B@ msvcirt.??_7strstreambuf@@6B@
# @ extern ??_8fstream@@7Bistream@@@
# @ extern ??_8fstream@@7Bostream@@@
-# @ extern ??_8ifstream@@7B@
+@ extern ??_8ifstream@@7B@ msvcirt.??_8ifstream@@7B@
@ extern ??_8iostream@@7Bistream@@@ msvcirt.??_8iostream@@7Bistream@@@
@ extern ??_8iostream@@7Bostream@@@ msvcirt.??_8iostream@@7Bostream@@@
@ extern ??_8istream@@7B@ msvcirt.??_8istream@@7B@
@@ -321,8 +321,8 @@
@ extern ??_8strstream@@7Bostream@@@ msvcirt.??_8strstream@@7Bostream@@@
@ stub -arch=win32 ??_Dfstream@@QAEXXZ
@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
-@ stub -arch=win32 ??_Difstream@@QAEXXZ
-@ stub -arch=win64 ??_Difstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) msvcirt.??_Difstream@@QAEXXZ
+@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) msvcirt.??_Difstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) msvcirt.??_Diostream@@QAEXXZ
@ cdecl -arch=win64 ??_Diostream@@QEAAXXZ(ptr) msvcirt.??_Diostream@@QEAAXXZ
@ thiscall -arch=win32 ??_Distream@@QAEXXZ(ptr) msvcirt.??_Distream@@QAEXXZ
@@ -346,7 +346,7 @@
@ stub -arch=win32 ??_EIostream_init@@QAEPAXI(a)Z
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI(a)Z(ptr long) msvcirt.??_Efilebuf@@UAEPAXI(a)Z
@ stub -arch=win32 ??_Efstream@@UAEPAXI(a)Z
-@ stub -arch=win32 ??_Eifstream@@UAEPAXI(a)Z
+@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eifstream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eios@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eios@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eiostream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eistream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eistream@@UAEPAXI(a)Z
@@ -364,7 +364,7 @@
@ stub -arch=win32 ??_GIostream_init@@QAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gfilebuf@@UAEPAXI(a)Z
@ stub -arch=win32 ??_Gfstream@@UAEPAXI(a)Z
-@ stub -arch=win32 ??_Gifstream@@UAEPAXI(a)Z
+@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gifstream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gios@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gios@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Giostream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gistream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gistream@@UAEPAXI(a)Z
@@ -394,8 +394,8 @@
@ cdecl -arch=win64 ?attach(a)filebuf@@QEAAPEAV1(a)H@Z(ptr long) msvcirt.?attach(a)filebuf@@QEAAPEAV1(a)H@Z
@ stub -arch=win32 ?attach(a)fstream@@QAEXH(a)Z
@ stub -arch=win64 ?attach(a)fstream@@QEAAXH(a)Z
-@ stub -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z
-@ stub -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z
+@ thiscall -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z(ptr long) msvcirt.?attach(a)ifstream@@QAEXH(a)Z
+@ cdecl -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z(ptr long) msvcirt.?attach(a)ifstream@@QEAAXH(a)Z
@ stub -arch=win32 ?attach(a)ofstream@@QAEXH(a)Z
@ stub -arch=win64 ?attach(a)ofstream@@QEAAXH(a)Z
@ thiscall -arch=win32 ?bad(a)ios@@QBEHXZ(ptr) msvcirt.?bad(a)ios@@QBEHXZ
@@ -416,8 +416,8 @@
@ cdecl -arch=win64 ?close(a)filebuf@@QEAAPEAV1(a)XZ(ptr) msvcirt.?close(a)filebuf@@QEAAPEAV1(a)XZ
@ stub -arch=win32 ?close(a)fstream@@QAEXXZ
@ stub -arch=win64 ?close(a)fstream@@QEAAXXZ
-@ stub -arch=win32 ?close(a)ifstream@@QAEXXZ
-@ stub -arch=win64 ?close(a)ifstream@@QEAAXXZ
+@ thiscall -arch=win32 ?close(a)ifstream@@QAEXXZ(ptr) msvcirt.?close(a)ifstream@@QAEXXZ
+@ cdecl -arch=win64 ?close(a)ifstream@@QEAAXXZ(ptr) msvcirt.?close(a)ifstream@@QEAAXXZ
@ stub -arch=win32 ?close(a)ofstream@@QAEXXZ
@ stub -arch=win64 ?close(a)ofstream@@QEAAXXZ
@ cdecl -arch=win32 ?clrlock(a)ios@@QAAXXZ(ptr) msvcirt.?clrlock(a)ios@@QAAXXZ
@@ -460,8 +460,8 @@
@ cdecl -arch=win64 ?fd(a)filebuf@@QEBAHXZ(ptr) msvcirt.?fd(a)filebuf@@QEBAHXZ
@ stub -arch=win32 ?fd(a)fstream@@QBEHXZ
@ stub -arch=win64 ?fd(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?fd(a)ifstream@@QBEHXZ
-@ stub -arch=win64 ?fd(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?fd(a)ifstream@@QBEHXZ(ptr) msvcirt.?fd(a)ifstream@@QBEHXZ
+@ cdecl -arch=win64 ?fd(a)ifstream@@QEBAHXZ(ptr) msvcirt.?fd(a)ifstream@@QEBAHXZ
@ stub -arch=win32 ?fd(a)ofstream@@QBEHXZ
@ stub -arch=win64 ?fd(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?fill(a)ios@@QAEDD(a)Z(ptr long) msvcirt.?fill(a)ios@@QAEDD(a)Z
@@ -527,8 +527,8 @@
@ cdecl -arch=win64 ?is_open(a)filebuf@@QEBAHXZ(ptr) msvcirt.?is_open(a)filebuf@@QEBAHXZ
@ stub -arch=win32 ?is_open(a)fstream@@QBEHXZ
@ stub -arch=win64 ?is_open(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?is_open(a)ifstream@@QBEHXZ
-@ stub -arch=win64 ?is_open(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?is_open(a)ifstream@@QBEHXZ(ptr) msvcirt.?is_open(a)ifstream@@QBEHXZ
+@ cdecl -arch=win64 ?is_open(a)ifstream@@QEBAHXZ(ptr) msvcirt.?is_open(a)ifstream@@QEBAHXZ
@ stub -arch=win32 ?is_open(a)ofstream@@QBEHXZ
@ stub -arch=win64 ?is_open(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?isfx(a)istream@@QAEXXZ(ptr) msvcirt.?isfx(a)istream@@QAEXXZ
@@ -552,8 +552,8 @@
@ cdecl -arch=win64 ?open(a)filebuf@@QEAAPEAV1(a)PEBDHH@Z(ptr str long long) msvcirt.?open(a)filebuf@@QEAAPEAV1(a)PEBDHH@Z
@ stub -arch=win32 ?open(a)fstream@@QAEXPBDHH(a)Z
@ stub -arch=win64 ?open(a)fstream@@QEAAXPEBDHH(a)Z
-@ stub -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z
-@ stub -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z
+@ thiscall -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z(ptr str long long) msvcirt.?open(a)ifstream@@QAEXPBDHH(a)Z
+@ cdecl -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z(ptr str long long) msvcirt.?open(a)ifstream@@QEAAXPEBDHH(a)Z
@ stub -arch=win32 ?open(a)ofstream@@QAEXPBDHH(a)Z
@ stub -arch=win64 ?open(a)ofstream@@QEAAXPEBDHH(a)Z
@ extern ?openprot(a)filebuf@@2HB msvcirt.?openprot(a)filebuf@@2HB
@@ -601,8 +601,8 @@
@ cdecl -arch=win64 ?pword(a)ios@@QEBAAEAPEAXH(a)Z(ptr long) msvcirt.?pword(a)ios@@QEBAAEAPEAXH(a)Z
@ stub -arch=win32 ?rdbuf(a)fstream@@QBEPAVfilebuf@@XZ
@ stub -arch=win64 ?rdbuf(a)fstream@@QEBAPEAVfilebuf@@XZ
-@ stub -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ
-@ stub -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ
+@ thiscall -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ(ptr) msvcirt.?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ
+@ cdecl -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ(ptr) msvcirt.?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ
@ thiscall -arch=win32 ?rdbuf(a)ios@@QBEPAVstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)ios@@QBEPAVstreambuf@@XZ
@ cdecl -arch=win64 ?rdbuf(a)ios@@QEBAPEAVstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)ios@@QEBAPEAVstreambuf@@XZ
@ thiscall -arch=win32 ?rdbuf(a)istrstream@@QBEPAVstrstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)istrstream@@QBEPAVstrstreambuf@@XZ
@@ -673,8 +673,8 @@
@ cdecl -arch=win64 ?setmode(a)filebuf@@QEAAHH(a)Z(ptr long) msvcirt.?setmode(a)filebuf@@QEAAHH(a)Z
@ stub -arch=win32 ?setmode(a)fstream@@QAEHH(a)Z
@ stub -arch=win64 ?setmode(a)fstream@@QEAAHH(a)Z
-@ stub -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z
-@ stub -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z
+@ thiscall -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z(ptr long) msvcirt.?setmode(a)ifstream@@QAEHH(a)Z
+@ cdecl -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z(ptr long) msvcirt.?setmode(a)ifstream@@QEAAHH(a)Z
@ stub -arch=win32 ?setmode(a)ofstream@@QAEHH(a)Z
@ stub -arch=win64 ?setmode(a)ofstream@@QEAAHH(a)Z
@ thiscall -arch=win32 ?setp(a)streambuf@@IAEXPAD0(a)Z(ptr ptr ptr) msvcirt.?setp(a)streambuf@@IAEXPAD0(a)Z
diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec
index f0d966acd7c..6a2c9a7e52e 100644
--- a/dlls/msvcrt40/msvcrt40.spec
+++ b/dlls/msvcrt40/msvcrt40.spec
@@ -38,16 +38,16 @@
@ stub -arch=win64 ??0fstream@@QEAA(a)PEBDHH@Z
@ stub -arch=win32 ??0fstream@@QAE(a)XZ
@ stub -arch=win64 ??0fstream@@QEAA(a)XZ
-@ stub -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)H@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)H@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)HPADH@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z
-@ stub -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z
-@ stub -arch=win32 ??0ifstream@@QAE(a)XZ
-@ stub -arch=win64 ??0ifstream@@QEAA(a)XZ
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)ABV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QAE(a)ABV0@@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)AEBV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QEAA(a)AEBV0@@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)H@Z(ptr long long) msvcirt.??0ifstream@@QAE(a)H@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)H@Z(ptr long long) msvcirt.??0ifstream@@QEAA(a)H@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)HPADH@Z(ptr long ptr long long) msvcirt.??0ifstream@@QAE(a)HPADH@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)HPEADH@Z(ptr long ptr long long) msvcirt.??0ifstream@@QEAA(a)HPEADH@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)PBDHH@Z(ptr str long long long) msvcirt.??0ifstream@@QAE(a)PBDHH@Z
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)PEBDHH@Z(ptr str long long long) msvcirt.??0ifstream@@QEAA(a)PEBDHH@Z
+@ thiscall -arch=win32 ??0ifstream@@QAE(a)XZ(ptr long) msvcirt.??0ifstream@@QAE(a)XZ
+@ cdecl -arch=win64 ??0ifstream@@QEAA(a)XZ(ptr long) msvcirt.??0ifstream@@QEAA(a)XZ
@ thiscall -arch=win32 ??0ios@@IAE(a)ABV0@@Z(ptr ptr) msvcirt.??0ios@@IAE(a)ABV0@@Z
@ cdecl -arch=win64 ??0ios@@IEAA(a)AEBV0@@Z(ptr ptr) msvcirt.??0ios@@IEAA(a)AEBV0@@Z
@ thiscall -arch=win32 ??0ios@@IAE(a)XZ(ptr) msvcirt.??0ios@@IAE(a)XZ
@@ -154,8 +154,8 @@
@ cdecl -arch=win64 ??1filebuf@@UEAA(a)XZ(ptr) msvcirt.??1filebuf@@UEAA(a)XZ
@ stub -arch=win32 ??1fstream@@UAE(a)XZ
@ stub -arch=win64 ??1fstream@@UEAA(a)XZ
-@ stub -arch=win32 ??1ifstream@@UAE(a)XZ
-@ stub -arch=win64 ??1ifstream@@UEAA(a)XZ
+@ thiscall -arch=win32 ??1ifstream@@UAE(a)XZ(ptr) msvcirt.??1ifstream@@UAE(a)XZ
+@ cdecl -arch=win64 ??1ifstream@@UEAA(a)XZ(ptr) msvcirt.??1ifstream@@UEAA(a)XZ
@ thiscall -arch=win32 ??1ios@@UAE(a)XZ(ptr) msvcirt.??1ios@@UAE(a)XZ
@ cdecl -arch=win64 ??1ios@@UEAA(a)XZ(ptr) msvcirt.??1ios@@UEAA(a)XZ
@ thiscall -arch=win32 ??1iostream@@UAE(a)XZ(ptr) msvcirt.??1iostream@@UAE(a)XZ
@@ -206,8 +206,8 @@
@ cdecl -arch=win64 ??4filebuf@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4filebuf@@QEAAAEAV0(a)AEBV0@@Z
@ stub -arch=win32 ??4fstream@@QAEAAV0(a)AAV0@@Z
@ stub -arch=win64 ??4fstream@@QEAAAEAV0(a)AEAV0@@Z
-@ stub -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z
-@ stub -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z
+@ thiscall -arch=win32 ??4ifstream@@QAEAAV0(a)ABV0@@Z(ptr ptr) msvcirt.??4ifstream@@QAEAAV0(a)ABV0@@Z
+@ cdecl -arch=win64 ??4ifstream@@QEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4ifstream@@QEAAAEAV0(a)AEBV0@@Z
@ thiscall -arch=win32 ??4ios@@IAEAAV0(a)ABV0@@Z(ptr ptr) msvcirt.??4ios@@IAEAAV0(a)ABV0@@Z
@ cdecl -arch=win64 ??4ios@@IEAAAEAV0(a)AEBV0@@Z(ptr ptr) msvcirt.??4ios@@IEAAAEAV0(a)AEBV0@@Z
@ thiscall -arch=win32 ??4iostream@@IAEAAV0(a)AAV0@@Z(ptr ptr) msvcirt.??4iostream@@IAEAAV0(a)AAV0@@Z
@@ -340,7 +340,7 @@
@ extern ??_7exception@@6B@ msvcrt.??_7exception@@6B@
@ extern ??_7filebuf@@6B@ msvcirt.??_7filebuf@@6B@
# @ extern ??_7fstream@@6B@
-# @ extern ??_7ifstream@@6B@
+@ extern ??_7ifstream@@6B@ msvcirt.??_7ifstream@@6B@
@ extern ??_7ios@@6B@ msvcirt.??_7ios@@6B@
@ extern ??_7iostream@@6B@ msvcirt.??_7iostream@@6B@
@ extern ??_7istream@@6B@ msvcirt.??_7istream@@6B@
@@ -358,7 +358,7 @@
@ extern ??_7strstreambuf@@6B@ msvcirt.??_7strstreambuf@@6B@
# @ extern ??_8fstream@@7Bistream@@@
# @ extern ??_8fstream@@7Bostream@@@
-# @ extern ??_8ifstream@@7B@
+@ extern ??_8ifstream@@7B@ msvcirt.??_8ifstream@@7B@
@ extern ??_8iostream@@7Bistream@@@ msvcirt.??_8iostream@@7Bistream@@@
@ extern ??_8iostream@@7Bostream@@@ msvcirt.??_8iostream@@7Bostream@@@
@ extern ??_8istream@@7B@ msvcirt.??_8istream@@7B@
@@ -374,8 +374,8 @@
@ extern ??_8strstream@@7Bostream@@@ msvcirt.??_8strstream@@7Bostream@@@
@ stub -arch=win32 ??_Dfstream@@QAEXXZ
@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
-@ stub -arch=win32 ??_Difstream@@QAEXXZ
-@ stub -arch=win64 ??_Difstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) msvcirt.??_Difstream@@QAEXXZ
+@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) msvcirt.??_Difstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) msvcirt.??_Diostream@@QAEXXZ
@ cdecl -arch=win64 ??_Diostream@@QEAAXXZ(ptr) msvcirt.??_Diostream@@QEAAXXZ
@ thiscall -arch=win32 ??_Distream@@QAEXXZ(ptr) msvcirt.??_Distream@@QAEXXZ
@@ -403,7 +403,7 @@
@ thiscall -arch=win32 ??_Eexception@@UAEPAXI(a)Z(ptr long) msvcrt.??_Eexception@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI(a)Z(ptr long) msvcirt.??_Efilebuf@@UAEPAXI(a)Z
@ stub -arch=win32 ??_Efstream@@UAEPAXI(a)Z
-@ stub -arch=win32 ??_Eifstream@@UAEPAXI(a)Z
+@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eifstream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eios@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eios@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eiostream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Eistream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Eistream@@UAEPAXI(a)Z
@@ -426,7 +426,7 @@
@ thiscall -arch=win32 ??_Gexception@@UAEPAXI(a)Z(ptr long) msvcrt.??_Gexception@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gfilebuf@@UAEPAXI(a)Z
@ stub -arch=win32 ??_Gfstream@@UAEPAXI(a)Z
-@ stub -arch=win32 ??_Gifstream@@UAEPAXI(a)Z
+@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gifstream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gios@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gios@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Giostream@@UAEPAXI(a)Z
@ thiscall -arch=win32 ??_Gistream@@UAEPAXI(a)Z(ptr long) msvcirt.??_Gistream@@UAEPAXI(a)Z
@@ -457,8 +457,8 @@
@ cdecl -arch=win64 ?attach(a)filebuf@@QEAAPEAV1(a)H@Z(ptr long) msvcirt.?attach(a)filebuf@@QEAAPEAV1(a)H@Z
@ stub -arch=win32 ?attach(a)fstream@@QAEXH(a)Z
@ stub -arch=win64 ?attach(a)fstream@@QEAAXH(a)Z
-@ stub -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z
-@ stub -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z
+@ thiscall -arch=win32 ?attach(a)ifstream@@QAEXH(a)Z(ptr long) msvcirt.?attach(a)ifstream@@QAEXH(a)Z
+@ cdecl -arch=win64 ?attach(a)ifstream@@QEAAXH(a)Z(ptr long) msvcirt.?attach(a)ifstream@@QEAAXH(a)Z
@ stub -arch=win32 ?attach(a)ofstream@@QAEXH(a)Z
@ stub -arch=win64 ?attach(a)ofstream@@QEAAXH(a)Z
@ thiscall -arch=win32 ?bad(a)ios@@QBEHXZ(ptr) msvcirt.?bad(a)ios@@QBEHXZ
@@ -481,8 +481,8 @@
@ cdecl -arch=win64 ?close(a)filebuf@@QEAAPEAV1(a)XZ(ptr) msvcirt.?close(a)filebuf@@QEAAPEAV1(a)XZ
@ stub -arch=win32 ?close(a)fstream@@QAEXXZ
@ stub -arch=win64 ?close(a)fstream@@QEAAXXZ
-@ stub -arch=win32 ?close(a)ifstream@@QAEXXZ
-@ stub -arch=win64 ?close(a)ifstream@@QEAAXXZ
+@ thiscall -arch=win32 ?close(a)ifstream@@QAEXXZ(ptr) msvcirt.?close(a)ifstream@@QAEXXZ
+@ cdecl -arch=win64 ?close(a)ifstream@@QEAAXXZ(ptr) msvcirt.?close(a)ifstream@@QEAAXXZ
@ stub -arch=win32 ?close(a)ofstream@@QAEXXZ
@ stub -arch=win64 ?close(a)ofstream@@QEAAXXZ
@ cdecl -arch=win32 ?clrlock(a)ios@@QAAXXZ(ptr) msvcirt.?clrlock(a)ios@@QAAXXZ
@@ -525,8 +525,8 @@
@ cdecl -arch=win64 ?fd(a)filebuf@@QEBAHXZ(ptr) msvcirt.?fd(a)filebuf@@QEBAHXZ
@ stub -arch=win32 ?fd(a)fstream@@QBEHXZ
@ stub -arch=win64 ?fd(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?fd(a)ifstream@@QBEHXZ
-@ stub -arch=win64 ?fd(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?fd(a)ifstream@@QBEHXZ(ptr) msvcirt.?fd(a)ifstream@@QBEHXZ
+@ cdecl -arch=win64 ?fd(a)ifstream@@QEBAHXZ(ptr) msvcirt.?fd(a)ifstream@@QEBAHXZ
@ stub -arch=win32 ?fd(a)ofstream@@QBEHXZ
@ stub -arch=win64 ?fd(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?fill(a)ios@@QAEDD(a)Z(ptr long) msvcirt.?fill(a)ios@@QAEDD(a)Z
@@ -594,8 +594,8 @@
@ cdecl -arch=win64 ?is_open(a)filebuf@@QEBAHXZ(ptr) msvcirt.?is_open(a)filebuf@@QEBAHXZ
@ stub -arch=win32 ?is_open(a)fstream@@QBEHXZ
@ stub -arch=win64 ?is_open(a)fstream@@QEBAHXZ
-@ stub -arch=win32 ?is_open(a)ifstream@@QBEHXZ
-@ stub -arch=win64 ?is_open(a)ifstream@@QEBAHXZ
+@ thiscall -arch=win32 ?is_open(a)ifstream@@QBEHXZ(ptr) msvcirt.?is_open(a)ifstream@@QBEHXZ
+@ cdecl -arch=win64 ?is_open(a)ifstream@@QEBAHXZ(ptr) msvcirt.?is_open(a)ifstream@@QEBAHXZ
@ stub -arch=win32 ?is_open(a)ofstream@@QBEHXZ
@ stub -arch=win64 ?is_open(a)ofstream@@QEBAHXZ
@ thiscall -arch=win32 ?isfx(a)istream@@QAEXXZ(ptr) msvcirt.?isfx(a)istream@@QAEXXZ
@@ -621,8 +621,8 @@
@ cdecl -arch=win64 ?open(a)filebuf@@QEAAPEAV1(a)PEBDHH@Z(ptr str long long) msvcirt.?open(a)filebuf@@QEAAPEAV1(a)PEBDHH@Z
@ stub -arch=win32 ?open(a)fstream@@QAEXPBDHH(a)Z
@ stub -arch=win64 ?open(a)fstream@@QEAAXPEBDHH(a)Z
-@ stub -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z
-@ stub -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z
+@ thiscall -arch=win32 ?open(a)ifstream@@QAEXPBDHH(a)Z(ptr str long long) msvcirt.?open(a)ifstream@@QAEXPBDHH(a)Z
+@ cdecl -arch=win64 ?open(a)ifstream@@QEAAXPEBDHH(a)Z(ptr str long long) msvcirt.?open(a)ifstream@@QEAAXPEBDHH(a)Z
@ stub -arch=win32 ?open(a)ofstream@@QAEXPBDHH(a)Z
@ stub -arch=win64 ?open(a)ofstream@@QEAAXPEBDHH(a)Z
@ extern ?openprot(a)filebuf@@2HB msvcirt.?openprot(a)filebuf@@2HB
@@ -672,8 +672,8 @@
@ cdecl -arch=win64 ?raw_name(a)type_info@@QEBAPEBDXZ(ptr) msvcrt.?raw_name(a)type_info@@QEBAPEBDXZ
@ stub -arch=win32 ?rdbuf(a)fstream@@QBEPAVfilebuf@@XZ
@ stub -arch=win64 ?rdbuf(a)fstream@@QEBAPEAVfilebuf@@XZ
-@ stub -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ
-@ stub -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ
+@ thiscall -arch=win32 ?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ(ptr) msvcirt.?rdbuf(a)ifstream@@QBEPAVfilebuf@@XZ
+@ cdecl -arch=win64 ?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ(ptr) msvcirt.?rdbuf(a)ifstream@@QEBAPEAVfilebuf@@XZ
@ thiscall -arch=win32 ?rdbuf(a)ios@@QBEPAVstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)ios@@QBEPAVstreambuf@@XZ
@ cdecl -arch=win64 ?rdbuf(a)ios@@QEBAPEAVstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)ios@@QEBAPEAVstreambuf@@XZ
@ thiscall -arch=win32 ?rdbuf(a)istrstream@@QBEPAVstrstreambuf@@XZ(ptr) msvcirt.?rdbuf(a)istrstream@@QBEPAVstrstreambuf@@XZ
@@ -745,8 +745,8 @@
@ cdecl -arch=win64 ?setmode(a)filebuf@@QEAAHH(a)Z(ptr long) msvcirt.?setmode(a)filebuf@@QEAAHH(a)Z
@ stub -arch=win32 ?setmode(a)fstream@@QAEHH(a)Z
@ stub -arch=win64 ?setmode(a)fstream@@QEAAHH(a)Z
-@ stub -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z
-@ stub -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z
+@ thiscall -arch=win32 ?setmode(a)ifstream@@QAEHH(a)Z(ptr long) msvcirt.?setmode(a)ifstream@@QAEHH(a)Z
+@ cdecl -arch=win64 ?setmode(a)ifstream@@QEAAHH(a)Z(ptr long) msvcirt.?setmode(a)ifstream@@QEAAHH(a)Z
@ stub -arch=win32 ?setmode(a)ofstream@@QAEHH(a)Z
@ stub -arch=win64 ?setmode(a)ofstream@@QEAAHH(a)Z
@ thiscall -arch=win32 ?setp(a)streambuf@@IAEXPAD0(a)Z(ptr ptr ptr) msvcirt.?setp(a)streambuf@@IAEXPAD0(a)Z
--
2.28.0
2
1
[PATCH v2 3/4] include: Remove interfaces already define in msxml6.idl
by Alistair Leslie-Hughes 03 Sep '20
by Alistair Leslie-Hughes 03 Sep '20
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/msxml2.idl | 109 ---------------------------------------------
1 file changed, 109 deletions(-)
diff --git a/include/msxml2.idl b/include/msxml2.idl
index cfafc42133..a2d72d2063 100644
--- a/include/msxml2.idl
+++ b/include/msxml2.idl
@@ -1605,15 +1605,6 @@ coclass FreeThreadedDOMDocument40
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(88d96a06-f192-11d4-a65f-0040963251e5),
-]
-coclass FreeThreadedDOMDocument60
-{
- [default] interface IXMLDOMDocument3;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("Free threaded XML DOM Document"),
progid("Msxml2.FreeThreadedDOMDocument"),
@@ -1655,14 +1646,6 @@ coclass XMLHTTP40
[default] interface IXMLHTTPRequest;
}
-[
- uuid(88d96a0a-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLHTTP60
-{
- [default] interface IXMLHTTPRequest;
-}
-
[
helpstring("XML HTTP"),
progid("Msxml2.XMLHTTP"),
@@ -1695,14 +1678,6 @@ coclass ServerXMLHTTP40
[default] interface IServerXMLHTTPRequest2;
}
-[
- uuid(88d96a0b-f192-11d4-a65f-0040963251e5)
-]
-coclass ServerXMLHTTP60
-{
- [default] interface IServerXMLHTTPRequest2;
-}
-
[
helpstring("Server XML HTTP"),
progid("Msxml2.ServerXMLHTTP"),
@@ -1743,14 +1718,6 @@ coclass XMLSchemaCache40
[default] interface IXMLDOMSchemaCollection2;
}
-[
- uuid(88d96a07-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLSchemaCache60
-{
- [default] interface IXMLDOMSchemaCollection2;
-}
-
[
helpstring("XML Schema Cache"),
progid("Msxml2.XMLSchemaCache"),
@@ -1791,14 +1758,6 @@ coclass XSLTemplate40
[default] interface IXSLTemplate;
}
-[
- uuid(88d96a08-f192-11d4-a65f-0040963251e5)
-]
-coclass XSLTemplate60
-{
- [default] interface IXSLTemplate;
-}
-
[
helpstring("XSL Template"),
progid("Msxml2.XSLTemplate"),
@@ -3290,15 +3249,6 @@ coclass SAXXMLReader40
interface ISAXXMLReader;
}
-[
- uuid(88d96a0c-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXXMLReader60
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
-}
-
[
helpstring("SAX XML Reader"),
progid("Msxml2.SAXXMLReader"),
@@ -3373,26 +3323,6 @@ coclass MXHTMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a10-f192-11d4-a65f-0040963251e5)
-]
-coclass MXHTMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter 3.0"),
progid("Msxml2.MXXMLWriter.3.0"),
@@ -3437,26 +3367,6 @@ coclass MXXMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a0f-f192-11d4-a65f-0040963251e5)
-]
-coclass MXXMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter"),
progid("Msxml2.MXXMLWriter"),
@@ -3499,15 +3409,6 @@ coclass MXNamespaceManager40
interface IMXNamespaceManager;
}
-[
- uuid(88d96a11-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager60
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
[
helpstring("SAXAttributes 3.0"),
progid("Msxml2.SAXAttributes.3.0"),
@@ -3532,16 +3433,6 @@ coclass SAXAttributes40
interface ISAXAttributes;
}
-[
- uuid(88d96a0e-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXAttributes60
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
[
helpstring("SAXAttributes"),
progid("Msxml2.SAXAttributes"),
--
2.28.0
1
0
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/msxml3/tests/saxreader.c | 4 ++--
dlls/msxml3/tests/schema.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index 986f429cc1..5c5fa8075d 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -28,8 +28,8 @@
#include "windows.h"
#include "ole2.h"
-#include "msxml2.h"
-#include "msxml2did.h"
+#include "msxml6.h"
+#include "msxml6did.h"
#include "ocidl.h"
#include "dispex.h"
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
index 4637d62f8b..fc0329bd10 100644
--- a/dlls/msxml3/tests/schema.c
+++ b/dlls/msxml3/tests/schema.c
@@ -26,9 +26,9 @@
#include "initguid.h"
#include "windows.h"
#include "ole2.h"
-#include "msxml2.h"
+#include "msxml6.h"
#undef CLSID_DOMDocument
-#include "msxml2did.h"
+#include "msxml6did.h"
#include "dispex.h"
#include "cguid.h"
--
2.28.0
1
0
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/msxml3/factory.c | 2 +-
dlls/msxml3/uuid.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index 445cfbf730..3be974c58a 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -34,7 +34,7 @@
#include "winuser.h"
#include "ole2.h"
#include "msxml.h"
-#include "msxml2.h"
+#include "msxml6.h"
#include "xmlparser.h"
/* undef the #define in msxml2 so that we can access the v.2 version
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
index 4abbe5e476..7403b27c72 100644
--- a/dlls/msxml3/uuid.c
+++ b/dlls/msxml3/uuid.c
@@ -39,7 +39,7 @@
/* Now we can initialize the rest of the uuids */
#include "initguid.h"
-#include "msxml2.h"
+#include "msxml6.h"
/*
* Note that because of a #define in msxml2.h, we end up initializing
--
2.28.0
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/combase/apartment.c | 12 ++++--------
dlls/combase/marshal.c | 20 ++++++++------------
dlls/combase/stubmanager.c | 28 ++++++++--------------------
3 files changed, 20 insertions(+), 40 deletions(-)
diff --git a/dlls/combase/apartment.c b/dlls/combase/apartment.c
index 125eaff1429..5fbec944eb0 100644
--- a/dlls/combase/apartment.c
+++ b/dlls/combase/apartment.c
@@ -629,13 +629,11 @@ struct apartment * apartment_get_current_or_mta(void)
/* The given OXID must be local to this process */
struct apartment * apartment_findfromoxid(OXID oxid)
{
- struct apartment *result = NULL;
- struct list *cursor;
+ struct apartment *result = NULL, *apt;
EnterCriticalSection(&apt_cs);
- LIST_FOR_EACH( cursor, &apts )
+ LIST_FOR_EACH_ENTRY(apt, &apts, struct apartment, entry)
{
- struct apartment *apt = LIST_ENTRY( cursor, struct apartment, entry );
if (apt->oxid == oxid)
{
result = apt;
@@ -653,13 +651,11 @@ struct apartment * apartment_findfromoxid(OXID oxid)
* is no longer required. */
struct apartment * apartment_findfromtid(DWORD tid)
{
- struct apartment *result = NULL;
- struct list *cursor;
+ struct apartment *result = NULL, *apt;
EnterCriticalSection(&apt_cs);
- LIST_FOR_EACH( cursor, &apts )
+ LIST_FOR_EACH_ENTRY(apt, &apts, struct apartment, entry)
{
- struct apartment *apt = LIST_ENTRY( cursor, struct apartment, entry );
if (apt->tid == tid)
{
result = apt;
diff --git a/dlls/combase/marshal.c b/dlls/combase/marshal.c
index bcc78132651..bdfb44bffac 100644
--- a/dlls/combase/marshal.c
+++ b/dlls/combase/marshal.c
@@ -1803,12 +1803,11 @@ static HRESULT proxy_manager_create_ifproxy(
static HRESULT proxy_manager_find_ifproxy(struct proxy_manager * This, REFIID riid, struct ifproxy ** ifproxy_found)
{
HRESULT hr = E_NOINTERFACE; /* assume not found */
- struct list * cursor;
+ struct ifproxy *ifproxy;
EnterCriticalSection(&This->cs);
- LIST_FOR_EACH(cursor, &This->interfaces)
+ LIST_FOR_EACH_ENTRY(ifproxy, &This->interfaces, struct ifproxy, entry)
{
- struct ifproxy * ifproxy = LIST_ENTRY(cursor, struct ifproxy, entry);
if (IsEqualIID(riid, &ifproxy->iid))
{
*ifproxy_found = ifproxy;
@@ -1823,7 +1822,7 @@ static HRESULT proxy_manager_find_ifproxy(struct proxy_manager * This, REFIID ri
static void proxy_manager_disconnect(struct proxy_manager * This)
{
- struct list * cursor;
+ struct ifproxy *ifproxy;
TRACE("oxid = %s, oid = %s\n", wine_dbgstr_longlong(This->oxid),
wine_dbgstr_longlong(This->oid));
@@ -1836,9 +1835,8 @@ static void proxy_manager_disconnect(struct proxy_manager * This)
* working */
if (!(This->sorflags & SORFP_NOLIFETIMEMGMT))
{
- LIST_FOR_EACH(cursor, &This->interfaces)
+ LIST_FOR_EACH_ENTRY(ifproxy, &This->interfaces, struct ifproxy, entry)
{
- struct ifproxy * ifproxy = LIST_ENTRY(cursor, struct ifproxy, entry);
ifproxy_disconnect(ifproxy);
}
}
@@ -1963,13 +1961,12 @@ static void proxy_manager_destroy(struct proxy_manager * This)
* reference to the proxy_manager when the object is no longer used. */
static BOOL find_proxy_manager(struct apartment * apt, OXID oxid, OID oid, struct proxy_manager ** proxy_found)
{
+ struct proxy_manager *proxy;
BOOL found = FALSE;
- struct list * cursor;
EnterCriticalSection(&apt->cs);
- LIST_FOR_EACH(cursor, &apt->proxies)
+ LIST_FOR_EACH_ENTRY(proxy, &apt->proxies, struct proxy_manager, entry)
{
- struct proxy_manager * proxy = LIST_ENTRY(cursor, struct proxy_manager, entry);
if ((oxid == proxy->oxid) && (oid == proxy->oid))
{
/* be careful of a race with ClientIdentity_Release, which would
@@ -1989,11 +1986,10 @@ static BOOL find_proxy_manager(struct apartment * apt, OXID oxid, OID oid, struc
HRESULT apartment_disconnectproxies(struct apartment *apt)
{
- struct list * cursor;
+ struct proxy_manager *proxy;
- LIST_FOR_EACH(cursor, &apt->proxies)
+ LIST_FOR_EACH_ENTRY(proxy, &apt->proxies, struct proxy_manager, entry)
{
- struct proxy_manager * proxy = LIST_ENTRY(cursor, struct proxy_manager, entry);
proxy_manager_disconnect(proxy);
}
diff --git a/dlls/combase/stubmanager.c b/dlls/combase/stubmanager.c
index 16b8bb35d00..e9f20962e3b 100644
--- a/dlls/combase/stubmanager.c
+++ b/dlls/combase/stubmanager.c
@@ -137,14 +137,11 @@ static void stub_manager_delete_ifstub(struct stub_manager *m, struct ifstub *if
static struct ifstub *stub_manager_ipid_to_ifstub(struct stub_manager *m, const IPID *ipid)
{
- struct list *cursor;
- struct ifstub *result = NULL;
+ struct ifstub *result = NULL, *ifstub;
EnterCriticalSection(&m->lock);
- LIST_FOR_EACH( cursor, &m->ifstubs )
+ LIST_FOR_EACH_ENTRY(ifstub, &m->ifstubs, struct ifstub, entry)
{
- struct ifstub *ifstub = LIST_ENTRY( cursor, struct ifstub, entry );
-
if (IsEqualGUID(ipid, &ifstub->ipid))
{
result = ifstub;
@@ -337,8 +334,7 @@ ULONG stub_manager_int_release(struct stub_manager *m)
* it must also call release on the stub manager when it is no longer needed */
struct stub_manager * get_stub_manager_from_object(struct apartment *apt, IUnknown *obj, BOOL alloc)
{
- struct stub_manager *result = NULL;
- struct list *cursor;
+ struct stub_manager *result = NULL, *m;
IUnknown *object;
HRESULT hres;
@@ -350,10 +346,8 @@ struct stub_manager * get_stub_manager_from_object(struct apartment *apt, IUnkno
}
EnterCriticalSection(&apt->cs);
- LIST_FOR_EACH(cursor, &apt->stubmgrs)
+ LIST_FOR_EACH_ENTRY(m, &apt->stubmgrs, struct stub_manager, entry)
{
- struct stub_manager *m = LIST_ENTRY( cursor, struct stub_manager, entry );
-
if (m->object == object)
{
result = m;
@@ -386,14 +380,11 @@ struct stub_manager * get_stub_manager_from_object(struct apartment *apt, IUnkno
* it must also call release on the stub manager when it is no longer needed */
struct stub_manager * get_stub_manager(struct apartment *apt, OID oid)
{
- struct stub_manager *result = NULL;
- struct list *cursor;
+ struct stub_manager *result = NULL, *m;
EnterCriticalSection(&apt->cs);
- LIST_FOR_EACH(cursor, &apt->stubmgrs)
+ LIST_FOR_EACH_ENTRY(m, &apt->stubmgrs, struct stub_manager, entry)
{
- struct stub_manager *m = LIST_ENTRY(cursor, struct stub_manager, entry);
-
if (m->oid == oid)
{
result = m;
@@ -480,14 +471,11 @@ ULONG stub_manager_ext_release(struct stub_manager *m, ULONG refs, BOOL tablewea
* it must also call release on the stub manager when it is no longer needed */
static struct stub_manager *get_stub_manager_from_ipid(struct apartment *apt, const IPID *ipid, struct ifstub **ifstub)
{
- struct stub_manager *result = NULL;
- struct list *cursor;
+ struct stub_manager *result = NULL, *m;
EnterCriticalSection(&apt->cs);
- LIST_FOR_EACH(cursor, &apt->stubmgrs)
+ LIST_FOR_EACH_ENTRY(m, &apt->stubmgrs, struct stub_manager, entry)
{
- struct stub_manager *m = LIST_ENTRY(cursor, struct stub_manager, entry);
-
if ((*ifstub = stub_manager_ipid_to_ifstub(m, ipid)))
{
result = m;
--
2.28.0
2
1
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/msxml6.idl | 104 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 1f657a8cde..6e99b36060 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -109,6 +109,8 @@ interface ISchemaAny;
interface ISchemaIdentityConstraint;
interface ISchemaNotation;
+interface IXMLHTTPRequest2Callback;
+interface IXMLHTTPRequest3Callback;
cpp_quote("#define DOMDocument DOMDocument2")
cpp_quote("#define CLSID_DOMDocument CLSID_DOMDocument2")
@@ -261,6 +263,35 @@ typedef enum _SCHEMATYPEVARIETY
SCHEMATYPEVARIETY_UNION = 2,
} SCHEMATYPEVARIETY;
+typedef struct tagXHR_COOKIE
+{
+ WCHAR *url;
+ WCHAR *name;
+ WCHAR *value;
+ WCHAR *p3_policy;
+ FILETIME expire_time;
+ DWORD flags;
+} XHR_COOKIE;
+
+typedef [v1_enum] enum _XHR_PROPERTY
+{
+ XHR_PROP_NO_CRED_PROMPT = 0x0,
+ XHR_PROP_NO_AUTH = 0x1,
+ XHR_PROP_TIMEOUT = 0x2,
+ XHR_PROP_NO_DEFAULT_HEADERS = 0x3,
+ XHR_PROP_REPORT_REDIRECT_STATUS = 0x4,
+ XHR_PROP_NO_CACHE = 0x5,
+ XHR_PROP_EXTENDED_ERROR = 0x6,
+ XHR_PROP_QUERY_STRING_UTF8 = 0x7,
+ XHR_PROP_IGNORE_CERT_ERRORS = 0x8,
+} XHR_PROPERTY;
+
+typedef struct tagXHR_CERT
+{
+ DWORD cbCert;
+ BYTE *pbCert;
+} XHR_CERT;
+
[
local,
object,
@@ -1265,6 +1296,68 @@ interface IXMLHTTPRequest : IDispatch
HRESULT onreadystatechange([in] IDispatch *pReadyStateSink);
}
+[
+ object,
+ uuid(e5d37dc0-552a-4d52-9cc0-a14d546fbd04),
+ helpstring("IXMLHTTPRequest2 Interface")
+]
+interface IXMLHTTPRequest2 : IUnknown
+{
+ HRESULT Open([in] const WCHAR *method, [in] const WCHAR *url,
+ [in] IXMLHTTPRequest2Callback *callback,
+ [in] const WCHAR *username, [in] const WCHAR *password,
+ [in] const WCHAR *proxy_username, [in] const WCHAR *proxy_password);
+ HRESULT Send([in] ISequentialStream *body, [in] ULONGLONG body_size);
+ HRESULT Abort();
+ HRESULT SetCookie([in] const XHR_COOKIE *cookie, [out] DWORD *state);
+ HRESULT SetCustomResponseStream([in] ISequentialStream *stream);
+ HRESULT SetProperty([in] XHR_PROPERTY property, [in] ULONGLONG value);
+ HRESULT SetRequestHeader([in] const WCHAR *header, [in] const WCHAR *value);
+ HRESULT GetAllResponseHeaders([out] WCHAR **headers);
+ HRESULT GetCookie([in] const WCHAR *url, [in] const WCHAR *name, [in] DWORD dwFlags,
+ [out] ULONG *cookies_count, [out, retval] XHR_COOKIE **cookies);
+ HRESULT GetResponseHeader([in] const WCHAR *header, [out, retval] WCHAR **value);
+}
+
+[
+ object,
+ uuid(a1c9feee-0617-4f23-9d58-8961ea43567c),
+ helpstring("IXMLHttpRequest3 Interface")
+]
+interface IXMLHTTPRequest3 : IXMLHTTPRequest2
+{
+ HRESULT SetClientCertificate([in] DWORD hash_size, [in] const BYTE *hash, [in] const WCHAR *pin);
+};
+
+[
+ object,
+ uuid(A44A9299-E321-40DE-8866-341B41669162),
+ helpstring("IXMLHTTPRequest2Callback Interface"),
+ pointer_default(ref)
+]
+interface IXMLHTTPRequest2Callback : IUnknown
+{
+ HRESULT OnRedirect([in] IXMLHTTPRequest2 *request, [in] const WCHAR* redirect_url);
+ HRESULT OnHeadersAvailable([in] IXMLHTTPRequest2 *request, [in] DWORD status, [in] const WCHAR *status_str);
+ HRESULT OnDataAvailable([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnResponseReceived([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnError([in] IXMLHTTPRequest2 *request, [in] HRESULT error);
+}
+
+[
+ object,
+ uuid(b9e57830-8c6c-4a6f-9c13-47772bb047bb),
+ helpstring("IXMLHttpRequest3Callback Interface")
+]
+interface IXMLHTTPRequest3Callback : IXMLHTTPRequest2Callback
+{
+ HRESULT OnServerCertificateReceived([in] IXMLHTTPRequest3 *request, [in] DWORD errors,
+ [in] DWORD chain_size, [in] const XHR_CERT *chain);
+ HRESULT OnClientCertificateRequested([in] IXMLHTTPRequest3 *request, [in] DWORD issuers_size,
+ [in] const WCHAR **issuers);
+};
+
+
[
object,
dual,
@@ -1554,6 +1647,17 @@ coclass XMLHTTP60
[default] interface IXMLHTTPRequest;
}
+[
+ helpstring("Free Threaded XML HTTP Request class 6.0"),
+ progid("Msxml2.FreeThreadedXMLHTTP60.6.0"),
+ threading(both),
+ uuid(88d96a09-f192-11d4-a65f-0040963251e5)
+]
+coclass FreeThreadedXMLHTTP60
+{
+ [default] interface IXMLHTTPRequest2;
+}
+
[
uuid(afba6b42-5692-48ea-8141-dc517dcf0ef1)
]
--
2.28.0
2
1
[PATCH 3/4] include: Remove interfaces already define in msxml6.idl
by Alistair Leslie-Hughes 03 Sep '20
by Alistair Leslie-Hughes 03 Sep '20
03 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/msxml2.idl | 109 ---------------------------------------------
1 file changed, 109 deletions(-)
diff --git a/include/msxml2.idl b/include/msxml2.idl
index cfafc42133..a2d72d2063 100644
--- a/include/msxml2.idl
+++ b/include/msxml2.idl
@@ -1605,15 +1605,6 @@ coclass FreeThreadedDOMDocument40
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(88d96a06-f192-11d4-a65f-0040963251e5),
-]
-coclass FreeThreadedDOMDocument60
-{
- [default] interface IXMLDOMDocument3;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("Free threaded XML DOM Document"),
progid("Msxml2.FreeThreadedDOMDocument"),
@@ -1655,14 +1646,6 @@ coclass XMLHTTP40
[default] interface IXMLHTTPRequest;
}
-[
- uuid(88d96a0a-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLHTTP60
-{
- [default] interface IXMLHTTPRequest;
-}
-
[
helpstring("XML HTTP"),
progid("Msxml2.XMLHTTP"),
@@ -1695,14 +1678,6 @@ coclass ServerXMLHTTP40
[default] interface IServerXMLHTTPRequest2;
}
-[
- uuid(88d96a0b-f192-11d4-a65f-0040963251e5)
-]
-coclass ServerXMLHTTP60
-{
- [default] interface IServerXMLHTTPRequest2;
-}
-
[
helpstring("Server XML HTTP"),
progid("Msxml2.ServerXMLHTTP"),
@@ -1743,14 +1718,6 @@ coclass XMLSchemaCache40
[default] interface IXMLDOMSchemaCollection2;
}
-[
- uuid(88d96a07-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLSchemaCache60
-{
- [default] interface IXMLDOMSchemaCollection2;
-}
-
[
helpstring("XML Schema Cache"),
progid("Msxml2.XMLSchemaCache"),
@@ -1791,14 +1758,6 @@ coclass XSLTemplate40
[default] interface IXSLTemplate;
}
-[
- uuid(88d96a08-f192-11d4-a65f-0040963251e5)
-]
-coclass XSLTemplate60
-{
- [default] interface IXSLTemplate;
-}
-
[
helpstring("XSL Template"),
progid("Msxml2.XSLTemplate"),
@@ -3290,15 +3249,6 @@ coclass SAXXMLReader40
interface ISAXXMLReader;
}
-[
- uuid(88d96a0c-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXXMLReader60
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
-}
-
[
helpstring("SAX XML Reader"),
progid("Msxml2.SAXXMLReader"),
@@ -3373,26 +3323,6 @@ coclass MXHTMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a10-f192-11d4-a65f-0040963251e5)
-]
-coclass MXHTMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter 3.0"),
progid("Msxml2.MXXMLWriter.3.0"),
@@ -3437,26 +3367,6 @@ coclass MXXMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a0f-f192-11d4-a65f-0040963251e5)
-]
-coclass MXXMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter"),
progid("Msxml2.MXXMLWriter"),
@@ -3499,15 +3409,6 @@ coclass MXNamespaceManager40
interface IMXNamespaceManager;
}
-[
- uuid(88d96a11-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager60
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
[
helpstring("SAXAttributes 3.0"),
progid("Msxml2.SAXAttributes.3.0"),
@@ -3532,16 +3433,6 @@ coclass SAXAttributes40
interface ISAXAttributes;
}
-[
- uuid(88d96a0e-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXAttributes60
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
[
helpstring("SAXAttributes"),
progid("Msxml2.SAXAttributes"),
--
2.28.0
1
0