1 /*
2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 /*
27  * Common AccessBridge IPC message definitions
28  */
29 
30 #include <windows.h>
31 #include <winuser.h>
32 
33 #ifndef __AccessBridgeMessages_H__
34 #define __AccessBridgeMessages_H__
35 
36 
37 // used for messages between AccessBridge dlls to manage IPC
38 // In the SendMessage call, the third param (WPARAM) is
39 // the source HWND (ourAccessBridgeWindow in this case),
40 // and the fourth param (LPARAM) is the size in bytes of
41 // the package put into shared memory.
42 #define AB_MEMORY_MAPPED_FILE_SETUP (WM_USER+0x1000)
43 
44 // used for messages between AccessBridge dlls to manage IPC
45 // In the SendMessage call, the third param (WPARAM) is
46 // the source HWND (ourAccessBridgeWindow in this case),
47 // and the fourth param (LPARAM) is the size in bytes of
48 // the package put into shared memory.
49 #define AB_MESSAGE_WAITING (WM_USER+0x1001)
50 
51 // used for messages from JavaDLL to itself (or perhaps later also
52 // for messages from WindowsDLL to itself).  Used with PostMessage,
53 // it is called for deferred processing of messages to send across
54 // to another DLL (or DLLs)
55 #define AB_MESSAGE_QUEUED (WM_USER+0x1002)
56 
57 // used to let other AccessBridge DLLs know that one of the DLLs
58 // they are communicating with is going away (not reversable)
59 #define AB_DLL_GOING_AWAY (WM_USER+0x1003)
60 
61 
62 // used as part of the Memory-Mapped file IPC setup.  The first
63 // constant is the query, the second the response, that are put
64 // into the memory mapped file for reading by the opposite DLL
65 // to verify that communication is working
66 #define AB_MEMORY_MAPPED_FILE_OK_QUERY "OK?"
67 #define AB_MEMORY_MAPPED_FILE_OK_ANSWER "OK!"
68 
69 
70 BOOL initBroadcastMessageIDs();
71 
72 
73 #endif
74