Win32 API samples

This collection of code snippets used to be hosted on
It is an old collection: it all began in 1996 or 1997, when Progress 8 was new and many of us were still using Windows 3.1 !!
Unlike wine or paintings, program code doesn't get better when it ages. You can find fragments that can be improved because Microsoft continuously expands their API, or are outdated because Progress has added features to the ABL so we don't need to use the WIN32 API anymore.

How to open a xdp-file with the default command for opening a pdf-file


I want open a file with an xdp-extention with the default program for a pdf-file.
I can't change the default program to open an xdp-file because that has stay another program (designing program)
So if i dubbelclick the xdp-file it has to open in the designer (default from installation) but if I open the file from my program (shellexecute) I want to open it with the default pdf-program.
Most of the time this will be a version of Acrobat but it can be another one.

I never know for sure what version of Acrobat the users have.

Get the memory usage of all running processes.

Does anyone know a good way of getting the memory usage of all running processes.

Hosting a Progress Application in a .Net Application

Hi there,

Is there a way to host a Progress 4GL app in an HTML page or in a .NET application. Is it possible to wrap it as an ActiveX control, or are there perhaps tools out there that provide some form of wrapper to turn it into a control?

Thanks for your help.

- Asim

XLS para CVS

Hello everybody.
I need to turn a csv file into xls in Unix.
How? Does anyone have a program in Progress?
Cláudia Martins

About WTSEnumerateSessions

Hi there,

I try to use the API Function WTSEnumerateSessions to get a list of Terminal Server Sessions.
Of course, it doesn't work quite well, so any help would be highly appreciated.

Look at the here-attached piece of code.
At line 64, replace "TerminalServerName" by a valid one and see what happen.
Apparently we have a valid handle to the server, the WTSEnumerateSessions returns the correct number of sessions, but I can't analyze the list of SessionId/Name/State.

How to integrate MessageBlaster into Progress application?

Actually I only need to trap the WM_ERASEBKGND event from within Progress. As I understand I should use msgblst32.ocx for this. But I never worked with OCX. Could anybody please give me information about the integration of the OCX into a Progress application?
Thank you very much in advance!

Where can I download MessageBlaster (msgblst32.ocx) ??

I cannot find any download link for msgblst32.ocx. Please help!!

.NET + OpenEdge Webservices using ProDataSet

We are trying to create an application with a thought of SOA, for this we
have selected .Net UI and progress web services using prodataset.

Problem is that .net client is not able to find prodataset reference in
services which are taking dataset as input parameter (they need to create
an object of that type to pass to this service).

How to add a colored square in the titlebar through api

Sometimes it's neccessary to add a Caption in the titlebar to give extra information to the user of your application. The attached file does this, and makes sure the window got redrawn when windows triggers arive.
As you can see, many instances of msgblst32 are added on this window. The goal is to make it more the controlling window which always catches the events on the underlaying session applications. As every window needs its own ocx, I provided 40 instances which are hopefully enough to maintain every window.



has anybody change the program PING.p placed in Win 32 Api - Networking to accept the name of the host?

Thanks in Advance.


Line Chart

I am working on a project that requires representation of data using line chart to be displayed in a frame.

Is this possible in progress? Any advice?

Thanx in advance

How to get the 'WTSSessionID' out of the WTSQuerySessionInformation function??

I need to get the 'SessionID' from a Terminal Server Session.
I've already found a Progress example how to use the 'WTSQuerySessionInformation' to get the username (= WTSInfoClass = 5 => pointer to a null-terminating string).

To get the SessionId I need to call the same function but with the WTSInfoClass = 4 (= pointer to a ULONG variabele)
How can I do this??? I've changed the parameter from 5 to 4 but I don't get a result!!

I also want to use the same function but with the WTSInfoClass = 23 (= WTSClientInfo => pointer to a WTSCLIENT structure)

Microsoft statusbar activex control customization


I have embedded Microsoft Statusbar activex control into our GUI application. The control is inside a smart frame and so that it can be easily included and customized for a container. I am using a imagelist activex control to display images inside the statusbar. The images (BMP, GIFS,JPEG,ICOM) looks stretched inside the statubar panel. The images are 16 X 16 resolution. Did anybody experienced similar problem. Can somebody help?



Hi guys,
I tried to create a program that will generate code that will export table contents to excel
and wanted other people to test my project. (P.S. Please excuse my coding, I'm just a starter with progress :}).

This program is created using Openedge 10.1B and tested using Microsoft Excel 2007
DB2Excel is a program that automatically generates code for importing data to excel.

Step 1: db2Excel Collects tables from the database and makes them available for selection.
(if needed for schema preview, you can edit the source code to view system tables)

Attributes & Events of MS Treview(Please help..(:<)

I am trying to use use checkbox property of MS Treeview.
Does anybody has an idea where can I find the attributes & events of an activeX control?

What I'm trying to do is to:
1. Identify the number of Entries in a Treview
2. Loop for each Entry in a treeview. And lastly,
3. To identify if that item's checkbox is selected.

If you have any Idea, please send me code sample how to achieve this.


Syndicate content