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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.