• PRG4 - ����� �p� �����y����p������ �y��樨

    From FAQServer@2:5020/181 to All on Thu Jun 19 07:37:08 2025
    [Q]: ����� �p� �����y����p������ �y��樨

    [A]: Julius Goryavsky (2:5030/16.32)

    ���������� � bseord.h ����py��� ���쬠 ���p��� �-樨:

    Win32SwitchProgramRegister 156
    Prf32QueryDefinition 111 - �� ���� � pmshl.h,
    Prf32AddProgram 109 �� ���p��y�� ����� �� �� Prf32RemoveProgram 104 �⭮襭�� � ᮤ�p�����y
    Prf32ChangeProgram 110 WPS`��᪨� 䮫��p��.

    �p� �� �� ����...

    Dos32OpenChangeNotify 440 - ��� �� �祭� ��宦� ��
    Dos32ResetChangeNotify 441 �����p��� ����y�� �
    Dos32CloseChangeNotify 442 䠩��� ?

    ��� � ����. �� �y��樨 y��������� �� ���������� �
    ����p���py���� ��⠫���. �� �y��樨 ��⨢�� �ᯮ��y��
    WPS. H��p���p, �᫨ ᮧ���� ��⠫�� C:\DESKTOP\TEST � ��
    desktop-� �᪮p� ����� ����� � ������ test, ��� ��p��
    ᮤ�p������ c:\desktop � ������� dosfindfirst/next �� ��
    ������.

    ����� ��-���y�� ���������� ���p��樥� �� �� �맮�� �
    �����祭��.

    ��� ���ᠭ�� ��直� �����y����p������ �y��権:

    ----------------------------------------------------------

    APIRET APIENTRY DosTmrQueryTime (QWORD Time)

    ����y� � _�祭�_ �筮�y ����p�⭮�y ⠩��py. ���
    ��䥪⨢��� �筮��� ������ � _���p�_ᥪy���. Time - 8 ����
    ᮤ�p���� ⥪y饥 �p��� � ������ ��⥬���� ⠩��p�. ��.
    DosTmrQueryFreq. � �ᯮ��y� ��y �y���� ��� ⠩��p������
    �p�楤yp �ᯮ������ ���p�� ������� 200-400 ⠪⮢ �
    ���y�� �����쭮 ��� p��y�����.

    ----------------------------------------------------------

    APIRET APIENTRY DosTmrQueryFreq (ULONG Freq)

    ��p������� ����y ��⥬���� ⠩��p�. Freq - ����
    ��⥬���� ⠩��p�. �p������⥫쭮 1193182 ��.

    ----------------------------------------------------------

    APIRET APIENTRY DosReplaceModule (PSZ OldModule,
    PSZ NewModule,
    PSZ BackModule)

    �������� �������� ���py���� �p��p����� ���y�� �����
    ������. ��y �y���� �ᯮ��y�� service pack-� � selective
    install ��� ������ ��p�� dll ���묨. H��p���p, ����� �p�
    ���⠫�樨 ������ ������p����p� ���� �������� dspres.dll.

    OldModule - ��� 䠩�� � �����塞�� dll ��� exe.
    NewModule - ��� ������ 䠩��, ���p� ����py���� ��
    ���� ��p���. ����� ���� NULL.
    BackModule - ��� backup-䠩�� � ���p� ��p��������-
    ������ ��p� ���y��. ����� ���� NULL.

    � ᢮� ��p��� �� �y���� �ᯮ��y�� �����y����p����-
    �y� �y���� Dos32ICacheModule...

    ----------------------------------------------------------

    APIRET APIENTRY DosDumpProcess (ULONG Flag, ULONG Drive,
    ULONG pid)

    ������ ���p��p� DUMPPROCESS � CONFIG.SYS.

    �᫨ Flag = 0 � ���p�頥� ���������� �����������
    �p���ᮢ �� ���, �᫨ Flag = 1 � p��p�蠥�. Drive
    ��p������ ����p ��᪠ (��稭�� � �y��) �� ���p� ����y��
    ������ ����������� �p���ᮢ. �᫨ Flag = 2 � pid
    ��p������ �p���� �������騩 ����������.

    ----------------------------------------------------------

    APIRET APIENTRY DosForceSystemDump (ULONG Reserved)

    �p������� ���������� �ᥩ ��⥬��� ����� �� ���
    ᯥ���p����� � ���p��p� TRAPDUMP 䠩�� CONFIG.SYS.

    ----------------------------------------------------------

    APIRET APIENTRY DosQueryABIOSSupport(ULONG reserved)

    ����p�頥� p������ 䫠�� �p���p��y�騥 ⨯
    ��⥬��� 設� � �����p��� ABIOS:

    ��� 0: �᫨ p���� 1 � 設� - Micro Channel Architecture.
    ��� 1: �᫨ p���� 1 � 設� - EISA.
    ��� 2: �᫨ p���� 1 � ABIOS �����p��������.
    ��� 3: �᫨ p���� 1 � ABIOS �y���y��.

    �᫨ ����p�頥� 0h � ABIOS ����, �᫨ �� ���� - ��� ���
    Not Supported.

    ----------------------------------------------------------

    APIRET APIENTRY DosQueryModFromEIP (HMODULE * hmod,
    ULONG * obj,
    ULONG BufLen,
    PCHAR Buf,
    ULONG * Offset,
    ULONG Address)

    ��p������� ���y��, � ��p�᭮� �p���p���⢮ ���p���
    �������� y������ ��p��. �室: Address � BufLen. ��⠫쭮�
    - �� ��室�. Address - �p���p塞� ��p��. BufLen - �����
    �y�p� ��� ����� ���y�� ���p��y �p��������� ��p��, Buf -
    ᠬ �y�p. Obj - ����p ��ꥪ� ����� � ���p� �����
    ��p��, Offset - ᬥ饭�� � ���y��. hmod - Handle ���y��
    ���p��y �p��������� ��p��.

    ----------------------------------------------------------

    APIRET APIENTRY DosSuppressPopUps (ULONG Flag,
    ULONG Drive)

    ����⠥� ������� ���p��py SUPPRESSPOPUPS � CONFIG.SYS.
    Flag = 0 - Disable �ᯫ����騩 ��p�� � Help,Retry,End
    Process � �.�. (HARDERR.EXE), Flag = 1 - Enable. Drive
    ᮤ�p��� ����p ��᪠ �� ���p� ���� ᫨���� ���ᠭ�� ᡮ�
    �p� Disabled Pop-Ups.

    ----------------------------------------------------------

    APIRET APIENTRY DosVerifyPIDTID (ULONG pid, ULONG tid)

    ��p������ �y���y�� �� 楯�窠 tid � �p���� pid.
    �᫨ ��p�y�� 0h - �� Ok, ���� 楯�窠 �� �y���y��. ���
    ��� �p���� ������� �y��⢮���� ��� 楯�窨 1, � �맮�
    DosVerifyPIDTID(pid, 1) ��p������ ��� �� �p����.

    ----------------------------------------------------------

    HAPP APIENTRY WinHAPPFromPID (ULONG pid)

    ���y��� HAPP �� PID. �᫨ ��p�y�� 0h � Error.

    ----------------------------------------------------------

    HSWITCH APIENTRY WinHSWITCHFromHAPP

    ���y��� HSWITCH �� HAPP. �᫨ ��p�y�� 0h � Error.

    DosOpenChangeNotify
    DosCloseChangeNotify
    DosResetChangeNotify

    [A]: Peter Fitzsimmons

    ������ ���p��... �������� ��p������� 䠪� �����-����
    ��������� �� ��᪥. �� ��� �ᯮ�짮����� ��� �y��権 WPS
    ��p������ ������������� ��� ��祧������� 䠩�����
    ��ꥪ⮢. ���y� �ᯮ�짮������ ��� ����p��� �� ����������
    ���ﭨ� ��⠫��� � ����� �� ���� H�p⮭� � �.�... ���
    �����檮� ���ᠭ��:

    Does anybody know why the DosNotify.. functions are
    ommitted from the 32 bit API.

    (Fyi: they are DosFindNotify...(), not just
    DosNotify...()).

    I can't even find these in my 1.x header files.

    I do know that they are still there -- IFSs must support
    them, and the WorkPlace shell actively uses these services
    in the IFSs I have written.

    Try prototyping them yourself and using them.

    [later] After perusing \ddk\h (A great place find
    "undocumented" os/2 APIs), it appears that you may the
    correct -- the DosFindNotify...() apis no long exist as
    32bit apis (but you can still import the 16bit ones if if
    like).

    They appear to have been replaced by something better
    (which probably uses the FindNotify IFS services
    underneath). You'll have to figure these out on your own
    (please report back here);but they don't look too hard:

    #pragma pack(1)

    typedef struct _CNPATH { /* CHANGENOTIFYPATH */
    ULONG oNextEntryOffset;
    ULONG wFlags;
    USHORT cbName;
    CHAR szName[1];
    } CNPATH;
    typedef CNPATH *PCNPATH;

    typedef struct _CNINFO { /* CHANGENOTIFYINFO */
    ULONG oNextEntryOffset;
    CHAR bAction;
    USHORT cbName;
    CHAR szName[1];
    } CNINFO;
    typedef CNINFO *PCNINFO;

    #pragma pack()

    // Equates for ChangeNotifyInfo baction field

    #define RCNF_FILE_ADDED 0x0001
    #define RCNF_FILE_DELETED 0x0002
    #define RCNF_DIR_ADDED 0x0003
    #define RCNF_DIR_DELETED 0x0004
    #define RCNF_MOVED_IN 0x0005
    #define RCNF_MOVED_OUT 0x0006
    #define RCNF_CHANGED 0x0007
    #define RCNF_OLDNAME 0x0008
    #define RCNF_NEWNAME 0x0009
    #define RCNF_DEVICE_ATTACHED 0x000A
    #define RCNF_DEVICE_DETACHED 0x000B

    APIRET APIENTRY DosOpenChangeNotify(PCNPATH PathBuf,
    ULONG LogSize,
    PHDIR hdir,
    ULONG ulReserved);

    APIRET APIENTRY DosResetChangeNotify(PCNINFO LogBuf,
    ULONG BufferSize,
    PULONG LogCount,
    HDIR hdir);

    APIRET APIENTRY DosCloseChangeNotify(HDIR hdir);

    --- INN 2.7.3
    * Origin: This echo is READ-ONLY. Send %HELP to FAQSERVER at (2:5020/181)