summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/heterogeneous-hello-world/main.slang8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/heterogeneous-hello-world/main.slang b/examples/heterogeneous-hello-world/main.slang
index 2e65c7149..2a9c1eaf1 100644
--- a/examples/heterogeneous-hello-world/main.slang
+++ b/examples/heterogeneous-hello-world/main.slang
@@ -9,20 +9,18 @@ int MessageBoxA(Ptr<void> hwnd, String text, String caption, uint flags);
[COM]
interface IObject
{
- int getValue(int value);
+ int getValue(int value) throws int;
}
[DllImport("test-com")]
IObject createObject();
-public __extern_cpp int main()
+public __extern_cpp void main() throws int
{
//writeln("hello world");
//MessageBoxA(nullptr, "hello world!", "example", 0);
IObject object = createObject();
- int rs = object.getValue(2);
-
- return 0;
+ int rs = try object.getValue(2);
} \ No newline at end of file