efgee
06-09-2010, 05:20
Hello Charles,
I'm still plugging along and trying different things with oxygen.
Here I changed the chatter.dll to utilize the MessageBox Win32 function (instead of the build in print function)
#basic
#file `chatter.dll`
'dim as long user32 = LoadLibrary "user32.dll"
'bind user32 (
' MessageBox MessageBoxA : @16
')
declare function MessageBox lib `user32.dll` alias `MessageBoxA` (byval as long,
byval as string, byval as string, byval as long) as long
'-------------------------------------
class greeting alias `greeting` export
'=====================================
method hello(n as string)
method goodbye(n as string)
/
end class
methods of greeting
method hello(n as string)
print ` Hello ` n
end method
method goodbye(n as string)
dim txt as string
txt = ` Goodbye `
'print ` Good bye ` n
MessageBox(0, n, txt, 0)
end method
end methods 'of greeting
But it crashes :unguee:
Here the code to use the chatter.dll
#basic
'------------------------------------------------
class greeting lib `chatter.dll` alias `greeting`
'================================================
method hello(n as string)
method goodbye(n as string)
/
end class
dim g as greeting
g.goodbye `moon`
g.hello `earth`
xit:
terminate
Is this a limitation of oxygen's alpha state?
Thanks
efgee
I'm still plugging along and trying different things with oxygen.
Here I changed the chatter.dll to utilize the MessageBox Win32 function (instead of the build in print function)
#basic
#file `chatter.dll`
'dim as long user32 = LoadLibrary "user32.dll"
'bind user32 (
' MessageBox MessageBoxA : @16
')
declare function MessageBox lib `user32.dll` alias `MessageBoxA` (byval as long,
byval as string, byval as string, byval as long) as long
'-------------------------------------
class greeting alias `greeting` export
'=====================================
method hello(n as string)
method goodbye(n as string)
/
end class
methods of greeting
method hello(n as string)
print ` Hello ` n
end method
method goodbye(n as string)
dim txt as string
txt = ` Goodbye `
'print ` Good bye ` n
MessageBox(0, n, txt, 0)
end method
end methods 'of greeting
But it crashes :unguee:
Here the code to use the chatter.dll
#basic
'------------------------------------------------
class greeting lib `chatter.dll` alias `greeting`
'================================================
method hello(n as string)
method goodbye(n as string)
/
end class
dim g as greeting
g.goodbye `moon`
g.hello `earth`
xit:
terminate
Is this a limitation of oxygen's alpha state?
Thanks
efgee