Enums are simply integers so try using this when defining the StreamInfo structure with Struct. The first enumeration is 0 with each successive element incremented by 1.
It looks like you should be able to handle this with VFP. There are no complex structures (e.g. pointers to structures within structures). For that, I would recommend Ed Rauh's ClsHeap class.
HTH.
>I am in a situation where I am calling a COM object written in C++ that requires two parameters to be passed. The first parameter is a string (e.g. "e:\boso.mpg") and the second parameter is a reference to a streaminfo structure.
>
>...
>ocv = createobject("cineviewserver.cvproserver")
>ocv.initialize(0)
>ocv.GetStreamInfo("e:\boso.mpg",@streaminfo)
>...
>
>Unfortunately streaminfo is a user defined type which is not supported in VFP
>
>enum tVelaStreamType
>{
> AUDIO_ELEM,
> VIDEO_ELEM,
> AUDIO_PES,
> VIDEO_PES,
> MUXED,
> STINVALID
>}
>
>typedef struct
>{
> tVelaStreamType StreamType;
> double MuxedRate;
> int numProgramEntries;
> int numVideoStreams;
>}tVelaStreamInfo
>
>
>I came across STRUCT.ZIP by CHRISTOF LANGE in the WINAPI section but it came short because it did not cover the enum structure.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao