#317 wrong signature fore DdeCreateStringHandle(A|W) in ddeml.h

Patch_committed
closed-accepted
w32api (251)
2007-03-06
2007-01-03
No

The second argument of those functions should
be CONST. Contrary to the MSDN documentation,
this is how Microsoft has it in its own header file.

*** ddeml.h.orig Tue Jan 17 20:12:06 2006
--- ddeml.h Wed Nov 1 23:32:21 2006
***************
*** 259,266 ****
HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
! HSZ WINAPI DdeCreateStringHandleA(DWORD,LPSTR,int);
! HSZ WINAPI DdeCreateStringHandleW(DWORD,LPWSTR,int);
BOOL WINAPI DdeDisconnect(HCONV);
BOOL WINAPI DdeDisconnectList(HCONVLIST);
BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
--- 259,266 ----
HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
! HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
! HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
BOOL WINAPI DdeDisconnect(HCONV);
BOOL WINAPI DdeDisconnectList(HCONVLIST);
BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);

Discussion

  • Chris Sutcliffe

    Chris Sutcliffe - 2007-02-11
    • assigned_to: nobody --> ir0nh34d
    • status: open --> closed-rejected
     
  • Chris Sutcliffe

    Chris Sutcliffe - 2007-02-11

    Logged In: YES
    user_id=570619
    Originator: NO

    We can only base the w32api headers on the publicly available information (i.e. MSDN), we cannot use the actual MS headers as a source of information for legal reasons.

     
  • Jan Nijtmans

    Jan Nijtmans - 2007-02-23

    Logged In: YES
    user_id=61031
    Originator: YES

    Actually, I found a public reference to the right signature.
    I don't know where Wine got it from:

    http://source.winehq.org/WineAPI/DdeCreateStringHandleA.html
    http://source.winehq.org/WineAPI/DdeCreateStringHandleW.html

    The original implementation has the problem that when calling
    DdeCreateStringHandleA(ddeInstance, TCL_DDE_SERVICE_NAME, 0)
    (From Tcl 8.5, tclWinDde.c various places) this will give a
    compiler warning when using the -Wwrite-strings option from
    the mingw compiler. I would like to get rid of those warnings,
    that's how I found out about this problem.

    Regards,
    Jan Nijtmans

     
  • Chris Sutcliffe

    Chris Sutcliffe - 2007-03-06

    Logged In: YES
    user_id=570619
    Originator: NO

    Commited to CVS

     
  • Chris Sutcliffe

    Chris Sutcliffe - 2007-03-06
    • status: closed-rejected --> closed-accepted