IRC logs for #opendune on OFTC at 2011-07-04
⏴ go to previous day
15:14:56 <Xaroth|Work> sometimes I hate C/C++/msvc/<insert programming related stuff>
15:15:30 <Xaroth|Work> trying to dive into things by doing something.. challenging is not always the best of ideas :P
18:26:08 <Xaroth|Work> already spent 3 hours trying to get CreateProcessW to work...
18:26:13 <Xaroth|Work> bastard thing just keeps failing on me
18:27:39 <Xaroth|Work> The system cannot find the file specified ... its in the same bloody folder -_-
18:55:32 *** Alberth has joined #openDune
18:55:32 *** ChanServ sets mode: +o Alberth
19:05:05 <glx> it's better to just use CreateProcess and let the compiler do it's work
19:05:31 <glx> of course you also need to use TCHAR
19:07:10 <Xaroth|Work> time to start from scratch again
19:07:38 <Alberth> you have to erase all your gained knowledge then :p
19:08:14 <Alberth> hello Xaroth|Work, I am Alberth, how are you doing?
19:10:48 <TrueBrain> owh, Xaroth|Work, you might not remember, but you were going to pay me 1000 euro for tha tone job
19:11:38 <Xaroth|Work> hey, no more popups now
19:12:55 <Xaroth|Work> added CreateProcess again.. and it fails, grr
19:13:56 <glx> compile time or run time ?
19:14:11 <Xaroth|Work> the system cannot find the file specified
19:15:51 <Xaroth|Work> even put notepad into the same dir and gave the same error
19:21:04 <glx> oh and it should be _tmain ;)
19:21:21 <Xaroth|Work> what's the difference anyhow?
19:21:31 <Xaroth|Work> and that fixes it
19:22:08 <glx> _tmain means the compiler will use main for ANSI build and wmain for unicode builds
19:22:38 <glx> TCHAR is char for ANSI and wchar for unicode
19:22:41 <TrueBrain> only on windows, only on windows ...
19:22:57 <Xaroth|Work> TrueBrain: I now understand your.. disliking.. of windows programming
19:23:48 <glx> as long as you don't work with strings it's easy ;)
19:24:25 <glx> oh and unicode builds usually don't work on win9x :)
19:27:31 <Xaroth|Work> now to convert from TCHAR to std::vector ..
19:28:10 <glx> you'll still need to convert it to TCHAR to pass it to win32 API
19:28:24 <Xaroth|Work> no, 2nd arg this time
19:29:03 <glx> TrueBrain: windows is still better than OSX ;)
19:29:22 <glx> you don't have to rewrite everything when a new OS version is out
19:29:22 <Xaroth|Work> osx is just plain evil
19:30:24 <Xaroth|Work> ok, this 'just' needs to translate from TCHAR* to char*
19:31:11 <glx> there are functions to do that
19:31:36 <Xaroth|Work> also, I hate MSDN
19:31:41 <Xaroth|Work> fucking impossible to navigate
19:31:53 <glx> it's way better that apple stuff I think
19:33:14 <glx> Xaroth|Work: search for WideCharToMultiByte
19:34:47 <Xaroth|Work> ta, think I'll take a detour on this though
19:34:54 <Xaroth|Work> saves having to fuck around with more msdn stuff :P
19:35:59 <Xaroth|Work> not 10000% as I hoped it would, but close enough
19:36:18 <Xaroth|Work> this msgbox it runs displays in chinese, but hey, that's fun! :P
19:38:51 <glx> you should check the compiler warnings ;)à
19:38:57 <Xaroth|Work> now to fix one last bug... fsprintf with TCHAR
19:39:28 <Xaroth|Work> it doesn't warn if you had an explicit cast from char* to LPsomething :P
19:42:37 <Xaroth|Work> int fprintf(FILE *strm, const char *format, .../* args */);
19:43:16 <Xaroth|Work> I might actually learn a lot from this
19:45:57 <Xaroth|Work> cheers for the help
19:46:40 <glx> I guess TrueBrain still remember the fun we had with noai and squirrel
19:47:04 <glx> and all these utf8 to wchar conversions
19:47:15 <Xaroth|Work> every time i mention noai he just sits in a corner and sobs..
19:47:58 <TrueBrain> NoAI was awesome :D
19:48:17 <glx> utf-8 itself is not a problem
19:48:25 <glx> utf-8 on windows is something else
19:48:32 <Xaroth|Work> windows, is something else
19:48:55 <TrueBrain> UTF in any language on any platform
19:48:58 <TrueBrain> well, UTF itself isn't
19:49:02 <TrueBrain> the conversions are
19:49:12 <TrueBrain> and the lack of char a[10] :P
19:52:37 <Alberth> any reason why you don't convert to a uniform format like unicode code-points(?) first?
19:52:51 <Alberth> that would make it simpler
20:31:59 <Xaroth|Work> glx: so I managed to inject a dll into an app.. I know it injects as when I add a msgbox it hangs the app.. however, to get logging done I try to open files (one out, one err).. but they are neither being created, nor written to
20:33:08 <glx> the app has write access on c: ?
20:33:42 <Xaroth|Work> also tried 'output.txt' and 'error.txt' but those don't work either
20:34:24 <Xaroth|Work> lemme try something different
20:35:20 <Xaroth|Work> stupid ass msvc needs me to clean rebuild
20:35:23 <Xaroth|Work> rather than just rebuild
continue to next day ⏵