Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MKDIR question

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
Does anyone know what API routines(?) MKDIR calls to create a new folder?

Thanks,

Stewart
 
As far as I am aware... none. It is its own routine that has been around since the dawn of time in Fox 1.0, but I could be wrong.

Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Hi Mike,

Someone I know, who funnily enough works in the same town as me, is wanting to write some code to create directory structures as part of documnet management.

Someone in their company said "they could not use the automation because of the “rights etc” of the created folder".

He's in the, unenviable, position of trying to persuade someone else that folders created with "automation" will always inherit the permission settings of the parent folder. I went for a job at the same place last year - hearing this has got me thinking I'm glad it fell through.

Anyway, I'll write back to him reassuring him that it will work as expected.

Thanks,

Stewart
 
DECLARE INTEGER CreateDirectory IN kernel32;
STRING lpPathName,;
INTEGER lpSecurityAttributes
Parameters:
lpPathName:
Pointer to a null-terminated string that specifies the path of the directory to be created

lpSecurityAttributes:
Windows NT/2000: Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect.

Return value:
If the function succeeds, the return value is nonzero


DECLARE INTEGER SHCreateDirectory IN shell32;
INTEGER hwnd,;
STRING pszPath
Parameters:
hwnd:
Handle to a parent window. This parameter can be set to NULL if no user interface is displayed.

pszPath:
Pointer to a NULL-terminated Unicode string that contains the fully-qualified path of the directory.

Return value:
Returns ERROR_SUCCESS (0) if successful.


Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top