Results 1 to 5 of 5

Thread: api

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    1

    Unhappy

    How do i create folders???
    venk

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3
    Guest
    Incase your wondering, there is an api function for it called CreateDirectory.

    Code:
    Declare Function CreateDirectory Lib "kernel32.dll" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
    
    Type SECURITY_ATTRIBUTES
      nLength As Long
      lpSecurityDescriptor As Long
      bInheritHandle As Boolean
    End Type
    
    
    Usage
    
    Private Sub Command1_Click()
    
    ' Set the desired security attributes
    secattr.nLength = Len(secattr)  ' size of the structure
    secattr.lpSecurityDescriptor = 0  ' default (normal) level of security
    secattr.bInheritHandle = 1  ' this is the default setting
    
    CreateDirectory "C:\MyDir", secattr
    
    End Sub

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Matthew, I think you forgot this line:
    Code:
    Dim secattr As SECURITY_ATTRIBUTES
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  5. #5
    Guest

    Thumbs up Thanks oetje!


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