Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Interrupt 21/43 problem with NT/Windows 2000

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interrupt 21/43 problem with NT/Windows 2000

    We are having a problem setting the archive/share file attributes
    using interrupt 21function 43 on NT/Windows2000 workstations
    using a Novell Netware server. It is working ok on workstations
    running Windows 95/98 but not on NT/Windows2000.

    On NT/Windows 2000 workstations it will not flag the file for
    share if the archive attribute is already set on, it actually
    sets the share attribute off. If archive is not set then the
    archive/share attributes are set but only if the file status is
    not ‘co’ compressed.

    The code we are using is as follows:

    FUNCTION MKSHARED%(stringptr$) PUBLIC
    stringptr$=stringptr$ + CHR$(0) ‘File name to flag.

    AX%=&H4301 ‘Function 43, Set attribute (01).
    BX%=&H0000
    CX%=&H00A0 ‘10100000 Binary = A0 hex.
    DX%=STRPTR(stringptr$)
    DS%=STRSEG(stringptr$)

    REG 1, AX%
    REG 2, BX%
    REG 3, CX%
    REG 4, DX%
    REG 8, DS%

    CALL INTERRUPT &H21

    AX% = REG(1)

    IF AX% = &H4301 THEN
    MKSHARED% = 0
    ELSE
    MKSHARED% = AX%
    END IF

    END FUNCTION

    I have made a mod to the code to get the attributes instead of
    setting them and get different results for each operation system
    when the share attribute is the only one set. Windows 95/98
    returned 128 (10000000 / 80h) and NT/Windows 2000 returned 0?

    It just looks like NT/Windows 2000 does not support the share attribute correctly.

  • #2
    Time was, a "normal" file had an attribute of zero. Oddly enough, Microsoft
    changed the "normal" attribute to &H80 in 32-bit Windows. This conflicts
    directly with Novell's longtime use of the same attribute to mean "share".

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      Thanks Tom for that explanation.
      I have been looking high & low for a reason why it didn’t work!

      My next question is obvious, does anyone know of a solution.


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

      Comment


      • #4
        One possibility is to use Novell's "FLAG.EXE".

        SHELL "FLAG MyProgram +Sh"

        ------------------
        Peter.
        mailto[email protected][email protected]</A>
        Regards,
        Peter

        Comment

        Working...
        X