` Check directory/create directory (Ville Vahtera ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Check directory/create directory
2002-04-05 -- Ville Vahtera
 
I thought to share this info I found during to try solve problem for existing/not existing directory. I needed a chance to create directory if the dir I were looking for didn't exist. Well, I found pretty neet API to call from imagehlp.dll. This api will create automaticly that directory you're looking for if it dosen't exist. Global map: Module('IMAGEHLP.DLL') MakeSureDirectoryPathExists(*CString DirPath),Long,Pascal,Raw End FullDirectoryName CString(255) Usage: FullDirectoryName = 'c:\Some_dir_I_need_to_create\' x# = MakeSureDirectoryPathExists(FullDirectoryName) When you call this API, it will check if the directory is there and if there isn't any, it will create it for you :-) ...and remember to make and include imagehlp.lib for your project! "Imagehlp.dll. On NT, requires version 4.0 or later. On Win9x, requires Windows 95 or later" with win2000: "Starting with Windows 2000, you can no longer redistribute the ImageHlp DLL that is included with the operating system. A subset of the functions have been moved to a DLL that is redistributable. Existing applications will continue to work because ImageHlp uses forwarders to call into the new DLL"


Today is April 25, 2024, 9:47 pm
This article has been viewed 35166 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: