News:

OS2World.com Forum is back !!!

Remember to visit OS2World at:
http://www.os2world.com

Main Menu

EDM/2 - The API Project - Undocumented

Started by Martin Iturbide, April 08, 2025, 02:43:12 PM

Previous topic - Next topic

Martin Iturbide

Hello

I want to ask a little help here. I found this undocumented functions and I want to see if we can document those on the EDM/2 wiki.

1) DrgQueryFormat
Ref: https://www.edm2.com/index.php/OS/2_DLL_Entry_Points_Cross_Reference
- PMCTLS.107

2) DrgGetClipPS
Ref: https://www.edm2.com/index.php/OS/2_DLL_Entry_Points_Cross_Reference
- PMCTLS.108    PMDRAG.76

I want to provide as close as possible a documentation like this function as sample, syntax, parameters, etc.. just what we can find out.

Thanks in advance.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

#1
"DrgQueryFormat", as a starter: https://www.gladir.com/CODER/COS2/drgqueryformat.htm

ULONG DrgQueryFormat(PDRAGITEM dragItem, PCSZ a, ULONG b, PCSZ c, ULONG d);

Translation: "This function allows to query the data format of a drag operation."

The fun part will be to find out what "a", "b", "c", "d" stand for. I would suspect that "b" is the buffer size of string "a" and "d" is the buffer size of string "c".
My gut feeling is that this function is replaced by functions "DrgQueryNativeRMF" and "DrgQueryNativeRMFLen" plus possibly "DrgQueryTrueType" and "DrgQueryTrueTypeLen".



Martin Iturbide

#2
Thanks Lars.

Here in spanish we say "something is something", which also means "everything counts".

I had created the page with the corresponding warning first:

- https://www.edm2.com/index.php/DrgQueryFormat

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

#3
Hello

The github search can help me a little bit.

I found:
Quote
   ULONG APIENTRY DrgQueryFormat(PDRAGITEM pditem,
                                 PCSZ  pszAppMech,
                                 ULONG cbBuffer,
                                 PCSZ  pBuffer,
                                 ULONG ulFMTIndex);

Source.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

#4
Quote from: Martin Iturbide on April 08, 2025, 02:43:12 PM
2) DrgGetClipPS
Ref: https://www.edm2.com/index.php/OS/2_DLL_Entry_Points_Cross_Reference
- PMCTLS.108    PMDRAG.76

I only found this on the OS2World Github,
Quote
HPS   APIENTRY DrgGetClipPS(HWND hwnd,               // Not yet in PMWIN.H
                            HWND hwndClip,
                            ULONG fl);
Source.

-- https://www.edm2.com/index.php/DrgGetClipPS
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

I had finally republished (Courtesy of IBM) this two books on the EDM/2 (in wiki format) :
- Presentation Manager Programming Guide and Reference
- Graphics Programming Interface (GPI) Guide and Reference

Maybe there is no much interest because we already have online sources or the INF files, but it was useful also to have more information on the "The OS/2 API Project" inside the wiki.

There had been also interesting to find the "undocumented" API functions and try to find whatever information about it.

These last days I had been using AI (Gemini and Grok) to help me out create the wiki layout in a faster way from the IPF source.
So, a quality check will be also useful if someone cares.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

I was checking the "Programming Guide and Reference Addendum".

On "Device Helper (DevHlp) Services and Function Codes" there is this one that I can not find:
- DevHlp_FileOpen
The strange thing is that is list the same code, 7Fh, than "DevHlp_OpenFile" that is on the same page.  Does this "DevHlp_FileOpen" exists or it is a mistake?

On " APIs Supporting High Memory Objects" there are two functions I can not find:
- DosQueryPageUsage
- DosOpenMutexWaitSem
Are those mistakes or the documentation is available somewhere else ?

Thanks in advance for any tip or info.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

Out of curiosity, I grepped x:\os2 for all 4 functions, nothing seems to use them. Or they're called by ordinal.
I also grepped \os2tk45. Found DosQueryPageUsage() only in os2386.lib, so a real function not prototyped. Also found DevHlp_OpenFile() in inc\devhlp.inc. Take a look at the inc for cardinal(?) and comment.
All but DevHlp_FileOpen are also in addendum.inf. I'd assume DevHlp_FileOpen is a typo with OpenFile reversed, a typo I could see making.

Rich Walsh


Martin Iturbide

Thanks for the feedback.

What I understand is that:
1) DosQueryPageUsage - Exists, but it is undocumented.
2) DevHlp_FileOpen is a typo for "DevHlp_OpenFile"
3) DosOpenMutexWaitSem is typo for "DosOpenMuxWaitSem"

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

DosOpenMutexWaitSem is the one in the Programming Guide and Reference Addendum, under Additional APIs Supported in Warp Serever for e-business, so not a typo.

Rich Walsh

Quote from: Dave Yeo on May 17, 2025, 04:59:22 AM
DosOpenMutexWaitSem is the one in the Programming Guide and Reference Addendum, under Additional APIs Supported in Warp Serever for e-business, so not a typo.

??? That item _is_ the typo in question.

Compare the sequence of functions in that listing with those in the Control Program Guide and Reference. Where the Addendum has DosOpenMutexWaitSem, the more authoritative CP Ref has DosOpenMuxWaitSem.

Dave Yeo

Quote from: Rich Walsh on May 17, 2025, 08:28:26 AM
Quote from: Dave Yeo on May 17, 2025, 04:59:22 AM
DosOpenMutexWaitSem is the one in the Programming Guide and Reference Addendum, under Additional APIs Supported in Warp Serever for e-business, so not a typo.

??? That item _is_ the typo in question.

Compare the sequence of functions in that listing with those in the Control Program Guide and Reference. Where the Addendum has DosOpenMutexWaitSem, the more authoritative CP Ref has DosOpenMuxWaitSem.

OK, I made a typo when grepping for DosOpenMuxWaitSem. Now I see it in 3 inf's and prototyped in bsedos.h.
Thanks for the correction

Martin Iturbide

Hello. Thanks for the feedback.

For the moment I'm creating this page as draft to remember this conversation.
-- https://www.edm2.com/index.php/IBM_SDK/TK_Errata_Sheet

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

#14
Hello

Andreas made a correction on the EDM/2 wiki, but I don't think it is right. He changed that "WinHSWITCHfromHAPP" should be "WinHSwitchFromHapp"  (case change).
I personally do not think it is right. The references that I have is that when OSFree tries to clone the files it uses  "WinHSWITCHfromHAPP", the PMSHAPI.DLL entry points, and the "Programming Guide and Reference Addendum" guide.

Can you help me to find out which is the correct case?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.