forked from Ixiko/AHK-libs-and-classes-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDDEML.ahk
58 lines (48 loc) · 1.47 KB
/
DDEML.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
XCLASS_DATA := 0x2000
XCLASS_FLAGS := 0x4000
XTYP_EXECUTE := 0x0050 | XCLASS_FLAGS
XTYP_POKE := 0x0090 | XCLASS_FLAGS
XTYP_REQUEST := 0x00B0 | XCLASS_DATA
*/
DdeInitialize(pCallback = 0, nFlags = 0)
{
DllCall("DdeInitialize", "UintP", idInst, "Uint", pCallback, "Uint", nFlags, "Uint", 0)
Return idInst
}
DdeUninitialize(idInst)
{
Return DllCall("DdeUninitialize", "Uint", idInst)
}
DdeConnect(idInst, hServer, hTopic, pCC = 0)
{
Return DllCall("DdeConnect", "Uint", idInst, "Uint", hServer, "Uint", hTopic, "Uint", pCC)
}
DdeDisconnect(hConv)
{
Return DllCall("DdeDisconnect", "Uint", hConv)
}
DdeAccessData(hData)
{
Return DllCall("DdeAccessData", "Uint", hData, "Uint", 0, "str")
}
DdeUnaccessData(hData)
{
Return DllCall("DdeUnaccessData", "Uint", hData)
}
DdeFreeDataHandle(hData)
{
Return DllCall("DdeFreeDataHandle", "Uint", hData)
}
DdeCreateStringHandle(idInst, sString, nCodePage = 1004) ; CP_WINANSI = 1004
{
Return DllCall("DdeCreateStringHandle", "Uint", idInst, "Uint", &sString, "int", nCodePage)
}
DdeFreeStringHandle(idInst, hString)
{
Return DllCall("DdeFreeStringHandle", "Uint", idInst, "Uint", hString)
}
DdeClientTransaction(nType, hConv, hItem, sData = "", nFormat = 1, nTimeOut = 10000) ; CF_TEXT = 1
{
Return DllCall("DdeClientTransaction", "Uint", sData = "" ? 0 : &sData, "Uint", sData = "" ? 0 : StrLen(sData)+1, "Uint", hConv, "Uint", hItem, "Uint", nFormat, "Uint", nType, "Uint", nTimeOut, "UintP", nResult)
}