From: parking_turkeys Date: Fri, 7 Aug 2026 19:13:08 +0000 (-0400) Subject: ig UTAU doesnt allow programs to do file i/o in random files... who knows! but ig... X-Git-Tag: horizons~12 X-Git-Url: http://git.p-t.hackclub.app/?a=commitdiff_plain;h=00bfb747c44011ff35929b355464424e2a687704;p=colon3wavtool.git ig UTAU doesnt allow programs to do file i/o in random files... who knows! but ig this means i just cant log stuff... --- diff --git a/main.c b/main.c index ae1abd6..1c98a5c 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,7 @@ -#include #include +#include -#define LOGFILE "log.txt" +#define LOGFILE L"C:\\projects\\colon3wavtool\\log.txt" static int log_args(int argc, char *argv[]); @@ -15,19 +15,54 @@ int main(int argc, char *argv[]) int log_args(int argc, char *argv[]) { - FILE *fp; - fp = fopen(LOGFILE, "a"); - for (int i = 1; i < argc; i++) { //loop through argv[] - char c; - for (int n = 0; (c = argv[i][n]) != '\0'; n++) { //loop through each character - putc(c, fp); + /* Doesnt work?? + HANDLE hFile; + + hFile = CreateFileW( + LOGFILE, //name of file (*wchar_t) + GENERIC_WRITE, + 0, NULL, + OPEN_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL + ); + + char *c = " "; + DWORD dwWritten; + for (int i = 1; i < argc; i++) { + for (int n = 0; (*c = argv[i][n]) != '\0'; n++) { + WriteFile( + hFile, + c, + 8, + &dwWritten, + NULL + ); }; - putc(' ', fp); + c = " "; + WriteFile( + hFile, + c, + 8, + &dwWritten, + NULL + ); }; - //fprintf(fp, "The tool has been CALLED!"); - - putc('\n', fp); - fclose(fp); - + c = "\n"; + WriteFile( + hFile, + c, + 8, + &dwWritten, + NULL + ); + */ + + + for (int i = 1; i < argc; i++) { + MessageBoxA(NULL, argv[i], "argument :3", MB_OK); + }; + + return 1; };