Code:
#include <acknex.h>
#include <windows.h>

typedef struct _SECURITY_ATTRIBUTES {
  DWORD  nLength;
  void* lpSecurityDescriptor;
  BOOL   bInheritHandle;
} SECURITY_ATTRIBUTES;

int create_folder(STRING* path){
	SECURITY_ATTRIBUTES quad_DirAttribs;
	quad_DirAttribs.nLength = sizeof(SECURITY_ATTRIBUTES);
	quad_DirAttribs.lpSecurityDescriptor = NULL;
	quad_DirAttribs.bInheritHandle = TRUE;
	return CreateDirectory(_chr(path),&quad_DirAttribs);
}



void main(){
	create_folder("c:\\TestDir");
}


returns non-zero if it succeeds.


you probably want to add that struct to your windows.h

Last edited by Quadraxas; 10/23/10 17:14.

3333333333