|
Yes you have to create a new buffer and assign it. basic_string doesn't (and shouldn't) allow you direct access to it's internal buffer. You can only get a const wchar_t* from it by using c_str(). But if you try to modify it, you will wreak havoc on the basic_string. The only way to change a basic_string's contents is through its public access members (like operator=() or the contructor, etc.)
The maximum characters for the signature is five hundred. I was wondering how long a five hundred characters message would be, so I decided to make my signature 500 characters long. I'm sure if I had some cool html stuff in my signature, I could eat up five hundred characters, but just typing five hundred characters takes quite some time. The trick I think is finding something to say, but I'm usually a man of few words. So I guess I'll tell you what I've discovered is the secret to life. It
|
|
|
|
|
Jim Crafton wrote:
(wchar_t*)newStr.begin()
generates a warning because you cannot assume that an iterator is a pointer to anything. It may actually be a pointer, but making that assumption in your code is unsafe.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
Damn.
I understand the reasons for that, but it's just so damn annoying to have to allocate/copy/delete a tmp buffer for no other reason than that I can't get access to the buffer in std::string.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Hi,
does anyone know how to get the secondary display monitor dimensions? GetSystemMetrics cannot do it, if I got it wright.
Tnks
Bernardo
|
|
|
|
|
Anonymous wrote:
GetSystemMetrics cannot do it, if I got it wright.
Isn't that what these are for:
SM_XVIRTUALSCREEN<br />
SM_YVIRTUALSCREEN<br />
SM_CXVIRTUALSCREEN<br />
SM_CYVIRTUALSCREEN
SM_CXSCREEN and SM_CYSCREEN are for the primary display, so maybe you could subtract the overall from the primay to get the secondary.
I do not have a dual-monitor system so these are only guesses on my part.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'd like to be able to share a tree control or another child window between different parent windows. The tree control needs to be the same between them. Is this possible and if so, how?
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Simply not possible. By the design of windows a window cannot have 2 parents that creates it.
Notification will go only to one parent window only.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Only one parent window would be visible (or even exist) at a time. Is it possible to create the window in Mainframe and pass it to 2 different windows setting one as the parent?
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
yes you can pass it to any no of windows for internal use, but only one window can be a parent.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Hi.
I'm interested in being able to intercept calls to Dialup Networking. Ideally, I'd like to replace the dialog box that lets you connect to the internet with one of my own design. This means that all the calls (from contol panel, or starting internet explorer before connecting etc.) that result in the Microsoft dialup network dialog being displayed, should result in my own dialog being displayed instead. I want the only way to connect to the internet to be through my dialog.
Any suggestions about the best way to do this?
Cheers,
Harrold.
|
|
|
|
|
I have the memory test. It can find bad byte in memory`s array. I need to know what chip on memory module is bad.
Can you help me?
|
|
|
|
|
I'm just guessing, but if a utility could tell you what byte in memory was bad, I'd think it could also locate a bad chip on a module. How did you come to learn that your computer's memory had a bad byte?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
You are running memtest? As in http://www.memtest.org/[^]
Your best bet to find the bad chip is to pull out a DIMM and see if the problem still occurs. If you only have one DIMM buy a new one. They are very cheap now as you should be able to find a 512 MB DIMM for less than $100US.
John
|
|
|
|
|
Read the topic of this forum, IT IS DEFINITLY NOT "TELL ME WHAT HARDWARE IS BROKEN"!
Don't try it, just do it!
|
|
|
|
|
hello,
how can i understand or hopefully see the code in a .exe file?
i have only the exe file, nothing else, i tried to read it with visual c++, but i think i did a total sceewup, i cant read nothing! which sort of program do i need to read the source code of the file? and how can i convert it into c++?
thanks for any help possible!
|
|
|
|
|
My, is it the 1st of April already?
EXE means executable - no source. You can't reverse engineer it back into C++ source code becuase the compiler turns the source into sequences (albeit predictable and/or common ones) of machine language (sometimes using an assembler as an intermediary step). That machine language is often the final step in a complex process known as optimising, where the sequences themselves are subject to closer scrutiny and modified in an attempt to produce a smaller and/or faster version of the code.
To read source code, you need two things; the source itself (which you don't have), and a good editor. That last one is a tad objective (cue: editor wars, or how I learned to stop worrying and love emacs)
Steve S
|
|
|
|
|
Well, in my experience, you need a copy of dumpbin , a good understanding of the PE format, knowledge of how constructs are translated to machine language, and a good working knowledge of the processor's machine language - and the MSDN documentation.
You can get dumpbin to give you an assembly listing with the /disasm switch. You can then work back from there. Understanding the import table format is important: this tells you which functions in other libraries are being called.
Definitely not for the faint-hearted, though - it took me over a week to pick apart a Pocket PC OEM's DLL that wasn't working properly so I could bypass it - and that was in ARM assembly, which (being a RISC architecture) is a lot easier to understand than x86.
It's much easier to reverse-engineer a DLL than an executable, because you have a useful entry point that takes you right to the point. Most executables have a startup stub, such as the Microsoft C run-time's _WinMainCRTStartup function, which you have to pick through to find the actual WinMain .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
ermmm.............. this is going to be fun! lol.....
so in breef my starting point is /disasm !
if i recreated the beginign of the code could that help me?
|
|
|
|
|
oh!! nah i think its not the 1st of april!
i know that its executable, i think my question wasnt so clear!
whene i run the program ( that is a dos executable file) i whould like to understand the tree of comands, example:
step 1: read a:...... .txt
step 2: do something (string,array, etc etc...)
step 3: .....
.
.
.
.
.
is it possible to read maybe with another program wile the exe file is running?
i need it so i can understand the structure and write it my self, maybe modify it etc etc....
or should i giveup this road and just writing a code based on what this program does?
|
|
|
|
|
Not true Steve, you can, you just have to know how, and this is an easy thing.
I'm doing this with my own code (in Release build) to check for some errors occuring in Release build but not in Debug build. It's easy if you know how...
Don't try it, just do it!
|
|
|
|
|
I wouldn't describe it as 'easy'. It is made easier if you have the original source code for reference, or if, alternatively, you have a debug and a release copy. It's also made easier by the availability of symbols or a map file.
Most people can't read x86 code too well, in general it's something you can do because you've had to in the past, you're using inline assembler, or you can't stand the idea that the compiler might be generating bad code
I'm with John Robbins (of BugSlayer fame), in that everyone should learn how to understand some assembler on the machine they use/target.
Oh, and anything is easy if you know how, apparently...
Steve S
|
|
|
|
|
The best you could hope for would be hard-to-read assembly code. I've heard rumor of a tool from long ago that could create C code from a .exe file, but never investigated it. With Visual Studio, you can open a file in binary and see the string constants. You can also open a file as a resource and see the menus, dialogs, icons, etc.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Search for disasm in google. There are several tools that will turn the exe to assembly language but I know of none that will turn it into C++ code. This is a very hard problem. How do you know the program was written in C++ in the first place?
John
|
|
|
|
|
its a program given by a friend , he had it from his prof of c++! !
thats how i know and y i whant to understand it!
its just a chaleng between my my friend and his prof!
|
|
|
|
|
ok found disasm, tried to use it and gaveup nearly immidiatly!
i was reading that there are no desassemblers for c++ because every version has a different interpretation!!! is that true? how can it be possible? if c++ is so powerfull, u can do everything with it, y there is no library or sorce code that can read asemble? its a bit illogical seen that c++ write the executable files in assemble but cant read it!
|
|
|
|