and still more problems with Progress ABL & MemoryStream

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

and still more problems with Progress ABL & MemoryStream

Postby BartG » Tue Jun 10, 2008 1:08 am

:(
We are still having problems trying to create a memorystream
and writing the VPE document to that stream using Progress ABL.

At this time, I don't believe the problem is with VPE, but
rather, with Progress, and I'm hoping to enlist your help in
trying to understand what is/isn't happening so I can convey it
to Progress and see if they can offer an alternate solution.

I tried creating a memory stream using the example VB code you
provided, but no matter what type of variable I use, other than a
character type variable, I get a "Type-Mismatch" error when I try
to create the memorystream. I have tried using BLOBS, CLOBS,
memory pointers, handles, and anything else I can think of, but
CreateMemoryStream fails with the "Type-MisMatch" error unless I
try to create the stream using a character variable. Progress
Streams don't seem to work either, because we get an "Undefined
Variable" message when we try to do the CreateMemoryStream using
them.

Even when I use a character variable and my procedure gets past
creating the memorystream, I cannot do the WriteDocStream because
I again either get a Type-Mismatch, or a message that I have an
incorrect number of parameters.

Like I stated above, I believe the problem is in PROGRESS rather
than VPE, and I am not sure that PROGRESS has an equivalent data
type to TVPEStream that you reference in the VB example you
provided. It seems as though TVPEStream is some type of propriety
datatype bound within the VPE application. Can you please send as
much detail about this datatype, so we can properly match it in the
Progress 4GL language. What would be used for datatype matching in
C#, Java or C++? Because IDEAL does not have much experience with
Progress, we are hoping to learn how to handle the TVPEStream in
another language in an attempt to handle it within Progress. If there
is any other information that you think would be helpful, I would
appreciate that too. We want to be able to talk to Progress and give
them as much information as possible to help us resolve this issue.

Also, if you are aware of anyone who has created and written a VPE
to a memorystream in PROGRESS, we would like to talk to them.

Thanks in advance for your help!

Bart
BartG
 
Posts: 17
Joined: Tue Mar 18, 2008 5:06 pm
Location: Scottsdale,AZ

Postby IDEAL Software Support » Tue Jun 10, 2008 10:39 am

TVPEStream is a COM object. PROGESS should be able to handle this. So WriteDocStream() should go through. Are you providing an object of type TVPEStream as parameter to WriteDocStream()?

Maybe your problem is related to the fact that PROGRESS does only allow the type "char" to be used as buffer for copying data from / to the stream.

You should forward the VB 6 example code to PROGRESS support, this should be sufficient to analyze the problem.

In addition I provide you here the COM declarations of the Read and Write methods of the TVPEStream object, which might be helpful for the PROGRESS support team:

Code: Select all
HRESULT Read([in, out] SAFEARRAY(BYTE) *psaByteArray, [in] long Size, [out, retval] long *pVal)

HRESULT Write([in, out] SAFEARRAY(BYTE) *psaByteArray, [in] long Size, [out, retval] long *pVal)
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron