Groups | Search | Server Info | Login | Register


Groups > comp.os.os2.programmer.misc > #1715

Re: win32 via odin

Newsgroups comp.os.os2.programmer.misc
Date 2023-07-15 17:56 -0700
References <a29691a7-9701-4935-a5b2-986c5f5c2bddn@googlegroups.com> <Aj3sM.255151$edN3.186930@fx14.iad> <83234834-db2d-42ac-8bc6-0fcf631f53b9n@googlegroups.com> <7ee4e13c-63ae-4c02-a17d-b183c5045e92n@googlegroups.com> <e48bb3c4-e0c0-409f-b13b-c172afb74b47n@googlegroups.com>
Message-ID <fc31cff0-19f8-4a52-a14b-976c91b3387an@googlegroups.com> (permalink)
Subject Re: win32 via odin
From Paul Edwards <mutazilah@gmail.com>

Show all headers | View raw


I had some luck.

I finally found the programming documentation:

http://www.os2museum.com/wp/os2-history/os2-library/os2-2-0-technical-library/

and now I know (PDF scan) why google searching didn't find it.

I thought this was the right manual:

http://www.os2museum.com/files/docs/os220tl/os2-2.0-pdd-ref-1992.pdf

page 18-93

But this code:

    APIRET rc;
    ULONG tempRead;
    USHORT parm = 1;
    ULONG parmlen = sizeof parm;
    KBDKEYINFO cd;
    ULONG datalen = 0;

printf("about to ioctl\n");
    rc = DosDevIOCtl(0 /* handle */,
                     4, /* category */
                     0x74, /* function */
                     &parm, /* parm area */
                     sizeof parm,
                     &parmlen, /* potentially output */
                     &cd, /* data area */
                     sizeof cd, /* maximum size */
                     &datalen); /* potentially output */
    printf("rc is %d\n", rc);

gave me a return code of 22, which I found out from the
Watcom header is UNKNOWN_COMMAND, and that
seems to be documented here:

This function returns an UNKNOWN_ COMMAND error if the caller is in the Presentation Manager session


Even though I'm running via command prompt. I tried opening
a fullscreen window, but that didn't change anything, ie still
rc 22.

Then I had the idea that maybe I'm not supposed to be using
the Physical Device Driver Reference and I should instead be
using either the Virtual Device or Presentation.

I'm currently downloading those manuals and it's taking a while.

I also checked the Watcom header and found:

bsesub.h: USHORT APIENTRY16 KbdCharIn(PKBDKEYINFO,USHORT,HKBD);

So it's the 16-bit call that was mentioned, and Watcom
must do auto-thunking.

Ideally I wouldn't rely on that and would switch to 32-bit
DosDevIOCtl:

bsedos.h: APIRET APIENTRY DosDevIOCtl(HFILE,ULONG,ULONG,PVOID,ULONG,PULONG,PVOID,ULONG,PULONG);

(note APIENTRY, not APIENTRY16)

BFN. Paul.

Back to comp.os.os2.programmer.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-13 13:46 -0700
  Re: win32 via odin Dave Yeo <dave.r.yeo@gmail.com> - 2023-07-13 20:30 -0700
    Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-14 22:02 -0700
      Re: win32 via odin xhajt03 <xhajt03@gmail.com> - 2023-07-15 15:34 -0700
        Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-15 16:05 -0700
          Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-15 17:56 -0700
            Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-15 18:29 -0700
            Re: win32 via odin xhajt03 <xhajt03@gmail.com> - 2023-07-15 20:43 -0700
              Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-15 23:17 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-15 23:47 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-16 02:20 -0700
                Re: win32 via odin xhajt03 <xhajt03@gmail.com> - 2023-07-16 03:58 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-16 09:03 -0700
                Re: win32 via odin xhajt03 <xhajt03@gmail.com> - 2023-07-16 14:51 -0700
              Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-12-20 10:35 +0800
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-12-20 14:16 +0800
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-12-20 16:24 +0800
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-12-20 20:10 +0800
            Re: win32 via odin Dave Yeo <dave.r.yeo@gmail.com> - 2023-07-16 20:30 -0700
          Re: win32 via odin Dave Yeo <dave.r.yeo@gmail.com> - 2023-07-16 20:44 -0700
            Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-16 21:11 -0700
              Re: win32 via odin Dave Yeo <dave.r.yeo@gmail.com> - 2023-07-16 23:04 -0700
                Re: win32 via odin Dave Yeo <dave.r.yeo@gmail.com> - 2023-07-16 23:11 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-17 07:07 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-17 07:13 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-17 07:48 -0700
                Re: win32 via odin Paul Edwards <mutazilah@gmail.com> - 2023-07-17 16:50 -0700

csiph-web