Hey, I've been playing around with the windows dlls and DB. I've got a number of things to work (i.e. a message box

), though seeing as I've never coded in VB (and all the examples are in VB) I was wonder how you would convert something like this to DB...
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal sBuffer As String, lSize As Long)
Private Sub Form_Load ()
Dim strString As String
'Create a buffer
strString = String(255, Chr$(0))
'Get the computer name
GetComputerName strString, 255
'Remove the unnecessary Chr$(0)
strString = Left$(strString, InStr(1, strString, Chr$(0)) - 1)
'Show the computer name
MsgBox strString
End Sub
Heres my attempt...
sync on
set window on
load dll "kernel32.dll",1
do
set cursor 0,0
$name=call dll 1,"GetComputerNameA"
print $name
wait key
sync
loop
delete dll 1
...though I'm guessing theres something after the "call dlll" bit.
Thanks for any help,
Oliver