Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Kris
Sun, 29 Oct 2006 12:19
How to use CreateObject("Shell.Application")...
Author: Kris
Date: Sun, 29 Oct 2006 12:19
Date: Sun, 29 Oct 2006 12:19
10 lines
1087 bytes
1087 bytes
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:\"
Re: How to use CreateObject("Shell.Application")...
Author: Clayton Arends
Date: Sun, 29 Oct 2006 17:09
Date: Sun, 29 Oct 2006 17:09
15 lines
1246 bytes
1246 bytes
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
Re: How to use CreateObject("Shell.Application")...
Author: Kris
Date: Sun, 29 Oct 2006 17:51
Date: Sun, 29 Oct 2006 17:51
3 lines
1050 bytes
1050 bytes
>I'm not sure if there is a better way but a literal translation is: This seems to be working great. Thanks !!!!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads