support for 2D and 3D arrays (variant) from and to Progress

whitefeather

New Member
As I am trying to communicate with a com handle, I came across the problem that Progress does not support 2 dimensional arrays for interfacing to and from com objects (dll, active-X or exe).

This problem is known by Progress support, as it is an enhancement request, and you know how enhancement requests are threated at Progress.

Can anyone please explain why in progress we do not have a structure like:

define variable cString as char extent 3 by 2 no-undo?

so you would reference it as --> assign cString[1,2] = "Some text"
and you could pass a variant pointer to this structure to the dll?

What I need is some temp-table like structure to send 2d and 3d safe arrays over to the dll. In one occasion I get a 3d array back of all available folders within the com application (In my case INVU inboxes),
In other occasions I'd like to be able to send search values in a 2d or 3d safe array.

Has anyone come up with a workaround yet that does not give shared memory violations?
The one I came up with is not in Progress, but to create a ´wrapper´com object for the original com object, that translates the 2d and 3d array structures tot and from progress and calls the original methods in the originating com object.
In my opinion it is a serious Progress bug / shortcoming that there still is no support yet for this type of arrays...
Yet another reason to build my UI in another programming language and not use Progress.
As with other )e.g. open source' databases becoming better and better very rapidly, even the choice for using the progress rdbms might be reconcidered, as interfacing to other platforms is much more open with other RDBMS systems...

Anyway, using mempointers I end up with working compiled code, but the Windows OS kills the application when more then one placeholder (e.g. array record) is returned.

In pseudo code i need to do the following thing:

----
create array arResults[28,2];
create array arSearch[10,2,3];

create pointer-to-array pntrResults for arResults;
create pointer-to-array pntrSearch for arResults;

<com-handle>:SearchFunction(session_id, pntrSearch, output pntrResults);

---

2d and 3d arrays are no problem in VB, C++, C, PHP and so on,
Why is this STILL not possible in Progress (which is build on a C++ kernel)?
Progress should be ashamed of itself ...
 
believe me, i'm not justifing it by any means !!

complex structures in progress are temp-tables period. for 2d arrays, 3d arrays and anything else. always have been way back since work-files.

maybe ... it's abit more complex since progress vars are variable length ? we'll probably start seeing complex structs soon with oo4gl.


you'll need to use memptr to pass arrays to dll's etc. i think, you'll find some progress examples @global-shared.com and peg.com

i prefer to avoid the current win95 gui, if you're going with progress for the presentation layer, i think, you'll be much happier with a web ui.

don't know what they're planning in their new gui strategy ?? maybe we'll get an update at exchange
 
Workaround

I started working on a work around to get the job done.
Created an ocx that can be placed on the search window (the ocx can be hiddden for visual purposes) and there I pass the search criteria to, one by one. If all search criteria are set, I let the ocx do the job and read the sesults from the ocx.

As the ocx is session based on the window, it can hold a virtual session per window or per user, depending in what mode I start it up. (The actual session for INVU runs on the invu com object).

Any suggestions on what might be the fatstest way to pass temptable / record like stuctures to and from an OCX?

Thanks in advance,

Mark:)
 
Back
Top