Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
SQL Server

How to create folder on your Destination Disk using Win32 API in VB.Net (Part 6)

Author: DevASP
Download Source Code : 417_VB.NET - Advanced .NET Framework - Make WIn32 API

This Article has Win32 demonstrations of creating the folder on your destination Disk in Real time. This is the Part Six of win32 API Usage.

Each of the Win32 API functions and constants have been wrapped up in the Win32API class for use in each demonstration. This Article explain the way that How we can create the folder on your destination Disk in real time. I use win 32 Api Like Create Directory. These are examples of calls that returned information that is not obtainable from managed classes.

Lets start Understanding by using Code it is recommended that with this explanation please run application First. And try to understand because helpful Comments are written there. First routine shows the Swap Of button using Win32 Api and remember by this Routine Your Swapping of buttons still active Unless You reset them.


Write down the Routine below against the click event of Create Directory  Labels Button. This creates a directory if possible, and updates the status in the function output text box. Win32API.CreateDirectory(txtDirectory.Text, security) this Routine infact gets the string from user as Directory path and name.


Private Sub btnCreateDirectory_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateDirectory.Click


   Dim security As New Win32API.SECURITY_ATTRIBUTES()

   If Win32API.CreateDirectory(txtDirectory.Text, security) Then

          txtFunctionOutput.Text = "Directory created."


          txtFunctionOutput.Text = "Directory not created."

   End If

End Sub

Source code is given with this article .And these Functions Are Given in attached application’s Fourth Tab in Green Panel. In this Article I tried to explain Directory Creation Using WIN32 APIs, there are many other Concepts regarding Win32 API in I will Explain Others in Later Parts.

Add Article Comment:
Name :
Email Address :
Comments :
<< How to make XP Style Context menu with Image Property

Disclaimer - Privacy
© 2002-2017