🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2904

Re: How to use CreateObject("Shell.Application")...

#2904
From: Clayton Arends
Date: Sun, 29 Oct 2006 17:09
15 lines
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 
Technical Details
Message-ID: <4544e042$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <in69k2dik6it14qmui9o7cmc4rj8chvhev@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,306ff0cf9385ba4a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Clayton Arends" <nospam_claytonarends@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <in69k2dik6it14qmui9o7cmc4rj8chvhev@4ax.com>
Subject: Re: How to use CreateObject("Shell.Application")...
Date: Sun, 29 Oct 2006 09:09:21 -0800
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 71.83.251.192
Message-ID: <4544e042$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1162141762 71.83.251.192 (29 Oct 2006 09:09:22 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail