Peter,
You cant push *s
instead:
def spush
mov eax,%1
push [eax]
end def
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Declare Function MessageBox Lib "user32.dll" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
Declare Sub ExitProcess Lib "kernel32.dll" (ByVal uExitCode As Long)
% MB_ICONQUESTION = 32
% MB_YESNO = 4
% IDYES = 6
string mess, caption, cmd_o, cmd_e, cmd_c
caption = "Desktop configuration"
messy = "Do you need additional place for the wine?"
cmd_o = "open cdaudio"
cmd_e = "set cdaudio door open"
cmd_c = "close cdaudio"
def spush 'indirect push for dynamic strings
'===========================================
mov eax,%1
push [eax]
end def
'call MessageBox 0,messy,caption,36
push 36
spush caption
spush messy
push 0
call MessageBox
cmp eax,idyes
jnz aExit
'call mciSendString cmd_o,0,0,0
push 0
push 0
push 0
spush cmd_o
call mciSendString
'call mciSendString cmd_e,0,0,0
push 0
push 0
push 0
spush cmd_e
call mciSendString
'call mciSendString cmd_c,0,0,0
push 0
push 0
push 0
spush cmd_c
call mciSendString
aExit:
'push 0
'call ExitProcess
print "Okay"
Charles