data-types for dll's

Posted by DenDuze on 29-Jun-2018 01:45


I'm trying to make some functions work in Progress of a - like they call it a 'native mode DLL' but I have some problems where I could use some help ;-)

The function expects a "Window handle of a text control"
As far as I know that means the <widget>:hwnd,
The problem is that the widget that I use is a System.Windows.Forms.TextBox and there is nu hwnd-property for that so I tried with:
define variable phwnd as System.IntPtr no-undo.
assign phwnd = TextBox1:handle.

Can someone confirm me that this TextBox1:handle is the same as the hwnd of that widget??
If not: how can I get the hwnd of a System.Windows.Forms.TextBox control?

The second problem are some other parameters that I need to provide.
In the example (VB) I see:

I converted these to
&global define ...
But how must I convert the values??? I guess &H1& will not work in Progress
Also the function that I want to use expects the following as a input parameter: Options bit-mask
As far as I understand that is a combination of all global Const (see above) that I want to use, so for example &H1& and &H4&. So I guess I will need to sum up all the wanted values. I'm I correct here?

Hope someone can help here because I only get the error that the data-types do not match but no idea what parameter is wrong (the hwnd or the option bit-mask)


All Replies

Posted by Matt Gilarde on 29-Jun-2018 03:24

The .NET Handle property is the equivalent of the ABL HWND attribute.

Hexadecimal values can be used in OpenEdge with the 0x prefix (zero, not the letter O)::




In this case you can add the values to combine them because each value uses only a single bit. If the values used multiple bits you would have to use a bitwise OR to combine them.

If you post a bit of code which you're having trouble with we can help you sort it out.

Posted by DenDuze on 29-Jun-2018 08:32

Hi Matt,

Thanks to confirm that the .Net handle is the equivalent of the hwnd!

Now i did not know about these Hexadecimal values.

First I will try a bit myself.

If I can't get it to work i will post it here


This thread is closed