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
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
List overview
wine-commits
April 2006
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
512 discussions
Start a n
N
ew thread
Ivan Gyurdiev : wined3d: Improve/implement D3DSIO_TEX.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 744f3ae1c41273e7ec9cdef9b83005d8e1013153 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=744f3ae1c41273e7ec9cdef…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Fri Apr 21 04:15:08 2006 -0400 wined3d: Improve/implement D3DSIO_TEX. - unify per-version cases into a single sequence - make use of get_register_name() for the destination register - ignore destination write mask - it's only allowed on 2.0+ shaders, and only the default mask is allowed there (xyzw) - enable swizzle on texld 1.4 (it works together with dw/dz modifiers) - implement for shaders 2.0-3.0 --- dlls/wined3d/pixelshader.c | 61 ++++++++++++++++++++++++++++++++------------ 1 files changed, 45 insertions(+), 16 deletions(-) diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 4a98bf5..d382ce0 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -706,7 +706,7 @@ CONST SHADER_OPCODE IWineD3DPixelShaderI {D3DSIO_TEXKILL, "texkill", "KIL", 1, pshader_texkill, D3DPS_VERSION(1,0), D3DPS_VERSION(3,0)}, {D3DSIO_TEX, "tex", "undefined", 1, pshader_tex, 0, D3DPS_VERSION(1,3)}, {D3DSIO_TEX, "texld", "undefined", 2, pshader_texld, D3DPS_VERSION(1,4), D3DPS_VERSION(1,4)}, - {D3DSIO_TEX, "texld", GLNAME_REQUIRE_GLSL, 3, pshader_texld, D3DPS_VERSION(2,0), -1}, + {D3DSIO_TEX, "texld", "undefined", 3, pshader_texld, D3DPS_VERSION(2,0), -1}, {D3DSIO_TEXBEM, "texbem", "undefined", 2, pshader_texbem, 0, D3DPS_VERSION(1,3)}, {D3DSIO_TEXBEML, "texbeml", GLNAME_REQUIRE_GLSL, 2, pshader_texbeml, D3DPS_VERSION(1,0), D3DPS_VERSION(1,3)}, {D3DSIO_TEXREG2AR,"texreg2ar","undefined", 2, pshader_texreg2ar, D3DPS_VERSION(1,1), D3DPS_VERSION(1,3)}, @@ -1249,23 +1249,52 @@ #endif break; case D3DSIO_TEX: { - char tmp[20]; - get_write_mask(*pToken, tmp); - if (version != 14) { - DWORD reg = *pToken & D3DSP_REGNUM_MASK; - sprintf(tmpLine,"TEX T%lu%s, T%lu, texture[%lu], 2D;\n", reg, tmp, reg, reg); - addline(&lineNum, pgmStr, &pgmLength, tmpLine); - ++pToken; - } else { - char reg2[20]; - DWORD reg1 = *pToken & D3DSP_REGNUM_MASK; - if (gen_input_modifier_line(*++pToken, 0, reg2, tmpLine, This->constants)) { + char reg_dest[20]; + char reg_coord[20]; + char reg_coord_swz[20] = ""; + DWORD reg_dest_code; + DWORD reg_sampler_code; + + /* All versions have a destination register */ + reg_dest_code = *pToken & D3DSP_REGNUM_MASK; + get_register_name(*pToken++, reg_dest, This->constants); + + /* 1.0-1.3: Use destination register as coordinate source. No modifiers. + 1.4: Use provided coordinate source register. _dw, _dz, swizzle allowed. + 2.0+: Use provided coordinate source register. No modifiers. + 3.0+: Use provided coordinate source register. Swizzle allowed */ + if (version < 14) + strcpy(reg_coord, reg_dest); + + else if (version == 14) { + if (gen_input_modifier_line(*pToken, 0, reg_coord, tmpLine, This->constants)) addline(&lineNum, pgmStr, &pgmLength, tmpLine); - } - sprintf(tmpLine,"TEX R%lu%s, %s, texture[%lu], 2D;\n", reg1, tmp, reg2, reg1); - addline(&lineNum, pgmStr, &pgmLength, tmpLine); - ++pToken; + get_input_register_swizzle(*pToken, reg_coord_swz); + pToken++; } + else if (version > 14 && version < 30) { + get_register_name(*pToken, reg_coord, This->constants); + pToken++; + } + else if (version >= 30) { + get_input_register_swizzle(*pToken, reg_coord_swz); + get_register_name(*pToken, reg_coord, This->constants); + pToken++; + } + + /* 1.0-1.4: Use destination register number as texture code. + 2.0+: Use provided sampler number as texure code. */ + if (version < 20) + reg_sampler_code = reg_dest_code; + + else { + reg_sampler_code = *pToken & D3DSP_REGNUM_MASK; + pToken++; + } + + sprintf(tmpLine, "TEX %s, %s%s, texture[%lu], 2D;\n", + reg_dest, reg_coord, reg_coord_swz, reg_sampler_code); + addline(&lineNum, pgmStr, &pgmLength, tmpLine); continue; } break;
1
0
0
0
Ivan Gyurdiev : wined3d: Texture format corrections.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: ecba4d5cbd1cf13f591b6dbafeab6dcfcd663270 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ecba4d5cbd1cf13f591b6db…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Fri Apr 21 04:04:53 2006 -0400 wined3d: Texture format corrections. - add missing GL type and make GL cfg entries for A16B16G16R16 - correct L16 type to UNSIGNED_SHORT (..16 = short, not byte) - change internal format for X8R8G8B8 from GL_RGB to GL_RGB8 which seems more correct --- dlls/wined3d/utils.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index cfc244a..ca76a93 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1655,7 +1655,7 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl case WINED3DFMT_A8R8G8B8: retVal = GL_RGBA8; break; case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA8; break; case WINED3DFMT_A2R10G10B10: retVal = GL_RGBA8; break; - case WINED3DFMT_X8R8G8B8: retVal = GL_RGB; break; + case WINED3DFMT_X8R8G8B8: retVal = GL_RGB8; break; case WINED3DFMT_A16B16G16R16: retVal = GL_RGBA16_EXT; break; /* to see */ case WINED3DFMT_A8: retVal = GL_ALPHA8; break; @@ -1769,7 +1769,7 @@ GLenum D3DFmt2GLType(IWineD3DDeviceImpl* case WINED3DFMT_A8P8: retVal = GL_UNSIGNED_BYTE; break; /* Luminance */ case WINED3DFMT_L8: retVal = GL_UNSIGNED_BYTE; break; - case WINED3DFMT_L16: retVal = GL_UNSIGNED_BYTE; break; + case WINED3DFMT_L16: retVal = GL_UNSIGNED_SHORT; break; case WINED3DFMT_A8L8: retVal = GL_UNSIGNED_BYTE; break; case WINED3DFMT_A4L4: retVal = GL_UNSIGNED_BYTE; break; /* Bump */ @@ -1789,6 +1789,7 @@ GLenum D3DFmt2GLType(IWineD3DDeviceImpl* case WINED3DFMT_A8B8G8R8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break; case WINED3DFMT_A2R10G10B10: retVal = GL_UNSIGNED_INT_2_10_10_10_REV; break; case WINED3DFMT_X8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break; + case WINED3DFMT_A16B16G16R16: retVal = GL_UNSIGNED_SHORT; break; /* to see */ case WINED3DFMT_A8: retVal = GL_ALPHA; break; /* Depth + Stencil */ @@ -1941,6 +1942,13 @@ #define PUSH2(att,value) attribs[(*nAtt PUSH2(GLX_GREEN_SIZE, 10); PUSH2(GLX_BLUE_SIZE, 10); break; + + case WINED3DFMT_A16B16G16R16: + PUSH2(GLX_ALPHA_SIZE, 16); + PUSH2(GLX_RED_SIZE, 16); + PUSH2(GLX_GREEN_SIZE, 16); + PUSH2(GLX_BLUE_SIZE, 16); + break; default: FIXME("Unsupported color format: %s\n", debug_d3dformat(BackBufferFormat));
1
0
0
0
Ivan Gyurdiev : wined3d: Correct vtrace usage.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 74117baa6c4235d60312441101953915539c9a2f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=74117baa6c4235d60312441…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Fri Apr 21 04:01:34 2006 -0400 wined3d: Correct vtrace usage. --- dlls/wined3d/device.c | 8 ++++---- dlls/wined3d/drawprim.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 790ac12..12d759b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -308,17 +308,17 @@ #undef APPLY_STATE glDisable(GL_POINT_SMOOTH); /* Centre the texture on the vertex */ - VTRACE("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n"); + VTRACE(("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n")); glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); - VTRACE("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n"); + VTRACE(("glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n")); glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); checkGLcall("glTexEnvf(...)"); - VTRACE("glEnable( GL_POINT_SPRITE_ARB )\n"); + VTRACE(("glEnable( GL_POINT_SPRITE_ARB )\n")); glEnable( GL_POINT_SPRITE_ARB ); checkGLcall("glEnable(...)"); } else { - VTRACE("glDisable( GL_POINT_SPRITE_ARB )\n"); + VTRACE(("glDisable( GL_POINT_SPRITE_ARB )\n")); glDisable( GL_POINT_SPRITE_ARB ); checkGLcall("glEnable(...)"); } diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index c2c8004..8753203 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -957,7 +957,7 @@ #if 0 #endif - VTRACE(("glWeightPointerARB(%ld, GL_FLOAT, %ld, %p)\n", + VTRACE(("glWeightPointerARB(%d, GL_FLOAT, %ld, %p)\n", WINED3D_ATR_SIZE(blendWeights) , sd->u.s.blendWeights.dwStride, sd->u.s.blendWeights.lpData)); @@ -1484,7 +1484,7 @@ static void drawStridedSlow(IWineD3DDevi D3DCOLOR_B_G(diffuseColor), D3DCOLOR_B_B(diffuseColor), D3DCOLOR_B_A(diffuseColor)); - VTRACE(("glColor4ub: r,g,b,a=%u,%u,%u,%u\n", + VTRACE(("glColor4ub: r,g,b,a=%lu,%lu,%lu,%lu\n", D3DCOLOR_B_R(diffuseColor), D3DCOLOR_B_G(diffuseColor), D3DCOLOR_B_B(diffuseColor), @@ -1495,7 +1495,7 @@ static void drawStridedSlow(IWineD3DDevi /* Specular ------------------------------- */ if (sd->u.s.specular.lpData != NULL) { - VTRACE(("glSecondaryColor4ub: r,g,b=%u,%u,%u\n", + VTRACE(("glSecondaryColor4ub: r,g,b=%lu,%lu,%lu\n", D3DCOLOR_B_R(specularColor), D3DCOLOR_B_G(specularColor), D3DCOLOR_B_B(specularColor)));
1
0
0
0
Mike McCormack : rpcrt4: Add support for the ncacn_ip_tcp transport layer.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 3d5e517e5b8c049eabad5fe4e3adaf0e2a2a078c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3d5e517e5b8c049eabad5fe…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 18:20:16 2006 +0900 rpcrt4: Add support for the ncacn_ip_tcp transport layer. --- dlls/rpcrt4/rpc_transport.c | 88 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 82 insertions(+), 6 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 98d8006..4faad59 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -22,11 +22,29 @@ * */ +#include "config.h" + #include <stdarg.h> #include <stdio.h> #include <string.h> #include <assert.h> +#include <unistd.h> +#include <fcntl.h> +#include <stdlib.h> +#ifdef HAVE_SYS_TYPES +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + #include "windef.h" #include "winbase.h" #include "winnls.h" @@ -45,6 +63,8 @@ #include "rpc_message.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); +/**** ncacn_np support ****/ + typedef struct _RpcConnection_np { RpcConnection common; @@ -180,7 +200,7 @@ static RPC_STATUS rpcrt4_conn_np_handoff RpcConnection_np *new_npc = (RpcConnection_np *) new_conn; /* because of the way named pipes work, we'll transfer the connected pipe * to the child, then reopen the server binding to continue listening */ - + new_npc->pipe = old_npc->pipe; new_npc->ovl = old_npc->ovl; old_npc->pipe = 0; @@ -224,9 +244,12 @@ static int rpcrt4_conn_np_close(RpcConne return 0; } +/**** ncacn_ip_tcp support ****/ + typedef struct _RpcConnection_tcp { RpcConnection common; + int sock; } RpcConnection_tcp; static RpcConnection *rpcrt4_conn_tcp_alloc(void) @@ -236,35 +259,86 @@ static RpcConnection *rpcrt4_conn_tcp_al static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection) { - FIXME("(%s, %s) unimplemented\n", Connection->NetworkAddr, Connection->Endpoint); + RpcConnection_tcp *tcpc = (RpcConnection_tcp *) Connection; + struct sockaddr_in sa; + int sock; + + TRACE("(%s, %s)\n", Connection->NetworkAddr, Connection->Endpoint); + + if (Connection->server) + { + ERR("ncacn_ip_tcp servers not supported yet\n"); + return RPC_S_SERVER_UNAVAILABLE; + } + + if (tcpc->sock) + return RPC_S_OK; + + sa.sin_family = AF_INET; + inet_pton(AF_INET, Connection->NetworkAddr, &sa.sin_addr); + sa.sin_port = htons(atoi(Connection->Endpoint)); + + sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) + { + ERR("socket() failed\n"); + goto error; + } + + if (0>connect(sock, (struct sockaddr*) &sa, sizeof (sa))) + { + ERR("connect() failed\n"); + goto error; + } + + tcpc->sock = sock; + + return RPC_S_OK; + +error: + close(sock); return RPC_S_SERVER_UNAVAILABLE; } static HANDLE rpcrt4_conn_tcp_get_wait_handle(RpcConnection *Connection) { - return NULL; + assert(0); + return 0; } static RPC_STATUS rpcrt4_conn_tcp_handoff(RpcConnection *old_conn, RpcConnection *new_conn) { + assert(0); return RPC_S_SERVER_UNAVAILABLE; } static int rpcrt4_conn_tcp_read(RpcConnection *Connection, void *buffer, unsigned int count) { - return -1; + RpcConnection_tcp *tcpc = (RpcConnection_tcp *) Connection; + int r = read(tcpc->sock, buffer, count); + TRACE("%d %p %u -> %d\n", tcpc->sock, buffer, count, r); + return r; } static int rpcrt4_conn_tcp_write(RpcConnection *Connection, const void *buffer, unsigned int count) { - return -1; + RpcConnection_tcp *tcpc = (RpcConnection_tcp *) Connection; + int r = write(tcpc->sock, buffer, count); + TRACE("%d %p %u -> %d\n", tcpc->sock, buffer, count, r); + return r; } static int rpcrt4_conn_tcp_close(RpcConnection *Connection) { - return -1; + RpcConnection_tcp *tcpc = (RpcConnection_tcp *) Connection; + + TRACE("%d\n", tcpc->sock); + if (tcpc->sock) + close(tcpc->sock); + tcpc->sock = 0; + return 0; } struct protseq_ops protseq_list[] = { @@ -308,6 +382,8 @@ static struct protseq_ops *rpcrt4_get_pr return NULL; } +/**** interface to rest of code ****/ + RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection) { TRACE("(Connection == ^%p)\n", Connection);
1
0
0
0
Mike McCormack : rpcrt4: Hide the details of the rpc transport mechanism.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 87ddd7b53a46b9fffc7bb013406b444a6f10cc4f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=87ddd7b53a46b9fffc7bb01…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 15:40:06 2006 +0900 rpcrt4: Hide the details of the rpc transport mechanism. --- dlls/rpcrt4/rpc_binding.h | 3 - dlls/rpcrt4/rpc_transport.c | 90 +++++++++++++++++++++++++++---------------- 2 files changed, 58 insertions(+), 35 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h index 6f973ca..2d656cc 100644 --- a/dlls/rpcrt4/rpc_binding.h +++ b/dlls/rpcrt4/rpc_binding.h @@ -33,8 +33,6 @@ typedef struct _RpcConnection LPSTR NetworkAddr; LPSTR Endpoint; struct protseq_ops *ops; - HANDLE conn, thread; - OVERLAPPED ovl; USHORT MaxTransmissionSize; /* The active interface bound to server. */ RPC_SYNTAX_IDENTIFIER ActiveInterface; @@ -42,6 +40,7 @@ typedef struct _RpcConnection struct protseq_ops { char *name; + RpcConnection *(*alloc)(void); RPC_STATUS (*open_connection)(RpcConnection *conn); HANDLE (*get_connect_wait_handle)(RpcConnection *conn); RPC_STATUS (*handoff)(RpcConnection *old_conn, RpcConnection *new_conn); diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 7f61506..ab7890d 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -47,22 +47,35 @@ WINE_DEFAULT_DEBUG_CHANNEL(rpc); static struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq); +typedef struct _RpcConnection_np +{ + RpcConnection common; + HANDLE pipe, thread; + OVERLAPPED ovl; +} RpcConnection_np; + +static RpcConnection *rpcrt4_conn_np_alloc(void) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcConnection_np)); +} + static RPC_STATUS rpcrt4_connect_pipe(RpcConnection *Connection, LPCSTR pname) { + RpcConnection_np *npc = (RpcConnection_np *) Connection; TRACE("listening on %s\n", pname); - Connection->conn = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, - PIPE_UNLIMITED_INSTANCES, - RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL); - memset(&Connection->ovl, 0, sizeof(Connection->ovl)); - Connection->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - if (ConnectNamedPipe(Connection->conn, &Connection->ovl)) + npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX, + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, + PIPE_UNLIMITED_INSTANCES, + RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL); + memset(&npc->ovl, 0, sizeof(npc->ovl)); + npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + if (ConnectNamedPipe(npc->pipe, &npc->ovl)) return RPC_S_OK; WARN("Couldn't ConnectNamedPipe (error was %ld)\n", GetLastError()); if (GetLastError() == ERROR_PIPE_CONNECTED) { - SetEvent(Connection->ovl.hEvent); + SetEvent(npc->ovl.hEvent); return RPC_S_OK; } if (GetLastError() == ERROR_IO_PENDING) { @@ -74,15 +87,16 @@ static RPC_STATUS rpcrt4_connect_pipe(Rp static RPC_STATUS rpcrt4_open_pipe(RpcConnection *Connection, LPCSTR pname, BOOL wait) { - HANDLE conn; + RpcConnection_np *npc = (RpcConnection_np *) Connection; + HANDLE pipe; DWORD err, dwMode; TRACE("connecting to %s\n", pname); while (TRUE) { - conn = CreateFileA(pname, GENERIC_READ|GENERIC_WRITE, 0, NULL, + pipe = CreateFileA(pname, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - if (conn != INVALID_HANDLE_VALUE) break; + if (pipe != INVALID_HANDLE_VALUE) break; err = GetLastError(); if (err == ERROR_PIPE_BUSY) { TRACE("connection failed, error=%lx\n", err); @@ -98,24 +112,25 @@ static RPC_STATUS rpcrt4_open_pipe(RpcCo } /* success */ - memset(&Connection->ovl, 0, sizeof(Connection->ovl)); + memset(&npc->ovl, 0, sizeof(npc->ovl)); /* pipe is connected; change to message-read mode. */ dwMode = PIPE_READMODE_MESSAGE; - SetNamedPipeHandleState(conn, &dwMode, NULL, NULL); - Connection->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - Connection->conn = conn; + SetNamedPipeHandleState(pipe, &dwMode, NULL, NULL); + npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + npc->pipe = pipe; return RPC_S_OK; } static RPC_STATUS rpcrt4_ncalrpc_open(RpcConnection* Connection) { + RpcConnection_np *npc = (RpcConnection_np *) Connection; static LPCSTR prefix = "\\\\.\\pipe\\lrpc\\"; RPC_STATUS r; LPSTR pname; /* already connected? */ - if (Connection->conn) + if (npc->pipe) return RPC_S_OK; /* protseq=ncalrpc: supposed to use NT LPC ports, @@ -134,12 +149,13 @@ static RPC_STATUS rpcrt4_ncalrpc_open(Rp static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection) { + RpcConnection_np *npc = (RpcConnection_np *) Connection; static LPCSTR prefix = "\\\\."; RPC_STATUS r; LPSTR pname; /* already connected? */ - if (Connection->conn) + if (npc->pipe) return RPC_S_OK; /* protseq=ncacn_np: named pipes */ @@ -154,28 +170,32 @@ static RPC_STATUS rpcrt4_ncacn_np_open(R return r; } -static HANDLE rpcrt4_conn_np_get_connect_event(RpcConnection *conn) +static HANDLE rpcrt4_conn_np_get_connect_event(RpcConnection *Connection) { - return conn->ovl.hEvent; + RpcConnection_np *npc = (RpcConnection_np *) Connection; + return npc->ovl.hEvent; } static RPC_STATUS rpcrt4_conn_np_handoff(RpcConnection *old_conn, RpcConnection *new_conn) { + RpcConnection_np *old_npc = (RpcConnection_np *) old_conn; + RpcConnection_np *new_npc = (RpcConnection_np *) new_conn; /* because of the way named pipes work, we'll transfer the connected pipe * to the child, then reopen the server binding to continue listening */ - new_conn->conn = old_conn->conn; - new_conn->ovl = old_conn->ovl; - old_conn->conn = 0; - memset(&old_conn->ovl, 0, sizeof(old_conn->ovl)); + new_npc->pipe = old_npc->pipe; + new_npc->ovl = old_npc->ovl; + old_npc->pipe = 0; + memset(&old_npc->ovl, 0, sizeof(old_npc->ovl)); return RPCRT4_OpenConnection(old_conn); } static int rpcrt4_conn_np_read(RpcConnection *Connection, void *buffer, unsigned int count) { + RpcConnection_np *npc = (RpcConnection_np *) Connection; DWORD dwRead = 0; - if (!ReadFile(Connection->conn, buffer, count, &dwRead, NULL) && + if (!ReadFile(npc->pipe, buffer, count, &dwRead, NULL) && (GetLastError() != ERROR_MORE_DATA)) return -1; return dwRead; @@ -184,28 +204,31 @@ static int rpcrt4_conn_np_read(RpcConnec static int rpcrt4_conn_np_write(RpcConnection *Connection, const void *buffer, unsigned int count) { + RpcConnection_np *npc = (RpcConnection_np *) Connection; DWORD dwWritten = 0; - if (!WriteFile(Connection->conn, buffer, count, &dwWritten, NULL)) + if (!WriteFile(npc->pipe, buffer, count, &dwWritten, NULL)) return -1; return dwWritten; } static int rpcrt4_conn_np_close(RpcConnection *Connection) { - if (Connection->conn) { - FlushFileBuffers(Connection->conn); - CloseHandle(Connection->conn); - Connection->conn = 0; + RpcConnection_np *npc = (RpcConnection_np *) Connection; + if (npc->pipe) { + FlushFileBuffers(npc->pipe); + CloseHandle(npc->pipe); + npc->pipe = 0; } - if (Connection->ovl.hEvent) { - CloseHandle(Connection->ovl.hEvent); - Connection->ovl.hEvent = 0; + if (npc->ovl.hEvent) { + CloseHandle(npc->ovl.hEvent); + npc->ovl.hEvent = 0; } return 0; } struct protseq_ops protseq_list[] = { { "ncacn_np", + rpcrt4_conn_np_alloc, rpcrt4_ncalrpc_open, rpcrt4_conn_np_get_connect_event, rpcrt4_conn_np_handoff, @@ -214,6 +237,7 @@ struct protseq_ops protseq_list[] = { rpcrt4_conn_np_close, }, { "ncalrpc", + rpcrt4_conn_np_alloc, rpcrt4_ncacn_np_open, rpcrt4_conn_np_get_connect_event, rpcrt4_conn_np_handoff, @@ -257,7 +281,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcCo if (!ops) return RPC_S_PROTSEQ_NOT_SUPPORTED; - NewConnection = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcConnection)); + NewConnection = ops->alloc(); NewConnection->server = server; NewConnection->ops = ops; NewConnection->NetworkAddr = RPCRT4_strdupA(NetworkAddr);
1
0
0
0
Mike McCormack : rpcrt4: Add a stub transport layer for ncacn_ip_tcp.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 5bfb579f9ab849ed4296d7a6a9bb1954a73cec35 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5bfb579f9ab849ed4296d7a…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 16:07:35 2006 +0900 rpcrt4: Add a stub transport layer for ncacn_ip_tcp. --- dlls/rpcrt4/rpc_transport.c | 54 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 52 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index ab7890d..98d8006 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -45,8 +45,6 @@ #include "rpc_message.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); -static struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq); - typedef struct _RpcConnection_np { RpcConnection common; @@ -226,6 +224,49 @@ static int rpcrt4_conn_np_close(RpcConne return 0; } +typedef struct _RpcConnection_tcp +{ + RpcConnection common; +} RpcConnection_tcp; + +static RpcConnection *rpcrt4_conn_tcp_alloc(void) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcConnection_tcp)); +} + +static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection) +{ + FIXME("(%s, %s) unimplemented\n", Connection->NetworkAddr, Connection->Endpoint); + return RPC_S_SERVER_UNAVAILABLE; +} + +static HANDLE rpcrt4_conn_tcp_get_wait_handle(RpcConnection *Connection) +{ + return NULL; +} + +static RPC_STATUS rpcrt4_conn_tcp_handoff(RpcConnection *old_conn, RpcConnection *new_conn) +{ + return RPC_S_SERVER_UNAVAILABLE; +} + +static int rpcrt4_conn_tcp_read(RpcConnection *Connection, + void *buffer, unsigned int count) +{ + return -1; +} + +static int rpcrt4_conn_tcp_write(RpcConnection *Connection, + const void *buffer, unsigned int count) +{ + return -1; +} + +static int rpcrt4_conn_tcp_close(RpcConnection *Connection) +{ + return -1; +} + struct protseq_ops protseq_list[] = { { "ncacn_np", rpcrt4_conn_np_alloc, @@ -245,6 +286,15 @@ struct protseq_ops protseq_list[] = { rpcrt4_conn_np_write, rpcrt4_conn_np_close, }, + { "ncacn_ip_tcp", + rpcrt4_conn_tcp_alloc, + rpcrt4_ncacn_ip_tcp_open, + rpcrt4_conn_tcp_get_wait_handle, + rpcrt4_conn_tcp_handoff, + rpcrt4_conn_tcp_read, + rpcrt4_conn_tcp_write, + rpcrt4_conn_tcp_close, + } }; #define MAX_PROTSEQ (sizeof protseq_list / sizeof protseq_list[0])
1
0
0
0
Mike McCormack : rpcrt4: Abstract RPCRT4_SpawnConnection.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 83109e493704890968b6d850e60521ecbc729e6e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=83109e493704890968b6d85…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 15:39:27 2006 +0900 rpcrt4: Abstract RPCRT4_SpawnConnection. --- dlls/rpcrt4/rpc_binding.h | 6 ++++++ dlls/rpcrt4/rpc_transport.c | 31 +++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.h b/dlls/rpcrt4/rpc_binding.h index 6a6d4c4..6f973ca 100644 --- a/dlls/rpcrt4/rpc_binding.h +++ b/dlls/rpcrt4/rpc_binding.h @@ -44,6 +44,7 @@ struct protseq_ops { char *name; RPC_STATUS (*open_connection)(RpcConnection *conn); HANDLE (*get_connect_wait_handle)(RpcConnection *conn); + RPC_STATUS (*handoff)(RpcConnection *old_conn, RpcConnection *new_conn); int (*read)(RpcConnection *conn, void *buffer, unsigned int len); int (*write)(RpcConnection *conn, const void *buffer, unsigned int len); int (*close)(RpcConnection *conn); @@ -121,4 +122,9 @@ static inline HANDLE rpcrt4_conn_get_wai return Connection->ops->get_connect_wait_handle(Connection); } +static inline RPC_STATUS rpcrt4_conn_handoff(RpcConnection *old_conn, RpcConnection *new_conn) +{ + return old_conn->ops->handoff(old_conn, new_conn); +} + #endif diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index be10065..7f61506 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -20,8 +20,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * TODO: - * - a whole lot */ #include <stdarg.h> @@ -161,6 +159,18 @@ static HANDLE rpcrt4_conn_np_get_connect return conn->ovl.hEvent; } +static RPC_STATUS rpcrt4_conn_np_handoff(RpcConnection *old_conn, RpcConnection *new_conn) +{ + /* because of the way named pipes work, we'll transfer the connected pipe + * to the child, then reopen the server binding to continue listening */ + + new_conn->conn = old_conn->conn; + new_conn->ovl = old_conn->ovl; + old_conn->conn = 0; + memset(&old_conn->ovl, 0, sizeof(old_conn->ovl)); + return RPCRT4_OpenConnection(old_conn); +} + static int rpcrt4_conn_np_read(RpcConnection *Connection, void *buffer, unsigned int count) { @@ -198,6 +208,7 @@ struct protseq_ops protseq_list[] = { { "ncacn_np", rpcrt4_ncalrpc_open, rpcrt4_conn_np_get_connect_event, + rpcrt4_conn_np_handoff, rpcrt4_conn_np_read, rpcrt4_conn_np_write, rpcrt4_conn_np_close, @@ -205,6 +216,7 @@ struct protseq_ops protseq_list[] = { { "ncalrpc", rpcrt4_ncacn_np_open, rpcrt4_conn_np_get_connect_event, + rpcrt4_conn_np_handoff, rpcrt4_conn_np_read, rpcrt4_conn_np_write, rpcrt4_conn_np_close, @@ -261,23 +273,14 @@ RPC_STATUS RPCRT4_CreateConnection(RpcCo RPC_STATUS RPCRT4_SpawnConnection(RpcConnection** Connection, RpcConnection* OldConnection) { - RpcConnection* NewConnection; RPC_STATUS err; - err = RPCRT4_CreateConnection(&NewConnection, OldConnection->server, + err = RPCRT4_CreateConnection(Connection, OldConnection->server, rpcrt4_conn_get_name(OldConnection), OldConnection->NetworkAddr, OldConnection->Endpoint, NULL, NULL); - if (err == RPC_S_OK) { - /* because of the way named pipes work, we'll transfer the connected pipe - * to the child, then reopen the server binding to continue listening */ - NewConnection->conn = OldConnection->conn; - NewConnection->ovl = OldConnection->ovl; - OldConnection->conn = 0; - memset(&OldConnection->ovl, 0, sizeof(OldConnection->ovl)); - *Connection = NewConnection; - RPCRT4_OpenConnection(OldConnection); - } + if (err == RPC_S_OK) + rpcrt4_conn_handoff(OldConnection, *Connection); return err; }
1
0
0
0
Mike McCormack : rpcrt4: Move the connected check inside the named pipe code.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: e7e209da6447df9a82c1c2089d59092396b13174 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=e7e209da6447df9a82c1c20…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 15:39:41 2006 +0900 rpcrt4: Move the connected check inside the named pipe code. --- dlls/rpcrt4/rpc_transport.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index fa8b5c9..be10065 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -116,6 +116,10 @@ static RPC_STATUS rpcrt4_ncalrpc_open(Rp RPC_STATUS r; LPSTR pname; + /* already connected? */ + if (Connection->conn) + return RPC_S_OK; + /* protseq=ncalrpc: supposed to use NT LPC ports, * but we'll implement it with named pipes for now */ pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); @@ -136,6 +140,10 @@ static RPC_STATUS rpcrt4_ncacn_np_open(R RPC_STATUS r; LPSTR pname; + /* already connected? */ + if (Connection->conn) + return RPC_S_OK; + /* protseq=ncacn_np: named pipes */ pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); strcat(strcpy(pname, prefix), Connection->Endpoint); @@ -218,10 +226,6 @@ RPC_STATUS RPCRT4_OpenConnection(RpcConn { TRACE("(Connection == ^%p)\n", Connection); - /* already connected? */ - if (Connection->conn) - return RPC_S_OK; - return Connection->ops->open_connection(Connection); }
1
0
0
0
Mike McCormack : rpcrt4: Split the transport layer into a different file.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 5c6f72873a0f3ebc0c855480059e1bc168628e39 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5c6f72873a0f3ebc0c85548…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 15:38:57 2006 +0900 rpcrt4: Split the transport layer into a different file. --- dlls/rpcrt4/Makefile.in | 1 dlls/rpcrt4/rpc_binding.c | 241 ------------------------------------ dlls/rpcrt4/rpc_transport.c | 289 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 290 insertions(+), 241 deletions(-) create mode 100644 dlls/rpcrt4/rpc_transport.c Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=5c6f72873a0f3ebc0c8…
1
0
0
0
Mike McCormack : rpcrt4: Allocate RpcServerProtseq in a single place.
by Alexandre Julliard
21 Apr '06
21 Apr '06
Module: wine Branch: refs/heads/master Commit: 9b791e0983f722de1e1effeefe8f44c8a75db976 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9b791e0983f722de1e1effe…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Fri Apr 21 15:38:25 2006 +0900 rpcrt4: Allocate RpcServerProtseq in a single place. --- dlls/rpcrt4/rpc_server.c | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 0fb4545..8889540 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -725,21 +725,34 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpW } /*********************************************************************** + * alloc_serverprotoseq (internal) + */ +static RpcServerProtseq *alloc_serverprotoseq(UINT MaxCalls, char *Protseq, char *Endpoint) +{ + RpcServerProtseq* ps; + + ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq)); + ps->MaxCalls = MaxCalls; + ps->Protseq = Protseq; + ps->Endpoint = Endpoint; + + return ps; +} + +/*********************************************************************** * RpcServerUseProtseqEpExA (RPCRT4.@) */ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCalls, unsigned char *Endpoint, LPVOID SecurityDescriptor, PRPC_POLICY lpPolicy ) { + char *szps = (char*)Protseq, *szep = (char*)Endpoint; RpcServerProtseq* ps; - TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a( (char*)Protseq ), MaxCalls, - debugstr_a( (char*)Endpoint ), SecurityDescriptor, + TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a(szps), MaxCalls, + debugstr_a(szep), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); - ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq)); - ps->MaxCalls = MaxCalls; - ps->Protseq = RPCRT4_strdupA((char*)Protseq); - ps->Endpoint = RPCRT4_strdupA((char*)Endpoint); + ps = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupA(szps), RPCRT4_strdupA(szep)); return RPCRT4_use_protseq(ps); } @@ -756,10 +769,8 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpE debugstr_w( Endpoint ), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); - ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq)); - ps->MaxCalls = MaxCalls; - ps->Protseq = RPCRT4_strdupWtoA(Protseq); - ps->Endpoint = RPCRT4_strdupWtoA(Endpoint); + ps = alloc_serverprotoseq(MaxCalls, RPCRT4_strdupWtoA(Protseq), + RPCRT4_strdupWtoA(Endpoint)); return RPCRT4_use_protseq(ps); }
1
0
0
0
← Newer
1
2
3
4
5
6
...
52
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
Results per page:
10
25
50
100
200