Results 1 to 2 of 2

Thread: Windows Directories API

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    Cairo, Egypt
    Posts
    126

    Angry Windows Directories API

    How could I retrieve the windows or windows system directory by calling their API functions and those functions return numeric(long) number instead of string???????

  2. #2
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Arrow

    Code:
    Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    Private Sub Form_Load()
        'KPD-Team 1998
        'URL: http://www.allapi.net/
        'E-Mail: [email protected]
        Dim sSave As String, Ret As Long
        'Create a buffer
        sSave = Space(255)
        'Get the system directory
        Ret = GetSystemDirectory(sSave, 255)
        'Remove all unnecessary chr$(0)'s
        sSave = Left$(sSave, Ret)
        'Show the windows directory
        MsgBox "Windows System directory: " + sSave
    End Sub
    I suggest that you get tha AllApi tool from http://www.allapi.net,
    it covers all api calls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width