Skip to content

Commit cad0743

Browse files
committed
1.6.0-20240517
1 parent 0dd9374 commit cad0743

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

support/testlua/test.lua

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
print(package.path)
2+
print(package.cpath)
3+
4+
print(sys.instancesmanager)
5+
print(sys.luahost)
6+
print(sys.appdata)
7+
8+
print(sysargv.net)
9+
sysargv.net=2
10+
print(sysargv.net)
11+
12+
print("save to config.ini")
13+
sysargv.save()
14+
15+
print("This is my world! from test.lua")
16+
17+
log.i("This is my world! from lua.dll")
18+
19+
local api = require("testapi")
20+
api.write("This is my world! from testapi")
21+
22+
function main(data)
23+
print(data.." from test.lua")
24+
return 0
25+
end
26+
27+
protocol = {
28+
name = "alex",
29+
onMessage = function(message, lparam1, lparam2, object)
30+
print("message="..message..", lparam1="..lparam1..", lparam2="..lparam2)
31+
return 0
32+
end
33+
}
34+
35+
sys.invoke(nil, api.createObject(0), 10000, 2, 3, nil)
36+
37+
print("create CTestX")
38+
local obx = api.createObject(1)
39+
obx:workX(0)
40+
obx:workA(1)
41+
obx:workB(2)
42+
43+
local ob1 = obx:castOf("ITestA")
44+
ob1:workA(1)
45+
ob1:release()
46+
ob1 = nil
47+
48+
local ob2 = obx:castOf("ITestB")
49+
ob2:workB(2)
50+
ob2:release()
51+
ob2 = nil
52+
53+
print("release")
54+
obx:release()
55+
obx = nil
56+
57+
print("over")

support/testsvc/testsvc.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,12 @@ class CService :
7676
break;
7777

7878
case SERVICE_CONTROL_POWEREVENT:
79+
LOGGER_INFO(logger, "do PowerEvt, Control=" << inControl << ", EventType=" << inEventType);
7980
if( inEventType == PBT_APMSUSPEND )
8081
{
81-
LOGGER_INFO(logger, "do PowerEvent, EventType=" << inEventType);
8282
}
8383
if( inEventType == PBT_APMRESUMESUSPEND )
8484
{
85-
LOGGER_INFO(logger, "do PowerEvent, EventType=" << inEventType);
8685
}
8786
break;
8887

0 commit comments

Comments
 (0)