🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How do you toggle the desktop?

#16264
From: Fishface
Date: Sat, 24 May 2003 15:10
20 lines
2041 bytes
Remy wrote:

> What does your actual code look like?

Ok, it works if I leave a <space> before the lpCommandLine, which
was a completely unexpected requirement.  Otherwise, it just opens
an explorer window.  Also, CreateProcess() fails without a fully qualified
path to explorer.exe.  Further, the "File Download" dialog box pops-up--
"Some files may harm your computer..."  If I choose "Open," the desktop
is shown.  I shortened the path to the .scf for the example code.

  PROCESS_INFORMATION pi = {0};
  STARTUPINFO si = {sizeof(STARTUPINFO)};
  if (CreateProcess("C:\\WINNT\\Explorer.exe", " C:\\PATH\\SHOWDE~1.SCF",
        0, 0, false, NORMAL_PRIORITY_CLASS, 0, 0, &si, &pi) != 0)
    {
      CloseHandle(pi.hThread);
      CloseHandle(pi.hProcess);
    }
  else ShowMessage("createprocess failed");
Technical Details
Message-ID: <3ecf8b91@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ecbd859$1@newsgroups.borland.com> <3ecbdb66@newsgroups.borland.com> <3ecccd2f$1@newsgroups.borland.com> <3ecd05ed$1@newsgroups.borland.com> <3ecec2b5$1@newsgroups.borland.com> <3ecec320$1@newsgroups.borland.com> <3eced6c7@newsgroups.borland.com> <3ecf019a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9be69064bb610d89
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-24 08:42:33 PST
From: "Fishface" <invalid@ddress.ok?>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ecbd859$1@newsgroups.borland.com> <3ecbdb66@newsgroups.borland.com> <3ecccd2f$1@newsgroups.borland.com> <3ecd05ed$1@newsgroups.borland.com> <3ecec2b5$1@newsgroups.borland.com> <3ecec320$1@newsgroups.borland.com> <3eced6c7@newsgroups.borland.com> <3ecf019a$1@newsgroups.borland.com>
Subject: Re: How do you toggle the desktop?
Date: Sat, 24 May 2003 08:10:15 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 209.102.127.124
Message-ID: <3ecf8b91@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053789073 209.102.127.124 (24 May 2003 08:11:13 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail