CreateDirectory

Reply

Join Date: Nov 2008
Posts: 1
Reputation: indian143 is an unknown quantity at this point 
Solved Threads: 0
indian143 indian143 is offline Offline
Newbie Poster

CreateDirectory

 
0
  #1
Nov 13th, 2008
Hi All,

I have to create a directory by using Windows API, can anybody give me small code snippet for this. I am able to do it File System Objet but want to do it by using Win API.
Can any body atleast tell me in which class or dll this will be available or a small code snippet if possible.

Thanks,
Aleem Mohammad.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: CreateDirectory

 
0
  #2
Nov 13th, 2008
Why don't you use
  1. MkDir "C:\TempDir"
Ok. If you want to do it hard way:
  1. Private Declare Function CreateDirectory Lib "shell32.dll" Alias "SHCreateDirectoryExA" (ByVal hwnd As Long, ByVal pszPath As String, ByVal psa As Any) As Long
  2.  
  3. CreateDirectory Me.hWnd, "C:\TempDir", Nothing
just make sure to check return value for errors.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC