Board index » delphi » EOleSysError with message 'Unknown language'

EOleSysError with message 'Unknown language'

Hi All!

I get EOleSysError with message 'Unknown language'  when running of the
following code
( on the last statement):

........................
 olemapt:variant;
......................
olemapt  :=CreateOLEObject('Transcad.AutomationServer');

 olemapt.RunMacro('MinimizeWindow', 'Frame|',
null, null,null,null,null,null,null,null);

Here Transcad is a program I try to use as a server. The type library of
this program
has a method RunMacro. The above code works if to run it in Visual Basic.
Did anybody get message 'Unknown language'  and what does it mean? Any help
wil be very appreciated.

   Evgeny Kleiman
       evg...@mapa.co.il      

 

Re:EOleSysError with message 'Unknown language'


Hello,

Are the null params supposed to be nulls or are they optional arguments? If
they are optional, you will need to pass EmptyParam into them instead of
Null. If youre using D3, you can define EmptyParam as:

var
  EmptyParam: OleVariant;

  TVarData(EmptyParam).VType := varError;
  TVarData(EmptyParam).VError := $80020004; {DISP_E_PARAMNOTFOUND}

have fun,
--
Binh Ly
Brickhouse Data Systems, Inc.
http://www.brickhouse.com

Quote
Evgeny Kleiman wrote in message <01bdd593$249204e0$719d74c0@evgeny>...
>Hi All!

>I get EOleSysError with message 'Unknown language'  when running of the
>following code
>( on the last statement):

>........................
> olemapt:variant;
>......................
>olemapt  :=CreateOLEObject('Transcad.AutomationServer');

> olemapt.RunMacro('MinimizeWindow', 'Frame|',
>null, null,null,null,null,null,null,null);

>Here Transcad is a program I try to use as a server. The type library of
>this program
>has a method RunMacro. The above code works if to run it in Visual Basic.
>Did anybody get message 'Unknown language'  and what does it mean? Any help
>wil be very appreciated.

>   Evgeny Kleiman
>       evg...@mapa.co.il

Other Threads