I’ve found a few free utilities which will open/eject the DVD drawer which can be called from a Clarion app. Is there a way to do this form clarion without resorting to external utilities?
PROGRAM MAP module('winapi') mciSendString(*cstring lpszCommand,*cstring lpszReturnString,long cchReturn,long hCallBack),long,raw,pascal,name('mciSendStringA') end END
CODE ! https://docs.microsoft.com/en-us/previous-versions/dd757161(v%3Dvs.85) theCommand = 'set CDAudio door open' result = mciSendString(theCommand,theBuffer,size(theBuffer),0) !*** to close *** theCommand = 'set CDAudio door closed'
Above code tested OK in Clarion 11
Using mciSendString api I’m able to open DVD tray passing ‘set cdaudio door open’ as a command.
Many thanks for the super-quick solutions.
If only I still had a machine with a CD/DVD drive. I could totally impress the kids with such things!
Even better, a program for the turntable.
Clarion v5 or v55 have a examples of this…
Code I posted above (using mciSendString) will work with any version of Clarion.
Graham’s code should work, I did the same thing (albeit with a difference MCI string) back in the mid-90’s with C5