winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
May 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
793 discussions
Start a n
N
ew thread
Alexandre Julliard : oleaut32/tests: Fix some pointer sizes in typelib tests for 64-bit.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: cdf8aeb0c8d2b308ebcd394c18b9360c1b8346c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cdf8aeb0c8d2b308ebcd394c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 20 20:19:59 2009 +0200 oleaut32/tests: Fix some pointer sizes in typelib tests for 64-bit. --- dlls/oleaut32/tests/typelib.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 314a43f..1c1cfef 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -33,8 +33,8 @@ #include "tmarshal.h" #define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); } -#define expect_int(expr, value) expect_eq(expr, (int)value, int, "%d") -#define expect_hex(expr, value) expect_eq(expr, (int)value, int, "0x%x") +#define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d") +#define expect_hex(expr, value) expect_eq(expr, (int)(value), int, "0x%x") #define expect_null(expr) expect_eq(expr, NULL, const void *, "%p") #define expect_wstr_acpval(expr, value) \
1
0
0
0
Vincent Povirk : winex11.drv: Use the proper enum value for repeat.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 603675d0d4417a3ed512b1f9deebe0a2d20210dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=603675d0d4417a3ed512b1f9d…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed May 20 11:22:41 2009 -0500 winex11.drv: Use the proper enum value for repeat. --- dlls/winex11.drv/xrender.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index f8f3ba9..c00601c 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -47,6 +47,12 @@ static BOOL X11DRV_XRender_Installed = FALSE; #include <X11/Xlib.h> #include <X11/extensions/Xrender.h> +#ifndef RepeatNone /* added in 0.10 */ +#define RepeatNone 0 +#define RepeatNormal 1 +#define RepeatPad 2 +#define RepeatReflect 3 +#endif enum drawable_depth_type {mono_drawable, color_drawable}; static XRenderPictFormat *pict_formats[2]; @@ -1166,7 +1172,7 @@ static Picture get_tile_pict(enum drawable_depth_type type, int text_pixel) wine_tsx11_lock(); tile->xpm = XCreatePixmap(gdi_display, root_window, 1, 1, pict_formats[type]->depth); - pa.repeat = True; + pa.repeat = RepeatNormal; tile->pict = pXRenderCreatePicture(gdi_display, tile->xpm, pict_formats[type], CPRepeat, &pa); wine_tsx11_unlock();
1
0
0
0
Jacek Caban : urlmon: Fixed buffer size calculation.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 061b6a839aac98c09cd560a0f5b0a2c19e9294cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=061b6a839aac98c09cd560a0f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 20 16:47:32 2009 +0200 urlmon: Fixed buffer size calculation. --- dlls/urlmon/bindprot.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index eceb7e3..f63824b 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -1002,20 +1002,18 @@ static HRESULT report_data(BindProtocol *This, DWORD bscf, ULONG progress, ULONG do { read = 0; - hres = IInternetProtocol_Read(This->protocol, This->buf+This->buf_size, BUFFER_SIZE-This->buf_size, &read); - if(hres != S_OK) - break; + hres = IInternetProtocol_Read(This->protocol, This->buf+This->buf_size, + BUFFER_SIZE-This->buf_size, &read); + if(FAILED(hres) && hres != E_PENDING) + return hres; This->buf_size += read; - }while(This->buf_size < MIME_TEST_SIZE); - if(FAILED(hres) && hres != E_PENDING) - return hres; + }while(This->buf_size < MIME_TEST_SIZE && hres == S_OK); - This->buf_size += read; if(This->buf_size < MIME_TEST_SIZE && hres != S_FALSE) return S_OK; - - hres = FindMimeFromData(NULL, This->url, This->buf, min(This->buf_size, MIME_TEST_SIZE), This->mime, 0, &mime, 0); + hres = FindMimeFromData(NULL, This->url, This->buf, min(This->buf_size, MIME_TEST_SIZE), + This->mime, 0, &mime, 0); if(FAILED(hres)) return hres;
1
0
0
0
Francois Gouget : msctf: Fix an error message.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 30df52ca1e3e32b9a62a402158dd5bbb48c8d2dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30df52ca1e3e32b9a62a40215…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed May 20 16:03:58 2009 +0200 msctf: Fix an error message. --- dlls/msctf/context.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index d312574..6f35def 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -648,7 +648,7 @@ static HRESULT WINAPI TextStoreACPSink_OnLockGranted(ITextStoreACPSink *iface, if (!This->pContext || !This->pContext->currentEditSession) { - ERR("OnLockGranted called on a context without a current edit session\nZ"); + ERR("OnLockGranted called on a context without a current edit session\n"); return E_FAIL; }
1
0
0
0
Lionel Debroux : kernel32: Fix doc header for SetThreadIdealProcessor.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: e85a0375168ae5d59e6e25bbb3b7400660245027 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e85a0375168ae5d59e6e25bbb…
Author: Lionel Debroux <lionel_debroux(a)yahoo.fr> Date: Wed May 20 14:46:58 2009 +0200 kernel32: Fix doc header for SetThreadIdealProcessor. --- dlls/kernel32/thread.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index b084943..8cd2fb1 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -402,7 +402,7 @@ DWORD_PTR WINAPI SetThreadAffinityMask( HANDLE hThread, DWORD_PTR dwThreadAffini /********************************************************************** - * SetThreadIdealProcessor [KERNEL32.@] Obtains timing information. + * SetThreadIdealProcessor [KERNEL32.@] Sets preferred processor for thread. * * RETURNS * Success: Value of last call to SetThreadIdealProcessor
1
0
0
0
Alexandre Julliard : widl: Add support for standard target options to allow building the right typelib kind when cross-compiling .
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: f914b572779194e548d0c344242931d40b0d63f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f914b572779194e548d0c3442…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 21 11:37:34 2009 +0200 widl: Add support for standard target options to allow building the right typelib kind when cross-compiling. --- Make.rules.in | 2 +- tools/widl/widl.c | 102 +++++++++++++++++++++++++++++++++++------------- tools/widl/widl.h | 1 - tools/widl/widl.man.in | 6 +++ 4 files changed, 82 insertions(+), 29 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 5dc8884..254e8a2 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -183,7 +183,7 @@ filter: dummy $(WIDL) $(IDLFLAGS) -s -S $@ $< .idl.tlb: - $(WIDL) $(IDLFLAGS) -t -T $@ $< + $(WIDL) $(TARGETFLAGS) $(IDLFLAGS) -t -T $@ $< .c.ln: $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 6ae8bae..98e7a51 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -53,33 +53,35 @@ static const char usage[] = "Usage: widl [options...] infile.idl\n" " or: widl [options...] --dlldata-only name1 [name2...]\n" -" -c Generate client stub\n" -" -C file Name of client stub file (default is infile_c.c)\n" -" -d n Set debug level to 'n'\n" -" -D id[=val] Define preprocessor identifier id=val\n" -" --dlldata=file Name of the dlldata file (default is dlldata.c)\n" -" -E Preprocess only\n" -" -h Generate headers\n" -" -H file Name of header file (default is infile.h)\n" -" -I path Set include search dir to path (multiple -I allowed)\n" -" --local-stubs=file Write empty stubs for call_as/local methods to file\n" -" -N Do not preprocess input\n" -" --oldnames Use old naming conventions\n" -" -p Generate proxy\n" -" -P file Name of proxy file (default is infile_p.c)\n" -" --prefix-all=p Prefix names of client stubs / server functions with 'p'\n" +" -b arch Set the target architecture\n" +" -c Generate client stub\n" +" -C file Name of client stub file (default is infile_c.c)\n" +" -d n Set debug level to 'n'\n" +" -D id[=val] Define preprocessor identifier id=val\n" +" --dlldata=file Name of the dlldata file (default is dlldata.c)\n" +" -E Preprocess only\n" +" -h Generate headers\n" +" -H file Name of header file (default is infile.h)\n" +" -I path Set include search dir to path (multiple -I allowed)\n" +" --local-stubs=file Write empty stubs for call_as/local methods to file\n" +" -m32, -m64 Set the kind of typelib to build (Win32 or Win64)\n" +" -N Do not preprocess input\n" +" --oldnames Use old naming conventions\n" +" -p Generate proxy\n" +" -P file Name of proxy file (default is infile_p.c)\n" +" --prefix-all=p Prefix names of client stubs / server functions with 'p'\n" " --prefix-client=p Prefix names of client stubs with 'p'\n" " --prefix-server=p Prefix names of server functions with 'p'\n" -" -s Generate server stub\n" -" -S file Name of server stub file (default is infile_s.c)\n" -" -t Generate typelib\n" -" -T file Name of typelib file (default is infile.tlb)\n" -" -u Generate interface identifiers file\n" -" -U file Name of interface identifiers file (default is infile_i.c)\n" -" -V Print version and exit\n" -" -W Enable pedantic warnings\n" -" --win32 Only generate 32-bit code\n" -" --win64 Only generate 64-bit code\n" +" -s Generate server stub\n" +" -S file Name of server stub file (default is infile_s.c)\n" +" -t Generate typelib\n" +" -T file Name of typelib file (default is infile.tlb)\n" +" -u Generate interface identifiers file\n" +" -U file Name of interface identifiers file (default is infile_i.c)\n" +" -V Print version and exit\n" +" -W Enable pedantic warnings\n" +" --win32 Only generate 32-bit code\n" +" --win64 Only generate 64-bit code\n" "Debug level 'n' is a bitmask with following meaning:\n" " * 0x01 Tell which resource is parsed (verbose mode)\n" " * 0x02 Dump internal structures\n" @@ -92,7 +94,6 @@ static const char usage[] = static const char version_string[] = "Wine IDL Compiler version " PACKAGE_VERSION "\n" "Copyright 2002 Ove Kaaven\n"; -int win32 = 1; int debuglevel = DEBUGLEVEL_NONE; int parser_debug, yy_flex_debug; @@ -152,7 +153,7 @@ enum { }; static const char short_options[] = - "cC:d:D:EhH:I:NpP:sS:tT:uU:VW"; + "b:cC:d:D:EhH:I:m:NpP:sS:tT:uU:VW"; static const struct option long_options[] = { { "dlldata", 1, 0, DLLDATA_OPTION }, { "dlldata-only", 0, 0, DLLDATA_ONLY_OPTION }, @@ -227,6 +228,45 @@ static void add_widl_version_define(void) wpp_add_define("__WIDL__", NULL); } +/* set the target platform */ +static void set_target( const char *target ) +{ + static const struct + { + const char *name; + syskind_t kind; + } cpu_names[] = + { + { "i386", SYS_WIN32 }, + { "i486", SYS_WIN32 }, + { "i586", SYS_WIN32 }, + { "i686", SYS_WIN32 }, + { "i786", SYS_WIN32 }, + { "x86_64", SYS_WIN64 }, + { "sparc", SYS_WIN32 }, + { "alpha", SYS_WIN32 }, + { "powerpc", SYS_WIN32 } + }; + + unsigned int i; + char *p, *spec = xstrdup( target ); + + /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */ + + if (!(p = strchr( spec, '-' ))) error( "Invalid target specification '%s'\n", target ); + *p++ = 0; + for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++) + { + if (!strcmp( cpu_names[i].name, spec )) + { + typelib_kind = cpu_names[i].kind; + free( spec ); + return; + } + } + error( "Unrecognized CPU '%s'\n", spec ); +} + /* clean things up when aborting on a signal */ static void exit_on_signal( int sig ) { @@ -481,6 +521,9 @@ int main(int argc,char *argv[]) do_win32 = 0; do_win64 = 1; break; + case 'b': + set_target( optarg ); + break; case 'c': do_everything = 0; do_client = 1; @@ -508,6 +551,11 @@ int main(int argc,char *argv[]) case 'I': wpp_add_include_path(optarg); break; + case 'm': + if (!strcmp( optarg, "32" )) typelib_kind = SYS_WIN32; + else if (!strcmp( optarg, "64" )) typelib_kind = SYS_WIN64; + else error( "Invalid -m argument '%s'\n", optarg ); + break; case 'N': no_preprocess = 1; break; diff --git a/tools/widl/widl.h b/tools/widl/widl.h index d8c945f..e34e64b 100644 --- a/tools/widl/widl.h +++ b/tools/widl/widl.h @@ -34,7 +34,6 @@ extern int debuglevel; #define DEBUGLEVEL_PPLEX 0x0010 #define DEBUGLEVEL_PPTRACE 0x0020 -extern int win32; extern int pedantic; extern int do_everything; extern int do_header; diff --git a/tools/widl/widl.man.in b/tools/widl/widl.man.in index e275292..2757cdf 100644 --- a/tools/widl/widl.man.in +++ b/tools/widl/widl.man.in @@ -31,6 +31,10 @@ will print a help message. .B General options: .IP "\fB-V\fR" Print version number and exit. +.IP "\fB-b \fIcpu-manufacturer[-kernel]-os\fR" +Set the target architecture when cross-compiling. The target +specification is in the standard autoconf format as returned by +config.sub. .PP .B Header options: .IP "\fB-h\fR" @@ -47,6 +51,8 @@ Generate a type library. .IP "\fB-T \fIfile\fR" Define the name of the type library to be generated. The default filename is \fIinfile\fR.tlb. +.IP "\fB-m32, -m64\fR" +Generate a Win32, respectively Win64, type library. .PP .B UUID file options: .IP "\fB-u\fR"
1
0
0
0
Alexandre Julliard : widl: Add support for writing 64-bit format typelibs.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: b3a08339728acb19fb86d860c9368e8e3beedb09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3a08339728acb19fb86d860c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 21 11:10:22 2009 +0200 widl: Add support for writing 64-bit format typelibs. --- tools/widl/hash.c | 1 + tools/widl/hash.h | 6 ------ tools/widl/widl.c | 1 + tools/widl/widltypes.h | 8 ++++++++ tools/widl/write_msft.c | 10 ++++++---- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/tools/widl/hash.c b/tools/widl/hash.c index e09848e..bd20995 100644 --- a/tools/widl/hash.c +++ b/tools/widl/hash.c @@ -25,6 +25,7 @@ #include "winbase.h" #include "winnls.h" +#include "widltypes.h" #include "hash.h" static const unsigned char Lookup_16[128 * 3] = { diff --git a/tools/widl/hash.h b/tools/widl/hash.h index d859eae..3c2fd29 100644 --- a/tools/widl/hash.h +++ b/tools/widl/hash.h @@ -22,12 +22,6 @@ #ifndef __WIDL_HASH_H #define __WIDL_HASH_H -typedef enum tag_syskind_t { - SYS_WIN16 = 0, - SYS_WIN32, - SYS_MAC -} syskind_t; - extern unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr); #endif diff --git a/tools/widl/widl.c b/tools/widl/widl.c index cbc35b7..6ae8bae 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -135,6 +135,7 @@ FILE *header; FILE *idfile; size_t pointer_size = 0; +syskind_t typelib_kind = sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32; time_t now; diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 7a194f4..f5466bf 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -487,6 +487,14 @@ struct _statement_t { } u; }; +typedef enum { + SYS_WIN16, + SYS_WIN32, + SYS_MAC, + SYS_WIN64 +} syskind_t; + +extern syskind_t typelib_kind; extern user_type_list_t user_type_list; void check_for_additional_prototype_types(const var_list_t *list); diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 3506efe..bff61fd 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -45,7 +45,7 @@ #include "winbase.h" #include "winnls.h" -#include "widltypes.h" +#include "widl.h" #include "typelib.h" #include "typelib_struct.h" #include "utils.h" @@ -1543,7 +1543,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) /* adjust size of VTBL */ if(funckind != 0x3 /* FUNC_STATIC */) - typeinfo->typeinfo->cbSizeVft += 4; + typeinfo->typeinfo->cbSizeVft += pointer_size; /* Increment the number of function elements */ typeinfo->typeinfo->cElement += 1; @@ -2031,7 +2031,7 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface) } } msft_typeinfo->typeinfo->datatype2 = num_funcs << 16 | num_parents; - msft_typeinfo->typeinfo->cbSizeVft = num_funcs * 4; + msft_typeinfo->typeinfo->cbSizeVft = num_funcs * pointer_size; STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(interface) ) { var_t *func = stmt_func->u.var; @@ -2539,6 +2539,8 @@ int create_msft_typelib(typelib_t *typelib) GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4; + msft = xmalloc(sizeof(*msft)); memset(msft, 0, sizeof(*msft)); msft->typelib = typelib; @@ -2546,7 +2548,7 @@ int create_msft_typelib(typelib_t *typelib) ctl2_init_header(msft); ctl2_init_segdir(msft); - msft->typelib_header.varflags |= SYS_WIN32; + msft->typelib_header.varflags |= typelib_kind; /* * The following two calls return an offset or -1 if out of memory. We
1
0
0
0
Alexandre Julliard : oleaut32/tests: Fix the tmarshal test on 64-bit.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 1c75ab091cbeca0d0db2f3fff8a10040427cdc7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c75ab091cbeca0d0db2f3fff…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 20 21:17:05 2009 +0200 oleaut32/tests: Fix the tmarshal test on 64-bit. --- dlls/oleaut32/tests/tmarshal.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index b8cc57d..2d23b48 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1356,7 +1356,7 @@ static void test_DispCallFunc(void) V_VT(&varref) = VT_ERROR; V_ERROR(&varref) = DISP_E_PARAMNOTFOUND; VariantInit(&varresult); - hr = DispCallFunc(pWidget, 36, CC_STDCALL, VT_UI4, 4, rgvt, rgpvarg, &varresult); + hr = DispCallFunc(pWidget, 9*sizeof(void*), CC_STDCALL, VT_UI4, 4, rgvt, rgpvarg, &varresult); ok_ole_success(hr, DispCallFunc); VariantClear(&varresult); VariantClear(&vararg[1]); @@ -1405,7 +1405,8 @@ START_TEST(tmarshal) test_DispCallFunc(); test_StaticWidget(); - hr = UnRegisterTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, 1); + hr = UnRegisterTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, + sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); ok_ole_success(hr, UnRegisterTypeLib); CoUninitialize();
1
0
0
0
Alexandre Julliard : oleaut32/tests: Fix some pointer sizes in typelib tests for 64-bit.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 538c706787f5bd55286e07c2ad88275d835b9804 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=538c706787f5bd55286e07c2a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 20 20:19:59 2009 +0200 oleaut32/tests: Fix some pointer sizes in typelib tests for 64-bit. --- dlls/oleaut32/tests/typelib.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 277e97d..314a43f 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1090,7 +1090,7 @@ typedef struct _function_info CALLCONV callconv; short cParams; short cParamsOpt; - short oVft; + short vtbl_index; short cScodes; WORD wFuncFlags; element_info ret_type; @@ -1115,7 +1115,7 @@ static const interface_info info[] = { { "IDualIface", /*kind*/ TKIND_DISPATCH, /*flags*/ 0x1040, /*align*/ 4, /*size*/ 4, - /*#vtbl*/ 28, /*#func*/ 8, + /*#vtbl*/ 7, /*#func*/ 8, { { 0x60000000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, @@ -1135,7 +1135,7 @@ static const interface_info info[] = { }, { 0x60000001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 1, /*#scodes*/ 0, /*flags*/ 0x1, {19, 0}, /* ret */ { /* params */ {-1, -1} @@ -1147,7 +1147,7 @@ static const interface_info info[] = { }, { 0x60000002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 8, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 2, /*#scodes*/ 0, /*flags*/ 0x1, {19, 0}, /* ret */ { /* params */ {-1, -1} @@ -1159,7 +1159,7 @@ static const interface_info info[] = { }, { 0x60010000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 12, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ 0x1, {24, 0}, /* ret */ { /* params */ {26, 2}, @@ -1173,7 +1173,7 @@ static const interface_info info[] = { }, { 0x60010001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 16, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ 0x1, {24, 0}, /* ret */ { /* params */ {23, 1}, @@ -1191,7 +1191,7 @@ static const interface_info info[] = { }, { 0x60010002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 20, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 5, /*#scodes*/ 0, /*flags*/ 0x1, {24, 0}, /* ret */ { /* params */ {26, 1}, @@ -1213,7 +1213,7 @@ static const interface_info info[] = { }, { 0x60010003, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 24, /*#scodes*/ 0, /*flags*/ 0x1, + /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 6, /*#scodes*/ 0, /*flags*/ 0x1, {24, 0}, /* ret */ { /* params */ {3, 1}, @@ -1241,7 +1241,7 @@ static const interface_info info[] = { }, { 0x60020000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 28, /*#scodes*/ 0, /*flags*/ 0x0, + /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0x0, {24, 0}, /* ret */ { /* params */ {-1, -1} @@ -1256,11 +1256,11 @@ static const interface_info info[] = { { "ISimpleIface", /*kind*/ TKIND_INTERFACE, /*flags*/ 0x1000, /*align*/ 4, /*size*/ 4, - /*#vtbl*/ 32, /*#func*/ 1, + /*#vtbl*/ 8, /*#func*/ 1, { { 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 28, /*#scodes*/ 0, /*flags*/ 0x0, + /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0x0, {25, 0}, /* ret */ { /* params */ {-1, -1} @@ -1307,7 +1307,7 @@ static void test_dump_typelib(const char *name) expect_hex(typeattr->wTypeFlags, if_info->wTypeFlags); expect_int(typeattr->cbAlignment, if_info->cbAlignment); expect_int(typeattr->cbSizeInstance, if_info->cbSizeInstance); - expect_int(typeattr->cbSizeVft, if_info->cbSizeVft); + expect_int(typeattr->cbSizeVft, if_info->cbSizeVft * sizeof(void*)); expect_int(typeattr->cFuncs, if_info->cFuncs); for (func = 0; func < typeattr->cFuncs; func++) @@ -1326,7 +1326,7 @@ static void test_dump_typelib(const char *name) expect_int(desc->callconv, fn_info->callconv); expect_int(desc->cParams, fn_info->cParams); expect_int(desc->cParamsOpt, fn_info->cParamsOpt); - expect_int(desc->oVft, fn_info->oVft); + expect_int(desc->oVft, fn_info->vtbl_index * sizeof(void*)); expect_int(desc->cScodes, fn_info->cScodes); expect_int(desc->wFuncFlags, fn_info->wFuncFlags); ole_check(ITypeInfo_GetNames(typeinfo, desc->memid, namesTab, 256, &cNames));
1
0
0
0
Alexandre Julliard : oleaut32: Add support for registering 64-bit typelibs.
by Alexandre Julliard
21 May '09
21 May '09
Module: wine Branch: master Commit: 9955350ea1748370b1b6f841639f792cbc052474 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9955350ea1748370b1b6f8416…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 21 15:19:16 2009 +0200 oleaut32: Add support for registering 64-bit typelibs. --- dlls/oleaut32/tmarshal.c | 2 +- dlls/oleaut32/typelib.c | 18 +++++++++++++----- include/oaidl.idl | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 9d24174..7235850 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -299,7 +299,7 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) { return E_FAIL; } RegCloseKey(ikey); - sprintf(typelibkey,"Typelib\\%s\\%s\\0\\win32",tlguid,ver); + sprintf(typelibkey,"Typelib\\%s\\%s\\0\\win%u",tlguid,ver,(sizeof(void*) == 8) ? 64 : 32); tlfnlen = sizeof(tlfn); if (RegQueryValueA(HKEY_CLASSES_ROOT,typelibkey,tlfn,&tlfnlen)) { ERR("Could not get typelib fn?\n"); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index a0af847..5ddbe1b 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -265,12 +265,14 @@ static WCHAR *get_lcid_subkey( LCID lcid, SYSKIND syskind, WCHAR *buffer ) static const WCHAR LcidFormatW[] = {'%','l','x','\\',0}; static const WCHAR win16W[] = {'w','i','n','1','6',0}; static const WCHAR win32W[] = {'w','i','n','3','2',0}; + static const WCHAR win64W[] = {'w','i','n','6','4',0}; sprintfW( buffer, LcidFormatW, lcid ); switch(syskind) { case SYS_WIN16: strcatW( buffer, win16W ); break; case SYS_WIN32: strcatW( buffer, win32W ); break; + case SYS_WIN64: strcatW( buffer, win64W ); break; default: TRACE("Typelib is for unsupported syskind %i\n", syskind); return NULL; @@ -535,6 +537,12 @@ HRESULT WINAPI RegisterTypeLib( if (FAILED(ITypeLib_GetLibAttr(ptlib, &attr))) return E_FAIL; +#ifdef _WIN64 + if (attr->syskind != SYS_WIN64) return TYPE_E_BADMODULEKIND; +#else + if (attr->syskind != SYS_WIN32 && attr->syskind != SYS_WIN16) return TYPE_E_BADMODULEKIND; +#endif + get_typelib_key( &attr->guid, attr->wMajorVerNum, attr->wMinorVerNum, keyName ); res = S_OK; @@ -780,7 +788,7 @@ HRESULT WINAPI UnRegisterTypeLib( /* Create the path to the key */ get_typelib_key( libid, wVerMajor, wVerMinor, keyName ); - if (syskind != SYS_WIN16 && syskind != SYS_WIN32) + if (syskind != SYS_WIN16 && syskind != SYS_WIN32 && syskind != SYS_WIN64) { TRACE("Unsupported syskind %i\n", syskind); result = E_INVALIDARG; @@ -1926,7 +1934,7 @@ MSFT_DoFuncs(TLBContext* pcx, (*pptfd)->funcdesc.callconv = (pFuncRec->FKCCIC) >> 8 & 0xF; (*pptfd)->funcdesc.cParams = pFuncRec->nrargs ; (*pptfd)->funcdesc.cParamsOpt = pFuncRec->nroargs ; - (*pptfd)->funcdesc.oVft = (pFuncRec->VtableOffset * sizeof(void *))/4; + (*pptfd)->funcdesc.oVft = pFuncRec->VtableOffset; (*pptfd)->funcdesc.wFuncFlags = LOWORD(pFuncRec->Flags) ; MSFT_GetTdesc(pcx, @@ -2185,7 +2193,7 @@ static ITypeInfoImpl * MSFT_DoTypeInfo( ptiRet->TypeAttr.wMajorVerNum=LOWORD(tiBase.version); ptiRet->TypeAttr.wMinorVerNum=HIWORD(tiBase.version); ptiRet->TypeAttr.cImplTypes=tiBase.cImplTypes; - ptiRet->TypeAttr.cbSizeVft=(tiBase.cbSizeVft * sizeof(void *))/4; /* FIXME: this is only the non inherited part */ + ptiRet->TypeAttr.cbSizeVft=tiBase.cbSizeVft; /* FIXME: this is only the non inherited part */ if(ptiRet->TypeAttr.typekind == TKIND_ALIAS) MSFT_GetTdesc(pcx, tiBase.datatype1, &ptiRet->TypeAttr.tdescAlias, ptiRet); @@ -3947,7 +3955,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) (*ppTypeInfoImpl)->TypeAttr.cbAlignment = pTITail->cbAlignment; (*ppTypeInfoImpl)->TypeAttr.cbSizeInstance = pTITail->cbSizeInstance; - (*ppTypeInfoImpl)->TypeAttr.cbSizeVft = (pTITail->cbSizeVft * sizeof(void *))/4; + (*ppTypeInfoImpl)->TypeAttr.cbSizeVft = pTITail->cbSizeVft; switch(pTIHeader->typekind) { case TKIND_ENUM: @@ -7528,7 +7536,7 @@ HRESULT WINAPI CreateDispTypeInfo( (*ppFuncDesc)->funcdesc.callconv = md->cc; (*ppFuncDesc)->funcdesc.cParams = md->cArgs; (*ppFuncDesc)->funcdesc.cParamsOpt = 0; - (*ppFuncDesc)->funcdesc.oVft = md->iMeth << 2; + (*ppFuncDesc)->funcdesc.oVft = md->iMeth * sizeof(void *); (*ppFuncDesc)->funcdesc.cScodes = 0; (*ppFuncDesc)->funcdesc.wFuncFlags = 0; (*ppFuncDesc)->funcdesc.elemdescFunc.tdesc.vt = md->vtReturn; diff --git a/include/oaidl.idl b/include/oaidl.idl index 1cc166a..833d31b 100644 --- a/include/oaidl.idl +++ b/include/oaidl.idl @@ -989,7 +989,8 @@ interface ITypeLib : IUnknown typedef [v1_enum] enum tagSYSKIND { SYS_WIN16 = 0, SYS_WIN32, - SYS_MAC + SYS_MAC, + SYS_WIN64 } SYSKIND; typedef [v1_enum] enum tagLIBFLAGS {
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200