Board index » delphi » VB Com object called from Delphi

VB Com object called from Delphi

I have a VB Com object that I am trying to call from Delphi.  The problem is
one of the Parameters is an array of strings(Example:  Jparms() as string).
Everything I try to pass it the field returns an error that the item does
not support containers.  Is there a way to pass data into a VB array of
strings?

Thanks in advance,

Robert A. Franklin

 

Re:VB Com object called from Delphi


<<Robert A. Franklin:
Is there a way to pass data into a VB array of
strings?

Quote

You can pass a variant array of strings.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Re:VB Com object called from Delphi


Unfortunately I have tried a Variant array of strings.  Here is the VB
object code:

Public Sub JQueJParm(Value() As String)
    If Not mflgEditing Then Err.Raise 383

    mudtImageProps.JParm = Join(Value, vbCrLf)
    mudtImageProps.JParm_Flag = 1
    mobjValid.RuleBroken "JParm", False
    Call ValidJParm
    mflgDirty = True
End Sub

Here is my code from Delphi to assign the value to the object. The Object
creates fine and several other properties can be assigned with no problem.
The only problem I am having is with the Dynamic array procedure.

Var tmpStr : Array of Variant;
begin
   tmpStr:=VarArrayCreate([0,8], varOLEString);
  JQueue.JQueJParm(tmpStr);
end;

I receive a type mismatch.  I have tried varVariant and OLEVariant.
Any more help would be greatly appreciated.

Robert

Deborah Pate (TeamB) <d.p...@cableinet.co.not-this-bit.uk> wrote in message
news:VA.0000074e.00298730@cableinet.co.not-this-bit.uk...

Quote
> <<Robert A. Franklin:
> Is there a way to pass data into a VB array of
> strings?

> You can pass a variant array of strings.

> --
> Deborah Pate (TeamB) http://delphi-jedi.org

>   Use Borland servers; TeamB don't see posts via ISPs
>   http://www.borland.com/newsgroups/genl_faqs.html

Other Threads