Not a Member Yet,
Click here to Register
How do you like the new design?






ID: 130
Viewed: 2447
Added: Apr 28, 2002
Version:
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

Windows API Guide: CreateDirectory Function Platforms: Win 32s, Win 95/98, Win NT CreateDirectory creates a new directory on a disk. It will also set the directory's security attributes if the operating system supports it (Windows NT does, but Windows 95/98 doesn't). The function returns 1 if successful, or 0 if an error occured. lpPathNameThe name of the new directory to create. lpSecurityAttributesThe security attributes to give to the new directory, if the operating system supports it.

Highlight all by clicking in box
<!---Declaration--->
none

Highlight All
<!---Code--->
'CreateDirectory Function

Declare Function CreateDirectory Lib "kernel32.dll" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long

'Example:
' Create the new directory C:DummyNewDir and
' give it default security attributes (If Win '95/98, they'll be ignored anyway.)

Dim secattr As SECURITY_ATTRIBUTES ' security attributes structure
Dim retval As Long ' return value
' Set the desired security attributes
secattr.nLength = Len(secattr) ' size of the structure
secattr.lpSecurityDescriptor = 0 ' default (normal) level of security
secattr.bInheritHandle = True ' this is the default setting
' Create the directory
retval = CreateDiectory("C:DummyNewDir", secattr);


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions