My question has two parts: First, I am able to create a directory in my game's folder using a kind of hack:

Quote:
str_cpy(save_dir,level_string);

compatibility = 8;

galaxy_write = file_open_write("Save_Test.txt");

file_str_write(galaxy_write,"SAVE TEST");//creates a file in order to actually create the folder
file_str_write(galaxy_write,",");

file_close(galaxy_write);

compatibility = 10;//resumes normal compatibility


However, this seems to create other problems in my game.

Is there a way to do it without changing the compatibility?

Second, I can't seem to create a directory in the "ProgramData" folder. I can write a file into an existing folder, but I can't create a new one, with or without the compatibility hack.

I'm thinking I would need to use the windows.h API thing, but I am unsure how to do that.