[USER32] Sync ddemisc.c with Wine Staging 1.7.55. CORE-10536
[reactos.git] / reactos / win32ss / user / user32 / include / dde_private.h
index beca748..dfc1c66 100644 (file)
@@ -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 @@ typedef struct tagWDML_CONV
 /* 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 @@ typedef struct tagWDML_INSTANCE
     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 @@ typedef enum {
 
 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)