Author: akhaldi
Date: Fri Nov 27 22:52:21 2015
New Revision: 70172
URL:
http://svn.reactos.org/svn/reactos?rev=70172&view=rev
Log:
[USER32] Sync ddemisc.c with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/media/doc/README.WINE
trunk/reactos/win32ss/user/user32/include/dde_private.h
trunk/reactos/win32ss/user/user32/misc/ddemisc.c
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Nov 27 22:52:21 2015
@@ -301,9 +301,9 @@
reactos/win32ss/user/user32/controls/scrollbar.c # Forked
reactos/win32ss/user/user32/controls/static.c # Synced to WineStaging-1.7.55
- reactos/win32ss/user/user32/include/dde_private.h # Synced to Wine-1.1.24
-
- reactos/win32ss/user/user32/misc/dde.c # Synced to Wine-1.1.24 (dde_misc.c)
+ reactos/win32ss/user/user32/include/dde_private.h # Synced to WineStaging-1.7.55
+
+ reactos/win32ss/user/user32/misc/dde.c # Synced to WineStaging-1.7.55
(dde_misc.c)
reactos/win32ss/user/user32/misc/ddeclient.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/misc/ddeserver.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/misc/exticon.c # Synced to Wine-1_1_22
Modified: trunk/reactos/win32ss/user/user32/include/dde_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
==============================================================================
--- trunk/reactos/win32ss/user/user32/include/dde_private.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/include/dde_private.h [iso-8859-1] Fri Nov 27
22:52:21 2015
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_DDEML_PRIVATE_H
@@ -72,9 +72,9 @@
* be to provide a new protocol in the case were both partners are handled by DDEML.
*
* The StringHandles are in fact stored as local atoms. So an HSZ and a (local) atom
- * can be used interchangably. However, in order to keep track of the allocated HSZ,
+ * can be used interchangeably. However, in order to keep track of the allocated HSZ,
* and to free them upon instance termination, all HSZ are stored in a link list.
- * When the HSZ need to be passed thru DDE messages, we need to convert them back and
+ * When the HSZ need to be passed through DDE messages, we need to convert them back and
* forth to global atoms.
*/
@@ -143,9 +143,9 @@
/* DDE_LINK struct defines hot, warm, and cold links */
typedef struct tagWDML_LINK {
struct tagWDML_LINK* next; /* to link all the active links */
- HCONV hConv; /* to get back to the converstaion */
+ HCONV hConv; /* to get back to the conversation */
UINT transactionType;/* 0 for no link */
- HSZ hszItem; /* item targetted for (hot/warm) link */
+ HSZ hszItem; /* item targeted for (hot/warm) link */
UINT uFmt; /* format for data */
} WDML_LINK;
@@ -169,8 +169,6 @@
WDML_LINK* links[2]; /* active links for this instance (client and server) */
} WDML_INSTANCE;
-extern CRITICAL_SECTION WDML_CritSect; /* protection for instance list */
-
/* header for the DDE Data objects */
typedef struct tagDDE_DATAHANDLE_HEAD
{
@@ -189,66 +187,63 @@
extern HDDEDATA WDML_InvokeCallback(WDML_INSTANCE* pInst, UINT uType, UINT uFmt, HCONV
hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
- ULONG_PTR dwData1, ULONG_PTR dwData2);
-extern WDML_SERVER* WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ
hszTopic);
-extern void WDML_RemoveServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic);
-extern WDML_SERVER* WDML_FindServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ
hszTopic);
+ ULONG_PTR dwData1, ULONG_PTR dwData2) DECLSPEC_HIDDEN;
+extern WDML_SERVER* WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ
hszTopic) DECLSPEC_HIDDEN;
+extern void WDML_RemoveServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic)
DECLSPEC_HIDDEN;
+extern WDML_SERVER* WDML_FindServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ
hszTopic) DECLSPEC_HIDDEN;
/* transaction handler on the server side */
-extern WDML_QUEUE_STATE WDML_ServerHandle(WDML_CONV* pConv, WDML_XACT* pXAct);
+extern WDML_QUEUE_STATE WDML_ServerHandle(WDML_CONV* pConv, WDML_XACT* pXAct)
DECLSPEC_HIDDEN;
/* transaction handler on the client side */
HDDEDATA WDML_ClientHandle(WDML_CONV *pConv, WDML_XACT *pXAct, DWORD dwTimeout, LPDWORD
pdwResult) DECLSPEC_HIDDEN;
/* called both in DdeClientTransaction and server side. */
-extern UINT WDML_Initialize(LPDWORD pidInst, PFNCALLBACK pfnCallback,
- DWORD afCmd, DWORD ulRes, BOOL bUnicode);
extern WDML_CONV* WDML_AddConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
- HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer);
-extern void WDML_RemoveConv(WDML_CONV* pConv, WDML_SIDE side);
-extern WDML_CONV* WDML_GetConv(HCONV hConv, BOOL checkConnected);
-extern WDML_CONV* WDML_GetConvFromWnd(HWND hWnd);
+ HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer)
DECLSPEC_HIDDEN;
+extern void WDML_RemoveConv(WDML_CONV* pConv, WDML_SIDE side) DECLSPEC_HIDDEN;
+extern WDML_CONV* WDML_GetConv(HCONV hConv, BOOL checkConnected) DECLSPEC_HIDDEN;
+extern WDML_CONV* WDML_GetConvFromWnd(HWND hWnd) DECLSPEC_HIDDEN;
extern WDML_CONV* WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
- HSZ hszService, HSZ hszTopic);
+ HSZ hszService, HSZ hszTopic) DECLSPEC_HIDDEN;
extern BOOL WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode,
- BOOL fBusy, BOOL fAck, UINT_PTR pmt, LPARAM lParam, UINT oldMsg);
+ BOOL fBusy, BOOL fAck, UINT_PTR pmt, LPARAM lParam, UINT oldMsg)
DECLSPEC_HIDDEN;
extern void WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
- UINT wType, HSZ hszItem, UINT wFmt);
+ UINT wType, HSZ hszItem, UINT wFmt) DECLSPEC_HIDDEN;
extern WDML_LINK* WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
- HSZ hszItem, BOOL use_fmt, UINT uFmt);
+ HSZ hszItem, BOOL use_fmt, UINT uFmt) DECLSPEC_HIDDEN;
extern void WDML_RemoveLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
- HSZ hszItem, UINT wFmt);
-extern void WDML_RemoveAllLinks(WDML_INSTANCE* pInstance, WDML_CONV* pConv, WDML_SIDE
side);
+ HSZ hszItem, UINT wFmt) DECLSPEC_HIDDEN;
/* string internals */
-extern void WDML_FreeAllHSZ(WDML_INSTANCE* pInstance);
-extern BOOL WDML_DecHSZ(WDML_INSTANCE* pInstance, HSZ hsz);
-extern BOOL WDML_IncHSZ(WDML_INSTANCE* pInstance, HSZ hsz);
-extern ATOM WDML_MakeAtomFromHsz(HSZ hsz);
-extern HSZ WDML_MakeHszFromAtom(const WDML_INSTANCE* pInstance, ATOM atom);
+extern BOOL WDML_DecHSZ(WDML_INSTANCE* pInstance, HSZ hsz) DECLSPEC_HIDDEN;
+extern BOOL WDML_IncHSZ(WDML_INSTANCE* pInstance, HSZ hsz) DECLSPEC_HIDDEN;
+extern ATOM WDML_MakeAtomFromHsz(HSZ hsz) DECLSPEC_HIDDEN;
+extern HSZ WDML_MakeHszFromAtom(const WDML_INSTANCE* pInstance, ATOM atom)
DECLSPEC_HIDDEN;
/* client calls these */
-extern WDML_XACT* WDML_AllocTransaction(WDML_INSTANCE* pInstance, UINT ddeMsg, UINT wFmt,
HSZ hszItem);
-extern void WDML_QueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct);
-extern BOOL WDML_UnQueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct);
-extern void WDML_FreeTransaction(WDML_INSTANCE* pInstance, WDML_XACT* pXAct, BOOL
doFreePmt);
-extern WDML_XACT* WDML_FindTransaction(WDML_CONV* pConv, DWORD tid);
-extern HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL
fRelease,
- BOOL fDeferUpd, BOOL fAckReq);
-extern HDDEDATA WDML_Global2DataHandle(WDML_CONV* pConv, HGLOBAL hMem, WINE_DDEHEAD*
p);
-extern BOOL WDML_IsAppOwned(HDDEDATA hDdeData);
-extern WDML_INSTANCE* WDML_GetInstance(DWORD InstId);
-extern WDML_INSTANCE* WDML_GetInstanceFromWnd(HWND hWnd);
+extern WDML_XACT* WDML_AllocTransaction(WDML_INSTANCE* pInstance, UINT ddeMsg, UINT wFmt,
HSZ hszItem) DECLSPEC_HIDDEN;
+extern void WDML_QueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct) DECLSPEC_HIDDEN;
+extern BOOL WDML_UnQueueTransaction(WDML_CONV* pConv, WDML_XACT* pXAct)
DECLSPEC_HIDDEN;
+extern void WDML_FreeTransaction(WDML_INSTANCE* pInstance, WDML_XACT* pXAct, BOOL
doFreePmt) DECLSPEC_HIDDEN;
+extern HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
+ BOOL fDeferUpd, BOOL dAckReq) DECLSPEC_HIDDEN;
+extern HDDEDATA WDML_Global2DataHandle(WDML_CONV* pConv, HGLOBAL hMem, WINE_DDEHEAD* da)
DECLSPEC_HIDDEN;
+extern BOOL WDML_IsAppOwned(HDDEDATA hDdeData) DECLSPEC_HIDDEN;
+extern WDML_INSTANCE* WDML_GetInstance(DWORD InstId) DECLSPEC_HIDDEN;
+extern WDML_INSTANCE* WDML_GetInstanceFromWnd(HWND hWnd) DECLSPEC_HIDDEN;
/* broadcasting to DDE windows */
extern void WDML_BroadcastDDEWindows(LPCWSTR clsName, UINT uMsg,
- WPARAM wParam, LPARAM lParam);
-extern void WDML_NotifyThreadExit(DWORD tid);
+ WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;
+extern void WDML_NotifyThreadExit(DWORD tid) DECLSPEC_HIDDEN;
+extern void WDML_NotifyThreadDetach(void) DECLSPEC_HIDDEN;
+
static __inline void WDML_ExtractAck(WORD status, DDEACK* da)
{
*da = *((DDEACK*)&status);
}
-extern const WCHAR WDML_szEventClass[]; /* class of window for events (aka instance) */
-extern const char WDML_szServerConvClassA[]; /* ANSI class of window for server side conv
*/
-extern const WCHAR WDML_szServerConvClassW[]; /* unicode class of window for server side
conv */
-extern const char WDML_szClientConvClassA[]; /* ANSI class of window for client side conv
*/
-extern const WCHAR WDML_szClientConvClassW[]; /* unicode class of window for client side
conv */
+extern const WCHAR WDML_szEventClass[] DECLSPEC_HIDDEN; /* class of window for events
(aka instance) */
+extern const char WDML_szServerConvClassA[] DECLSPEC_HIDDEN; /* ANSI class of window for
server side conv */
+extern const WCHAR WDML_szServerConvClassW[] DECLSPEC_HIDDEN; /* unicode class of window
for server side conv */
+extern const char WDML_szClientConvClassA[] DECLSPEC_HIDDEN; /* ANSI class of window for
client side conv */
+extern const WCHAR WDML_szClientConvClassW[] DECLSPEC_HIDDEN; /* unicode class of window
for client side conv */
#define WM_WDML_REGISTER (WM_USER + 0x200)
#define WM_WDML_UNREGISTER (WM_USER + 0x201)
Modified: trunk/reactos/win32ss/user/user32/misc/ddemisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/d…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/ddemisc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/ddemisc.c [iso-8859-1] Fri Nov 27 22:52:21
2015
@@ -39,14 +39,14 @@
const WCHAR WDML_szEventClass[] = L"DDEMLEvent";
/* protection for instance list */
-CRITICAL_SECTION WDML_CritSect;
+static CRITICAL_SECTION WDML_CritSect;
static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &WDML_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { (DWORD_PTR)(__FILE__ ": WDML_CritSect") }
};
-CRITICAL_SECTION WDML_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
+static CRITICAL_SECTION WDML_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
/* ================================================================
*
@@ -417,7 +417,7 @@
* Frees up all the strings still allocated in the list and
* remove all the nodes from the list of HSZ nodes.
*/
-void WDML_FreeAllHSZ(WDML_INSTANCE* pInstance)
+static void WDML_FreeAllHSZ(WDML_INSTANCE* pInstance)
{
/* Free any strings created in this instance.
*/
@@ -825,7 +825,7 @@
*
*
*/
-UINT WDML_Initialize(LPDWORD pidInst, PFNCALLBACK pfnCallback,
+static UINT WDML_Initialize(LPDWORD pidInst, PFNCALLBACK pfnCallback,
DWORD afCmd, DWORD ulRes, BOOL bUnicode)
{
WDML_INSTANCE* pInstance;
@@ -1820,7 +1820,7 @@
*
*
*/
-void WDML_RemoveAllLinks(WDML_INSTANCE* pInstance, WDML_CONV* pConv, WDML_SIDE side)
+static void WDML_RemoveAllLinks(WDML_INSTANCE* pInstance, WDML_CONV* pConv, WDML_SIDE
side)
{
WDML_LINK* pPrev = NULL;
WDML_LINK* pCurrent = NULL;
@@ -1869,7 +1869,7 @@
WDML_LINK* WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
HSZ hszItem, BOOL use_fmt, UINT uFmt)
{
- WDML_LINK* pCurrent = NULL;
+ WDML_LINK* pCurrent;
for (pCurrent = pInstance->links[side]; pCurrent != NULL; pCurrent =
pCurrent->next)
{
@@ -1982,7 +1982,7 @@
*
*
*/
-WDML_XACT* WDML_FindTransaction(WDML_CONV* pConv, DWORD tid)
+static WDML_XACT* WDML_FindTransaction(WDML_CONV* pConv, DWORD tid)
{
WDML_XACT* pXAct;
@@ -2049,7 +2049,7 @@
WDML_CONV* WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
HSZ hszService, HSZ hszTopic)
{
- WDML_CONV* pCurrent = NULL;
+ WDML_CONV* pCurrent;
for (pCurrent = pInstance->convs[side]; pCurrent != NULL; pCurrent =
pCurrent->next)
{