Posts: 88
Threads: 33
Joined: Feb 2007
I am receiving the following error when the exe exits :
error in destructors of global variables
I have only one global variable defined in the main thread (str+).
str+ PSR_CURDIR = CurDir
if(find(_s "PSR" 0 1) = -1)
,PSR_CURDIR = _s.expandpath("$desktop$\PSR")
mac "PSR_Load"
1
Play 1 _s.format("%s\media\startup.wav" PSR_CURDIR) 0
2
SendMessage hDlg_PSR_Load WM_CLOSE 0 0
PSR_Main_Dlg 0 0 0 0
Posts: 11,901
Threads: 138
Joined: Dec 2002
I cannot test because don't have the functions and files. Had to reduce it to this, and it works without error:
;/exe
str+ PSR_CURDIR = CurDir
if(find(_s "PSR" 0 1) = -1)
,PSR_CURDIR = _s.expandpath("$desktop$\PSR")
;mac "PSR_Load"
PSR_CURDIR="c:\windows"
1
Play 1 _s.format("%s\media\start.wav" PSR_CURDIR) 0
out _s
2
;SendMessage hDlg_PSR_Load WM_CLOSE 0 0
;PSR_Main_Dlg 0 0 0 0
;BEGIN PROJECT
;main_function Macro633
;exe_file $my qm$\Macro633.exe
;icon $qm$\macro.ico
;manifest $qm$\default.exe.manifest
;res
;on_before
;on_after
;on_run
;flags 6
;end_hotkey 0
;guid {C8A88573-7ABB-4384-8E8C-1939BEC647AF}
;END PROJECT
Play also uses global variable for the media player. Try to disable the Play line. Or maybe the called functions use global variables.