@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11



Comments:

<0> I don't know what to tell you
<0> I'm not aware of any casting for a ... operand
<0> MAYBE void *
<0> but, it seems unlikely.
<1> anon do NOT count on that crap
<1> well trying to do printf on a user cl*** is exactly the problem
<1> and it's why people who write C++ don't use that piece of ****
<2> vawjrwrk: I totally agree with you. It's not my code, and for some reason that "piece of ****" used to work in previous compilers (terrible programming!) and now it doesn't
<0> http://www.breitbart.com/news/2006/03/07/D8G6SG000.html
<2> and it's a difficult task of fixing it since printf is not type safe, so you don't get any compile errors or even runtime ***ertion failures
<1> anon, Amen bro!
<0> well
<0> you can always do CString::
<0> ummm, ****
<0> Str?
<0> Buf?



<0> I forget.
<1> is that the stupid MFC CString?
<0> oh, I was just ***uming it was
<0> who knows.
<2> ok. thanks anyway vawjrwrk, Noidea...
<1> anon you're doing this for work?
<2> yeah
<2> unfortunately
<2> believe me, i wouldn't do it for fun!
<1> how come you guys aren't using vc2005? it's far more conformant than 7.1
<0> GetBuffer
<0> CString::GetBuffer
<1> and the debugger is substantially better also
<1> doe CString always put a '\0' at the end of the string?
<2> vawjrwrk: yeah, they're planning to start using that one soon.
<1> you might as well start now, or you may have to go "fix" things again
<2> I know. I certainly would start now, but it's not really my decision to make.
<1> you might want to mention it to whomever is having you do this insane thing
<1> printf("%s", someCString); is undefined behavior
<3> we can reword that
<3> printf("%s",anyobject) is undefined behaviour
<2> but it's all over the place :(
<1> so?
<3> replace all :P
<1> your boss let people write undefined things
<1> NOT a good idea
<2> most of the programmers who have worked on these projects clearly had no idea whatsoever about C++ and how things work in it
<0> http://www.chinadaily.com.cn/english/doc/2006-03/04/content_526563.htm
<2> vawjrwrk: did you see Microsoft stating that anywhere? (I mean, that "printf("%s", someCString); is undefined behaviour")
<1> why should they have to state it
<1> CString is an object
<1> well, it's a cl***
<1> %s applies to c-style strings only
<1> char* and char cosnt* terminated with '\0'
<2> I know. I just wish whoever wrote the code before me knew it as well... but the strange thing however, is that it works for CString.
<1> I thought you said it didn't work
<2> it works for CString, but not for a user defined cl*** that has a CString as its first member variable
<1> well, see the problem is what does sumfunc(someUDcl***) try to do when sumfunc is defined to have(...)
<1> which is what printf has
<4> which is the best book for vc++.net?
<1> oh, btw, is this user defined cl*** a base cl*** with virtual methods
<1> black`board learn C++ first
<1> I recommend the books at http://rudbek.com/books.html
<4> I know c++
<2> vawjrwrk: no. but i can certainly see how that would complicate things a lot more!
<5> ah what cn?
<1> black`board so you want to learn .NET ??
<1> no doubt there are books somewhere that talk about the framework
<1> anon have you looked at the code that's being generated?
<4> yeah I'm thinking to start windows programming
<4> using MFC or forms
<1> then books on MFC or WinForms would be the place to go look
<4> you mean to say I'm on wrong place?
<1> well, MFC and WinForms aren't unique to C++
<4> I know that
<5> v - are your books in order, like i'm done with accelerated (mostly) nex book is the c++ std lib or should i buy more?
<2> vawjrwrk: you mean the dis***embly?
<1> jill_s the header says read them mostly in the order given
<5> rd had suggested some were more reference than cover-to-covers
<5> but i didn't remember which ones he was referring to



<1> I read the Meyers' "....C++" books first because Josuttis's wasn't written yet
<5> okiedokie
<1> the "...Effective C++" deal only with the core language, you probably need to pick up more library stuff next which is why I listed that book 2nd
<5> ok gotchya :) i hadn't not read the top when i asked ;)
<5> i can be dense, but not quite that dense.
<6> hiall
<6> ovaj
<7> Ok, I -think- I have this straight, but having someone confirm it would ease my mind greatly. With Boost's thread, if I want to keep two areas of code from executing at the same time, I create a mutex object, then I create a lock object to which I p*** this mutex at the beginning of the area of code that must be mutually exclusive... Right?
<1> I'm not sure what a lock object is
<7> Hm, something like that: boost::mutex::scoped_lock scoped_lock(mutex);
<1> so it behaved like a guard? waits on constructor, signals on destructor?
<8> Hi to all, where I can find a good XML library that compile with borland c++ version 5?
<1> dunno, are you prohibited from upgrading your compiler?
<7> I think so. Anyway Guess I'll know when I fire it up. That and the gazillions other thigns I'm nto sure about. =P
<1> you want to have two separate areas that you don't want to execute at the same time?
<8> infact, new version of borland have an xml library, bur for now I have to use that old compiler :|
<7> Well, come tot hink of it, right now, that's not what I want... As a mater of fact, I'm trying to share a ressource I can't share. Hm. Guess I'll have to change that design.
<9> I haven't coded in a while
<9> I need to typedef an alias for a function-type
<1> what's a "function-type" ?
<9> Basically...in windows, I'm GetProcAddress() ing a function, and I want to be able to call that function without compiler errors
<9> I need to call this function in a dll I've loaded implicitly
<9> DWORD GetProcessInfo(DWORD dwPID)
<9> So I want to make a typedef for that specific function..
<9> I've done this before but I haven't coded in like a year
<9> Right now I'm doing this....
<9> InjectDllA = GetProcAddress(hInjLib,"InjectDllA");
<9> So I'm trying to do like InjectDllA = (MYTYPE)GetProcAddress(blah);
<9> ..Then I can just do InjectDllA(dwPID);
<9> vawjr, any idea?
<1> sorry, got distracted
<1> that THAT function, or any function with that signature?
<9> THAT function
<1> they "type" of a function is it's signature
<9> By signature I ***ume you mean return type, calling convention, and arguments
<1> yuppers
<8> perhaps I have find and example about calling dll in that way...
<8> http://goffconcepts.com/techarticles/development/cpp/calldll.html
<8> second example here
<1> you can typedef function pointers
<10> hi all
<11> is back
<1> gnoccolo thanks for chasing that down for me
<9> ah cool
<1> I think that's what danielson is looking for
<10> has anyone here printed to a Zebra printer using their windows driver from managed .NET ?
<9> Do you guys know...when you export a .dll, does MSVC++ automatically make the calling-convention __stdcall?
<9> Because I'm looking at this guy's source and he doesn't explicitly state __stdcall or _cdecl, and I don't see #define's to export them....nor a .def file
<8> it's a bit painful way to use a dll, but if you have no choice.. :|
<9> I'd just rather not link implicitly, there's only 4 functions I need
<9> It's a cool library too... INJLIB is what it's called
<9> It lets you inject a dll, or just raw code even into a remote process
<9> I'm using it to hook my USB remote control which is "Cyberlink only" so I can use it for whatever I want
<9> So I'm going to change the registry entry to launch my application instead of Cyberlinks... which will then launch their application
<12> __cdecl is default
<9> ...then I'll launch my dll into their application (while it's in a suspended state) and hook some hand-picked APIs it uses
<11> which is all part of the next worm, launched next month? :p
<9> ...and I'll figure out how it works and then either just use it as that... or rewrite the application entirely with that knowledge
<9> Run, a series of worms...I call it Oprah_v1
<11> Ah, a whole new generation. Of course.
<11> Nitfy
<11> Nifty
<9> You guys should check out INJLIB though, it's quite cool
<9> Has functions for remote subcl***ing (without system-wide hooks), for launching a .dll in an unsuspecting application (that's already running), or launching a remote thread with code
<11> I don't use windows, because it's uncool. The only thing I ever did with this was when I tried to make a library that had to work also under mingwin or something like that.
<9> But, I think it's going to be a bitch...
<9> Because INJLIB uses CreateRemoteThread with a section of stub-code to call LoadLibrary in the remote process
<11> But then I used gnu tools (for mingwin), and they turned out to be broken (which I then fixed).
<9> I'm thinking that LoadLibrary will load my dll in the calling thread, which means it's going to be running in a seperate thread as the rest of the application
<11> I can tell you though, from that experience, there is something horribly wrong with how DLLs work.
<9> err...their application
<9> Run, what do you mean?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#linux
imagelib_imagedb jpeg
#AllNiteCafe
Meghwara
#london
#MissKitten
#linux
#linux
#teens
Bypass ISP Filters ping



Home  |  disclaimer  |  contact  |  submit quotes