I've been trying to figure out how to implement CD burning using the built-in IMAPI in windows. I need some help in translating the C++ to VFP so I can call the "GetRecorderDriveLetter" and "Burn" commands specifically but the "HasRecordableDrive" might be a plus but not required. Anyone have any ideas?
http://msdn.microsoft.com/en-us/library/bb776155(VS.85).aspxI found the following to activate the burn code but I prefer to use an API such as that above rather than hard-coded scripting since the text on dialogs can change in future version of windows....
WizardName = "CD Writing Wizard"
DO WaitForWizardToStart
DO StartWizardWriting with "My File Name"
DO WaitForWizardToStop
procedure WaitForWizardToStart
oShell = CreateObject("WScript.Shell")
Do WHILE ! oShell.appactivate(WizardName)
Sleep 500
Loop
Enddo
procedure StartWizardWriting
PARAMETERS name
oShell = CreateObject("WScript.Shell")
oShell.appactivate(WizardName)
oShell.SendKeys(name)
oShell.appactivate(WizardName)
oShell.SendKeys("Enter")
procedure WaitForWizardToStop
oShell = CreateObject("WScript.Shell")
Do WHILE ! oShell.appactivate("CD Writing Wizard")
*' Keep script running until Dialog is gone,
*' or else the wizard will close.
sleep 500
Loop
Enddo
I'd be extremely grateful for any ideas anyone has on converting this C++ to VFP - thanks ahead of time :)