Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using built-in CD burning 4 backup in windows XP/2003/Vista
Message
De
20/01/2009 07:49:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Using built-in CD burning 4 backup in windows XP/2003/Vista
Divers
Thread ID:
01375401
Message ID:
01375401
Vues:
58
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).aspx

I 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 :)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform