winapi_ui_automation/um/
lmmsg.rs

1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms.
6//! This file contains structures, function prototypes, and definitions for the NetMessage API
7use shared::lmcons::NET_API_STATUS;
8use shared::minwindef::{DWORD, LPBYTE, LPDWORD};
9use um::winnt::{LPCWSTR, LPWSTR};
10extern "system" {
11    pub fn NetMessageNameAdd(
12        servername: LPCWSTR,
13        msgname: LPCWSTR,
14    ) -> NET_API_STATUS;
15    pub fn NetMessageNameEnum(
16        servername: LPCWSTR,
17        level: DWORD,
18        bufptr: *mut LPBYTE,
19        prefmaxlen: DWORD,
20        entriesread: LPDWORD,
21        totalentries: LPDWORD,
22        resumehandle: LPDWORD,
23    ) -> NET_API_STATUS;
24    pub fn NetMessageNameGetInfo(
25        servername: LPCWSTR,
26        msgname: LPCWSTR,
27        level: DWORD,
28        bufptr: *mut LPBYTE,
29    ) -> NET_API_STATUS;
30    pub fn NetMessageNameDel(
31        servername: LPCWSTR,
32        msgname: LPCWSTR,
33    ) -> NET_API_STATUS;
34    pub fn NetMessageBufferSend(
35        servername: LPCWSTR,
36        msgname: LPCWSTR,
37        fromname: LPCWSTR,
38        buf: LPBYTE,
39        buflen: DWORD,
40    ) -> NET_API_STATUS;
41}
42STRUCT!{struct MSG_INFO_0 {
43    msgi0_name: LPWSTR,
44}}
45pub type PMSG_INFO_0 = *mut MSG_INFO_0;
46pub type LPMSG_INFO_0 = *mut MSG_INFO_0;
47STRUCT!{struct MSG_INFO_1 {
48    msgi1_name: LPWSTR,
49    msgi1_forward_flag: DWORD,
50    msgi1_forward: LPWSTR,
51}}
52pub type PMSG_INFO_1 = *mut MSG_INFO_1;
53pub type LPMSG_INFO_1 = *mut MSG_INFO_1;
54pub const MSGNAME_NOT_FORWARDED: DWORD = 0;
55pub const MSGNAME_FORWARDED_TO: DWORD = 0x04;
56pub const MSGNAME_FORWARDED_FROM: DWORD = 0x10;