> When I put properties in the published section of an ActiveForm's
> implementation, the compiler wants the calling convention to
> be "register."
Please show the actual code and error message.
> How can I set that in the Type Library editor
You can't, nor should you be trying to. Anything that is exposed via COM
has to use stdcall or safecall instead.
Gambit
private
function Get_ShowFileList: WordBool; safecall; register;
procedure Set_ShowFileList(const Value: WordBool); safecall; register;
function Get_ShowControlPanel: WordBool; safecall; register;
procedure Set_ShowControlPanel(const Value: WordBool); safecall;
register;
published
property ShowFileList: WordBool read Get_ShowFileList write
Set_ShowFileList;
property ShowControlPanel: WordBool read Get_ShowControlPanel write
Set_ShowControlPanel;
end;
The compiler insists on the "register" keyword. WIthout it:
[DCC Error] uSomeImpl.pas(225): E2270 Published property getters and setters
must have REGISTER calling convention
But now I'm thinking... these "published" properties aren't just going to
show up in the ActiveX the way they do in a component, now are they... COM
makes my head hurt...
"Remy Lebeau (TeamB)" <no....@no.spam.com> wrote in message
news:47c70c1e$1...@newsgroups.borland.com...
> [DCC Error] uSomeImpl.pas(225): E2270 Published property
> getters and setters must have REGISTER calling convention
That means using fastcall (Delphi's default convention) instead of using
safecall.
Why are you publishing your properties in the first place, though? They
should be public instead.
> But now I'm thinking... these "published" properties aren't just going
> to show up in the ActiveX the way they do in a component, now are
> they...
No. They have to be declared in the ActiveX's Type Library in order for
clients to use them. There is no such thing as "published" in COM.
Gambit
"Remy Lebeau (TeamB)" <no....@no.spam.com> wrote in message
news:47c7...@newsgroups.borland.com...