[fpc-devel] COM issues

Florian Klaempfl florian at freepascal.org
Fri Apr 15 21:30:22 CEST 2005


Matthias Hryniszak wrote:

> 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? 

Yes.

> 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!

Don't expect that dispatch interface in fpc work within the next week
except if somebody pops up suddenly with a patch ;)


> 
> Regards,
> 
> Matthias (matthias at hryniszak.de)
> 
> 
> 
> 
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel





More information about the fpc-devel mailing list