🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.components.writing
2 messages
2 total messages Started by M.IRH Tue, 25 Nov 1997 00:00
IPropertyBag does not work on NT?
#6
Author: M.IRH
Date: Tue, 25 Nov 1997 00:00
16 lines
1189 bytes
Hi

 I read Conrad Herrmann's DAX FAQ and implemented
IPersistPropertyBag into my control. It works fine
on Windows 95. But when I try to use it on WindowsNT
with MSIE3.0, it does not work. If the value for a
parameter includes a character that cannot be interpreted as
a numerical value (like <PARAM NAME="CAPTION" VALUE="Click">),
READ method of IPropertyBAG does not return S_OK. In other words,
only parameters whose values are numerical values work.

Has anyone succeeded in implementing a parameter of string type
on Windows NT? Or has anyone ever had the same problem?

 Thanks in advance.
Re: IPropertyBag does not work on NT?
#7
Author: 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.
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