|
moonraker928 wrote: genius - it works.
I don't know why - I only added a line to check if the file was opened successfully
Glad it works!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
Is this a homework assignment? did the prof say you need to use tool_name limited to only 256 chars ... shame on you, I will not be a part of this!!!
|
|
|
|
|
|
hi all.
my app is throwing an unhandled exception - the problem appears to be caused when istream adds a null character at the end of a char array when the getline function is called
here is the code:
i initialized the tool_name in this line:
simpleTask.cpp
char* tool_name = "";
i put a breakpoint here:
simpleTask.cpp
dg_replay.getline(tool_name,256);
when i ran the app, the breakpoint was triggered. i stepped in and it brought me to this line:
istream.cpp
*_Str = _Elem(); // add terminating null character
at this time, an unhandled exception is thrown.
--
dg
|
|
|
|
|
I'm surprised it made it that far
char* tool_name = "";
defines and initializes a pointer to a constant array of characters 1 byte long (the NULL
terminator).
This should work better:
char tool_name[256] = "";
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
who names their file " simpleTask.cpp" and can't get it too work...LOL dude I told you already stop cheating on your homework assignment or I am going to tell!!!;P
|
|
|
|
|
hello friends
how can i read data from tablet connecting to my computer through usb interface
if one have a program doing this or any advise please send it ot me
i like to use visual c++ 6
|
|
|
|
|
1) Where can I obtain Microsoft Developer Network CD?
2) What are the other ways to know advanced windows concepts except for books written by Mark/David and Jeffry Richter
|
|
|
|
|
tom groezer wrote: 1) Where can I obtain Microsoft Developer Network CD?
From Microsoft.
tom groezer wrote: 2) What are the other ways to know advanced windows concepts except for books written by Mark/David and Jeffry Richter
Google for them. Read through CP articles. Ask questions.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In terms of any other books
|
|
|
|
|
>>1) Where can I obtain Microsoft Developer Network CD?
I believe you would have to subscribe to MSDN for that? An alternative is to download the platform SDK, it comes with help files on the Win32 APIs that's pretty much all you need. You still have the MSDN website, much slower but you still get what you need.
>>2) What are the other ways to know advanced windows concepts except for books written by Mark/David and Jeffry Richter
Learning comes from reading and then applying, not sure if there are any short-cuts but if you find one let me know!
Books are your best best they will assemble all the bits and pieces for you, otherwise you will waste your time searching for on the net, plus you will get a fragmented view of things and be on here asking lots of questions
GL on your project!!!
|
|
|
|
|
See www.codeguru.com and www.codeproject.com about your section question.
|
|
|
|
|
- Is it possible to program using both
OpenGL api and Direct3D api, or is
this a big no-no?
- And, Yes I am crazy;P
"Shorter of breath,
and one day closer to death"
~Pink Floyd
|
|
|
|
|
Do you mean DirectX?
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
- What i am actually trying to do is make
some modifications to the Blender source code
to fix my problems with the buttons and menus being
drawn incorrectly because of driver issues,
but all can be fixed if just the ui goes DX.
PS: The actual 3D window is fine i just want to mix the OpenGL editing with the buttons and menus being drawn with DX
-- modified at 16:38 Thursday 19th July, 2007
Come on guys. I just need to know if it wont crash my computer with the mix of the two.
-- modified at 16:39 Thursday 19th July, 2007
"Shorter of breath,
and one day closer to death"
~Pink Floyd
|
|
|
|
|
Hi, I am using Visual C++ 6.0 MFC and I have an application where I have a window that allows me to set up some criteria and then click on a print button. The Microsoft Print Dialog appears and I can change the number of copies to something other than 1 but I will only get 1 copy. I thought the number of copies behavior was determined by the Print Dialog box. Do I need to set somthing up to enable multiple copies?
Buck
Buck
|
|
|
|
|
I wanted to create a number of Visual Studio projects with the same settings and add various files to them. They're going to be native C++ Win32 projects. Unfortunately I don't see how to do this...
http://msdn2.microsoft.com/en-us/library/ms228767(VS.80).aspx includes details on how to do this for C# and VB.NET projects but not VC++ (although I don't really understand the OnConnection method in the examples). As I understand it VC++ uses a different project template structure from those two languages. I couldn't find any more details beyond that though. I dug around in the Visual Studio directory for awhile looking for analogous files for C++ project templates but couldn't find anything but wizards (not the zips and other files I need). It seems like if I could just get past the hurdle of creating the project files I could get this working.
Does anyone know if this is even possible? I was going to just create my own template type so I could easily find the directory and files but then I found out VC++ doesn't even support the 'Export template...' option in the file menu.
|
|
|
|
|
I'm not sure I don't really use VS much (I find it much slower than other C/C++ compilers )
If you can't do it from VS, you could write an application to do this.. You could just have a basic dialog box with some settings in it, and then a number of template project files (just ordinary .txt files or something) which are copied to the chosen directory when all of the settings have been set.. This method would also allow for more flexibility..
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
How do I use windbg to find usermode and kernel mode memory leaks.
|
|
|
|
|
See Toby Opferman's article series here. he'ss really good with using Windbg.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What is the implication of the following from MSDN
Unlike the handles that are maintained by the Win32 USER and GDI subsystem components, handles to native objects under Windows NT are not unique; that is, upon destruction of an object, the corresponding handle may be recycled and will look exactly like the handle to the destroyed object. There is one unintuitive consequence of this implementation: Process IDs under Windows NT are actually handles into a dummy system table—that is, a table that does not associate its handles with any objects. If you create a process and store its ID away, then after termination of the process, the ID may be recycled for other types of global objects. You therefore cannot use process IDs to uniquely identify processes.
This article mentiones that the only kernel objects are drivers or something that are invisible to application. How does it stand correct when compared to mutexex, semaphores etc which it assigns to as Executive objects
|
|
|
|
|
you might want to get your hands on a copy of "Programing Application for MS Windows" by Jeffrey Ritcher!
You seem to be asking a lot of similar question on this board and this book would definitely help you, it talks about about keneral objects and handles and describes what pseudo handles are, etc.... you might also want to look at DuplicateHandle( ) API on MSDN you get an idea of handles and their properties for a lack of a better work.
|
|
|
|
|
This part is not covered there.I have taken it from MSDN. Please read the q completely
|
|
|
|
|
Hi all, would anyone know what WinAPI you call to delete a file? Or is it standard C++ ? Just curious, thanx in advance!
|
|
|
|
|
Use the DeleteFile() API see MSDN for the documentation
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|