OS/2, eCS & ArcaOS - Technical > Programming
EDM/2 - The API Project - Undocumented
Dave Yeo:
Seems it is uppercased internally anyways.
Martin Iturbide:
Hello
I have a confusion about Device Helper naming.
I don't know if they should be named (for example) "DevHelp_DeRegister" or "DevHlp_DeRegister" (without the 'e')
DevHelp Reference
- https://www.edm2.com/index.php/Physical_Device_Driver_(DevHlp)_Functions
- https://www.edm2.com/index.php/PDDREF:Device_Helper_(DevHlp)_Services
DevHlp Reference
- https://www.edm2.com/index.php/List_of_DevHlp_Functions
I'm searching source source code samples on github/os2world and seems that both are used. Are both fine?
Regards
Dave Yeo:
--- Code: ---G:\os2tk45>grep -ir devhelp_ *
h/entry.h: int (*DevHelp_OpenEventSem)();
h/entry.h: int (*DevHelp_SemHandle)();
h/entry.h: int (*DevHelp_PostEventSem)();
h/entry.h: int (*DevHelp_CloseEventSem)();
h/pddentry.h:extern void DevHelp_RegisterPDD(char *PDD_Name, void *PDD_Function);
h/pddentry.h:extern void *DevHelp_DynamicAPI(short Parm_Count, void *Worker);
--- End code ---
--- Code: ---G:\os2tk45>grep -ir devhlp_ * > out
grep.exe: book/addendum.inf: binary file matches
grep.exe: book/cp2.inf: binary file matches
grep.exe: book/sg244640.inf: binary file matches
grep.exe: write error: Disk full
--- End code ---
Which is weird as "G:\os2tk45>grep -ir devhlp_ * | less" shows a few hundred hits. Actually, 158 hits.
Steven Levine:
Hi,
The Device Helpers interface naming is inconsistent for historical reason. There is no one base reference for the Device Helpers interface. If you are going to pick a reference doc to start with, I recommend pdd.ref from the DDK. For sources, the the DDK headers are the place to start.
You will find references that match "Device Helpers", DeviceHelp, DevHelp, DevHlp and a few others.
As you found, there are some references in the Toolkit sources, but they are far from complete and, TTBOMK, were never used to write device drivers.
Part of the potential confusion is that the Device Helpers are not API functions per se, but rather a set of request codes and data structures passed to a single function. The kernel passes a pointer to this function to the driver when it passes control a driver for the first time.
What you are finding with functions like DevHelp_RegisterPDD(char *PDD_Name, void *PDD_Function); are bindings defined in various header files that make it easier to call the DevHlp consistently for a given request. The bindings are available in various forms for various compilers and assemblers. From the DDK, there's devhlp.lib and the associated devhlp.h. There's also devhelp.h with a set of OpenWatcom macros.
Martin Iturbide:
Thanks for the feedback Steven.
I will be checking devhlp.lib and devhlp.h to get a better idea. It is good to know this inconsistency is for historical reasons.
Regards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version