VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



CreatePath() Function

by Dave Lambert (3 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

CreatePath() uses API calls to create a directory tree. A simple application is included to demonstrate its use.

Inputs
sPath - A string containing the required directory structure.
Assumes
Module modCreatePath contains all of the code and API declarations required to use the function in your project.
Code Returns
Boolean - True if the directory structure has been created or already exists, False on error.
Side Effects
None.
API Declarations
Public Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long
Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long

Rate CreatePath() Function

Download CreatePath() Function

Download CreatePath() Function (4 KB)

CreatePath() Function Comments

No comments have been posted about CreatePath() Function. Why not be the first to post a comment about CreatePath() Function.

Post your comment

Subject:
Message:
0/1000 characters