George Potemkin
Member
ProTop and Readprobe use CreateProcessA procedure to create new processes on Windows.
But the programs use the following construction to define the types of CreateProcessA procedure's parameters as well as for the functions used to read the memory structures:
Progress knowledgebase has a few articles with the examples how to call the CreateProcessA procedure but they don't use such construction.
What was changes in OpenEdge V11.3?
Why we need to use INT64 instead of LONG on Windows 64-bit but only with newest Progress versions?
Is it about the signed vs unsigned 4-byte integers?
My CreateProcessTest.p (attached to Question - OS-COMMAND and the quotes.) is using only LONG type and it seems to work correctly. Why?
Second question:
CreateProcessA procedure allows to return a PID of newly created process:
My test program allows to compare these PIDs with the real PIDs reported in database log. They do not match:
Any thoughts why?
_progres.exe and prowin.exe connect a database with PIDs given them from a birth (unlike _mprosrv.exe).
But the programs use the following construction to define the types of CreateProcessA procedure's parameters as well as for the functions used to read the memory structures:
Code:
&IF DECIMAL(SUBSTRING(PROVERSION,1,INDEX(PROVERSION,".") + 1)) < 11.3 &THEN
LONG
&ELSE
&IF {&PROCESS-ARCHITECTURE} = 64 &THEN
INT64
&ELSE
LONG
&ENDIF
&ENDIF
What was changes in OpenEdge V11.3?
Why we need to use INT64 instead of LONG on Windows 64-bit but only with newest Progress versions?
Is it about the signed vs unsigned 4-byte integers?
My CreateProcessTest.p (attached to Question - OS-COMMAND and the quotes.) is using only LONG type and it seems to work correctly. Why?
Second question:
CreateProcessA procedure allows to return a PID of newly created process:
Code:
opPID = GET-LONG(hProcessInfo, 9). /* dwProcessId */
Code:
[2026-03-16T11:04:55.059+03:00 CreateProcessA (Sync) test # 1
[2026/03/16@11:04:55.186+0300] P-32508 T-34260 I ABL 2: (452) Login by george on CON:.
[2026/03/16@11:04:55.191+0300] P-32508 T-34260 I ABL 2: (7129) Usr 2 set name to george.
[2026/03/16@11:04:56.287+0300] P-32508 T-34260 I ABL 2: (453) Logout by george on CON:.
[2026-03-16T11:04:56.356+03:00 PID: 5664
[2026-03-16T11:04:56.363+03:00 CreateProcessA (Sync) test # 2
[2026/03/16@11:04:56.485+0300] P-51292 T-49412 I ABL 2: (452) Login by george on CON:.
[2026/03/16@11:04:56.489+0300] P-51292 T-49412 I ABL 2: (7129) Usr 2 set name to george.
[2026/03/16@11:04:57.596+0300] P-51292 T-49412 I ABL 2: (453) Logout by george on CON:.
[2026-03-16T11:04:57.646+03:00 PID: 4652
[2026-03-16T11:04:57.653+03:00 CreateProcessA (Sync) test # 3
[2026/03/16@11:04:57.776+0300] P-45612 T-2416 I ABL 2: (452) Login by george on CON:.
[2026/03/16@11:04:57.781+0300] P-45612 T-2416 I ABL 2: (7129) Usr 2 set name to george.
[2026/03/16@11:04:58.878+0300] P-45612 T-2416 I ABL 2: (453) Logout by george on CON:.
[2026-03-16T11:04:58.925+03:00 PID: 2336
Code:
_progres empty -zp
The id of this process is 5868. (1408)
[2026/03/16@13:04:25.378+0300] P-5868 T-37620 I ABL 2: (452) Login by george on CON:.
prowin empty -zp
The id of this process is 27052. (1408)
[2026/03/16@13:06:06.099+0300] P-27052 T-50184 I ABL 2: (452) Login by george on CON:.
proserve sports -zp
13:08:05 SERVER : The id of this process is 38908. (1408)
[2026/03/16@13:08:05.859+0300] P-15496 T-46740 I BROKER 0: (333) Multi-user session begin.