🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Example of SHGetSetSettings anyone?

#9002
From: Michael Lueck
Date: Mon, 16 Aug 2004 12:14
23 lines
2517 bytes
I am trying to use SHGetSetSettings in SHELL32.DLL to automatically set Windows Explorer settings the way I want them. I am using the BCC55 command line compiler, but that news groups suggested this 
one for assistance with the API specifically.

I load the DLL dynamically as the header/lib files for that compiler do not have this function (and checking CBX 1 and the preview of wxWindows I see it is still not there!) and I copied the important 
stuff from the latest MS PSDK header file into a header for my program.

Problems:

On the read of the settings, as I move from machine to machine I always get the same values returned, no matter is it my customized settings, or a first time desktop logon with no changes to the settings.

On the write of the settings, or even A setting, the program crashes.

Googling for the function returns various folks in Delphi working with the API, but no examples to learn from. From the sounds of the notes it sounds like they are sending messages to explorer in 
addition to calling this API, but like I said no code examples. The only other thing I turn up are various projects like wine supporting the API.

Looking to see if anyone has had success with the API, I doubt digging through my code will be of much help, especially based on the behavior of the read settings program. I think there is more 
required to use this API than the SDK explains.

-- 
Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.
Technical Details
Message-ID: <4120a4f4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,79f2a48d310c0034,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 16 Aug 2004 08:14:28 -0400
From: Michael Lueck <NmlueckO@SlueckPdataAsystemsM.com>
Reply-To:  NmlueckO@SlueckPdataAsystemsM.com
Organization: Lueck Data Systems
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Example of SHGetSetSettings anyone?
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.247.116.250
Message-ID: <4120a4f4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092658420 24.247.116.250 (16 Aug 2004 05:13:40 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail