diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/heterogeneous-hello-world/main.slang | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/heterogeneous-hello-world/main.slang b/examples/heterogeneous-hello-world/main.slang index 2a9c1eaf1..b852ca1a1 100644 --- a/examples/heterogeneous-hello-world/main.slang +++ b/examples/heterogeneous-hello-world/main.slang @@ -4,9 +4,9 @@ __target_intrinsic(cpp, "printf(\"%s\", ($0).getBuffer())") public void writeln(String text); [DllImport("User32")] -int MessageBoxA(Ptr<void> hwnd, String text, String caption, uint flags); +int MessageBoxA(void* hwnd, String text, String caption, uint flags); -[COM] +[COM("111702C2-2FD7-46F9-A318-DCCEEC96357E")] interface IObject { int getValue(int value) throws int; @@ -17,9 +17,8 @@ IObject createObject(); public __extern_cpp void main() throws int { - //writeln("hello world"); - //MessageBoxA(nullptr, "hello world!", "example", 0); - + writeln("hello world"); + MessageBoxA(nullptr, "hello world!", "example", 0); IObject object = createObject(); int rs = try object.getValue(2); |
