[fpc-devel] COM issues
Matthias Hryniszak
matthias at hryniszak.de
Fri Apr 15 21:21:43 CEST 2005
Hi,
I've got a question about COM programming in FPC. In the docs
(http://www.freepascal.org/docs-html/ref/refsu20.html) I've found:
Variants and interfaces
Remark: Dispatch interface support for variants is currently broken in the
compiler.
Is it still true? Why when I try to compile this simple application
program Test;
{$MODE DELPHI}
uses
ActiveX, ComObj;
var
COM: Variant;
begin
CoInitialize(nil);
COM := CreateOleObject('Shell.Application');
COM.MinimizeAll;
CoUninitialize;
end.
The compiler tells me:
Free Pascal Compiler version 1.9.9 [2005/04/15] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
test.pp(14,7) Error: Illegal expression
test.pp(14,7) Fatal: Syntax error, ";" expected but "identifier MINIMIZEALL"
found
Error: X:\FPC\Bin\i386-win32\ppc386.exe returned an error exitcode (normal
if you did not specifiy a source file to be compiled)
What's going on? Anybody can help? do I have to compile the compiler with
some extra settings to make Variants work as late-binding variables? I've
got a little dead-line here and I have to make a decition if I take the
delphi compiler or fpc and if I don't get this to work I'll have to take
delphi and that's something I really don't want. Huston, please advice!
Regards,
Matthias (matthias at hryniszak.de)
More information about the fpc-devel
mailing list