Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using built-in CD burning 4 backup in windows XP/2003/Vi
Message
 
 
To
20/01/2009 07:49:57
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01375401
Message ID:
01375403
Views:
11
Check Re: VFP writing to CD Thread #1284484 Message #1284871

>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?
>
>MS article
>
>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 :)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform