| View previous topic :: View next topic |
| Author |
Message |
Kris Guest
|
Posted: Sun Oct 29, 2006 6:19 pm Post subject: How to use CreateObject("Shell.Application")... |
|
|
Can anyone some give me some clues on how to port the code below to
C++ builder ?
Sub Eject(CDROM)
CreateObject("Shell.Application").Namespace(17).ParseName(CDROM).InvokeVerb("E&ject")
End Sub
example:
Eject "E:\" |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Sun Oct 29, 2006 11:09 pm Post subject: Re: How to use CreateObject("Shell.Application")... |
|
|
I'm not sure if there is a better way but a literal translation is:
void Eject(String CDROM)
{
Variant::CreateObject("Shell.Application").
OleFunction("Namespace", 17).
OleFunction("ParseName", CDROM.c_str()).
OleProcedure("InvokeVerb", "E&ject");
}
// Usage
Eject("E:\\");
HTH,
- Clayton |
|
| Back to top |
|
 |
Kris Guest
|
Posted: Sun Oct 29, 2006 11:51 pm Post subject: Re: How to use CreateObject("Shell.Application")... |
|
|
| Quote: | I'm not sure if there is a better way but a literal translation is:
|
This seems to be working great. Thanks !!!! |
|
| Back to top |
|
 |
|