IRC logs for #opendune on OFTC at 2011-07-04
            
00:51:55 *** fjb has quit IRC
00:58:47 *** glx has quit IRC
12:08:39 *** glx has joined #openDune
12:08:39 *** ChanServ sets mode: +o glx
12:09:35 <glx> hello
12:14:19 <Xaroth|Work> o/
13:18:19 *** fjb has joined #openDune
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
16:39:41 *** Yexo- has joined #openDune
16:40:41 *** tneo- has joined #openDune
16:42:12 *** tneo has quit IRC
16:42:15 *** Yexo has quit IRC
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:07:55 <Xaroth|Work> ctrl+a, del
19:07:55 <Xaroth|Work> done
19:08:01 <glx> and just follow the docs
19:08:11 <glx> MSDN has examples
19:08:14 <Alberth> hello Xaroth|Work, I am Alberth, how are you doing?
19:08:38 <Alberth> evenink :)
19:09:07 <Xaroth|Work> evening Alberth
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:11:40 <Xaroth|Work> sweet
19:12:55 <Xaroth|Work> added CreateProcess again.. and it fails, grr
19:13:35 <glx> what's the error ?
19:13:51 <Xaroth|Work> http://pastebin.com/afGxQpNd
19:13:56 <glx> compile time or run time ?
19:14:00 <Xaroth|Work> runtime
19:14:11 <Xaroth|Work> the system cannot find the file specified
19:15:25 <glx> using full path ?
19:15:31 <Xaroth|Work> yep
19:15:33 <Xaroth|Work> and relative
19:15:41 <Xaroth|Work> same error
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:29 <Xaroth|Work> ....
19:21:31 <Xaroth|Work> and that fixes it
19:21:38 <Xaroth|Work> ffs
19:22:08 <glx> _tmain means the compiler will use main for ANSI build and wmain for unicode builds
19:22:32 <Xaroth|Work> aha
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:44 <glx> true
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:29:51 <TrueBrain> glx: very true :D
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:52 <Xaroth|Work> ! this works
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:36:41 <glx> msgbox uses unicode
19:38:22 <Xaroth|Work> hah, workage
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:41:29 <glx> never cast this
19:41:39 <Xaroth|Work> so i noticed :P
19:42:14 <glx> I don't find fsprintf
19:42:23 <Xaroth|Work> er, fprintf
19:42:28 <Xaroth|Work> s too much
19:42:37 <glx> _ftprintf
19:42:37 <Xaroth|Work> int fprintf(FILE *strm, const char *format, .../* args */);
19:42:41 <Xaroth|Work> ah
19:43:16 <Xaroth|Work> I might actually learn a lot from this
19:45:54 * Xaroth|Work hugs glx
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:01 <TrueBrain> UTF-8 I just hate
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:32:03 <Xaroth|Work> any ideas? :o
20:32:28 <Xaroth|Work> http://pastebin.com/Ucp538X5 is the dll being loaded
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:34:26 <Xaroth|Work> like app folders
20:34:44 <TrueBrain> or without c:\\ ?
20:34:46 <TrueBrain> (current folder)
20:35:02 <Xaroth|Work> grrr
20:35:06 <Xaroth|Work> found it
20:35:20 <Xaroth|Work> stupid ass msvc needs me to clean rebuild
20:35:23 <Xaroth|Work> rather than just rebuild
20:35:30 <TrueBrain> *fail*
20:37:57 <Xaroth|Work> aye
20:37:59 <Xaroth|Work> stupid msvc
20:55:04 *** Alberth has left #openDune
22:02:50 *** Yexo- is now known as Yexo