|
If the values were written to disk as char , they need to be read as char . If they were written to disk as int , they need to be read as int .
Consider the following:
CFile file(..., CFile::modeCreate | CFile::modeWrite);
int nAge = 42;
file.Write(&nAge, sizeof(int));
file.Close(); The file contains 4 bytes that look like 0x2a000000. To read that same value back in, I'd use:
file.Open(..., CFile::modeRead);
file.Read(&nAge, sizeof(int));
file.Close(); The variable nAge contains the value 42. Had I used this instead:
file.Open(..., CFile::modeRead);
char str[4];
file.Read(str, sizeof(char) * 4);
file.Close(); The variable str contains the value 0x0000002a. I think the big/little endian concept might be messing you up. PJ's suggestion is plausible, too.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
is there a way to make them fullscreen when you open them?
|
|
|
|
|
I'm trying to Navigate a web browser ctrl to a url that uses basic HTTP authentication (username, pwd) without having the user to wait for the IE username/pwd dialog. Is there any way to package this info along with the request? I'm guessing I need to somehow pass this info in the Headers arg.
I'd be grateful for any pointers to code snippets or examples. Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i think thats being depracated or default not-allowed in the new sp2 for xp so u might want to check that out before commiting to that solution
"there is no spoon" biz stuff about me
|
|
|
|
|
Thanks, Lauren.
More evidence that Ravi shouldn't boot up his PC before caffeination: just Navigate2 to http://user:password@host:port .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Wow, I knew that username and password could be specified in a ftp:// link, but I did not realize it could be used with http:// too. Thanks!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
My c++ program when run on a different machine asks for MSVCP60.DLL which doesnt seem to be present on that machine. From my initial search I found that I will need this DLL if I use STL. I then removed all the STL references from my program but I still get the error. Does C++ 'string' require this DLL? Any other pointers?
Thanks.
|
|
|
|
|
string is STL too
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You need this dll if you use Standard Library (anything from the std namespace) AND you link your libraries dinamically.
|
|
|
|
|
Hint: link statically to all libraries, and you should be OK.
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
Open the visual studio .NET command prompt (or open a new command propmt and run vcvars32.bat for VC6). Navigate to the directory that your binary is in and run:
dumpbin /DEPENDENTS <your_binary>
Alternatively you could just run dependency walker
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
any idea why this DLL is not present in a windows OS by default?
is there a way to detect from my EXE if this dll is present and show a meaningful message?
|
|
|
|
|
Because it's distributed with visual studio.
When you are preparing to distribute applications check the dependencies first. Your development PC should have all the required DLL's on it, which you can put in the same directory as your executable. You will however have to check the licensing conditions of the DLL's if you need to include them in software which will be sold.
For this reason it's important to always test software on a 'clean' machine that doesn't have visual studio installed.
Showing a meaningful message is a little more difficult - AFAIK you would actually have to load the DLL at run time rather than relying upon explicit linking. I would recommend against this, a proper testing procedure should remove the need for this type of message.
Good Luck!
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Just one last question in this thread (I have created a new thread for a related question).
Since STL is all templates, it should all be replaced inline in the code(not exactly, but kind of equivalent). So where does the question of having a seperate DLL for STL come into picture?
Thanks.
|
|
|
|
|
Don't quote me, but from what I can remember the largest part of of the STL that is in a separate DLL are the IOStream classes. Yes, you're correct the majority of the STL is contained in header files.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
|
Hi every body,
I need some help here. Please help me doing my final year project.
My question is "How to create bitmaps using createcompatibleBitmap function in VC++ from an array of pixels"
I will pray for eveyone helps.
Thank you in advance .
|
|
|
|
|
You need to use CreateDIBitmap() to create from an array of pixels!
Ant.
|
|
|
|
|
This is a loaded question. I didn't seem to find it handled here, so if this is not the right place, let me know.
What would it take to get a VC++ program with MFC to work under a Macintosh computer. I will assume the obvious for one of the tasks in that I have to remove MFC. touching on that fact, how does one go about doing something of this nature? I'm also assuming I would have to recompile the program on a Mac? How does one go about doing that? Is there a VC6 for a Mac?
Is there anything else that I am missing?
Again, I'm very sorry for the loaded question. If there is an article that someone can point me too, great!
Thanks for your patience.
|
|
|
|
|
Have a looksee at this:
www.wxwidgets.org[^]
It is a cross-platform GUI toolkit, similar to MFC (and can even co-exist with MFC to an extent). There are sections there about porting MFC applications to wxWidgets.
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
Microsoft came out with a Mac VC cross-compiler based on VC4.x several years ago. We bought it, but never used it. Not sure if it is still available, though...
onwards and upwards...
|
|
|
|
|
Hi,
I am trying to write a program to remove the typed URLs in IE, and I have the following problem.
Open the key
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs
you will see a list of the typed urls.
have an IE window open. Delete one URL, say the last one, from the registry. This does not get removed immediately in the IE address drop down list. Open another instance of IE, and you will not see the removed URL in the addresss drop down.
Now, I have seen some tools which can delete the entries from the drop down list of IE instances already open. What is it different that they do.
The strange that I observed on my work win2k is that the url that we deleted from the registry, and which remains in the IE's list, gets re-added when I close this IE instance.
Can someone give a safe way of removing the typed URLs? Thanks.
-fl.
|
|
|
|
|
See if this helps.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|