Announcement

Collapse
No announcement yet.

Using WinLib in Windows NT

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

  • Lance Edmonds
    replied
    Ok, it works fine in Win2K, returning "C:\Program Files".

    I'll test under NT4 later on when I reboot my NT4 box...



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Sebastian Groeneveld
    replied
    Lance, you're right, let me put it more clear:
    Your code was for detecting Windows NT, and it makes sense! It's
    the fact that I included it in my WindowsActive function (to see
    if I can use WinLib) that might be wrong...

    WinLib can be found at the Powerbasic download section:
    http://www.powerbasic.com/files/pub/...y/WINLIB12.ZIP

    And the code shouldn't be too hard to write:
    Code:
    $LINK "WINLIB.PBU"
    PRINT LFN("C:\PROGRA~1", 0)
    This tries to detect the "Program Files" folder, dunno whether it
    exists in Windows NT...

    ------------------
    Sebastian Groeneveld
    mailto:[email protected][email protected]</A>

    [This message has been edited by Sebastian Groeneveld (edited March 28, 2001).]

    Leave a comment:


  • Lance Edmonds
    replied
    You are quoting my code slightly out of context (I only suggested a simple solution to detect NT/2000's presence), but your questions are still quite valid.

    How about posting the link to WinLib (and possibly some test code to try out), so folks can answer your questions without having to write a mass of code... Thanks!

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Sebastian Groeneveld
    started a topic Using WinLib in Windows NT

    Using WinLib in Windows NT

    This is a repost of an earlier question:

    Before I use any of the routines of WinLib, I check whether they
    are available, using the following routine:
    Code:
    FUNCTION WindowsActive () PUBLIC AS INTEGER
        IF UCASE$(ENVIRON$("OS")) = "WINDOWS_NT" THEN
            FUNCTION = -1
            EXIT FUNCTION
        END IF
        ! mov   ax, &H1600
        ! int   &H2F
        ! cmp   al, 4
        ! jnz   NotWin95
        FUNCTION = -1
        EXIT FUNCTION
    NotWin95:
        FUNCTION = 0
    END FUNCTION
    The detection for WinNT was added by Lance, but now I wonder if
    this makes sense.

    My question is: are the functions of WinLib (LFN support,
    gain focus, etc) available when running under WinNT (or Win2K)?
    Could anyone test if they can retrieve a long filename under
    WinNT? (so just skip the WindowsActive check)

    Thanks in advance!

    ------------------
    Sebastian Groeneveld
    mailto:[email protected][email protected]</A>
Working...
X