🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.components.writing
Article #7

Re: IPropertyBag does not work on NT?

#7
From: Mike Dillamore
Date: Tue, 25 Nov 1997 00:00
28 lines
1765 bytes
>Has anyone succeeded in implementing a parameter of string type
>on Windows NT? Or has anyone ever had the same problem?


I have had success, but I started from Borland's own code rather
than Conrad's (Borland added an IPersistPropertyBag example in
Delphi 3.01;  see the directory \Demos\ACTIVEX\PROPBAG).

Actually, Borland's sample code does have a couple of bugs:

(i) The .PersistPropBagLoad method needs the following
    statement inserting near the top of the inner 'for' loop:

    VarClear(PropValue);

    Without this, and unless you are very lucky, some properties
    will fail to load, as the variant type field will still be set to the
    value returned from the last successful read.

(ii) Certain data types, including fonts, are not handled properly
    by the code.  Worse, inadequate exception handling means
    that if one property fails to load, no attempt is made to continue
    with subsequent properties.

Borland's code indiscriminately tries to store all properties, which
may or may not be what you want.  Despite these problems, it's
a useful and instructive example.
Technical Details
Message-ID: <65edqg$qt3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <347A8092.68E3@sakura.kudpc.kyoto-u.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fe2ce,2dd0677ac8822d72
X-Google-Attributes: gidfe2ce,public
X-Google-Thread: f5214,2dd0677ac8822d72
X-Google-Attributes: gidf5214,public
From: "Mike Dillamore" <mike.dillamore@controls.eurotherm.co.uk>
Subject: Re: IPropertyBag does not work on NT?
Date: 1997/11/25
Message-ID: <65edqg$qt3@forums.borland.com>
X-Deja-AN: 292498981
References: <347A8092.68E3@sakura.kudpc.kyoto-u.ac.jp>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: None
Newsgroups: comp.lang.pascal.delphi.components.writing,borland.public.delphi.activex.controls.writing