Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: magnus.therning
Forum: C++ Apr 2nd, 2007, 9:47 AM
Replies: 1
Views: 107
Posted By magnus.therning
DBGHELP API, SymFindFileInPath

I'm having problems getting SymFindFileInPath to behave. There are so many places to get into trouble though. Does anyone know of some code I could use as an example?


Otherwise here's what I...
Forum: C++ Feb 1st, 2007, 9:14 AM
Replies: 0
Views: 100
Posted By magnus.therning
Command line argument parsing on Windows

I've searched high and low for a library like getargs that would make it easier to parse command line arguments on Windows. No luck at all! I can find plenty for C#, but I need one for unmanaged...
Forum: C++ Feb 1st, 2007, 9:11 AM
Replies: 10
Views: 328
Posted By magnus.therning
I suspect you are worried about the Halloween...

I suspect you are worried about the Halloween Problem kicking in here. No worries though, in this case there is no risk of infinite looping.
Forum: C++ Jan 13th, 2007, 4:25 AM
Replies: 10
Views: 328
Posted By magnus.therning
Yes, that is a lot better. Thanks!

Yes, that is a lot better. Thanks!
Forum: C++ Jan 10th, 2007, 9:46 AM
Replies: 10
Views: 328
Posted By magnus.therning
LOL, yes, I know. Well, I find all errors due to...

LOL, yes, I know. Well, I find all errors due to type problems in STL being amazingly non-specific. Usually it's better to stare long and hard at the code rather then trying to decipher the message...
Forum: C++ Jan 10th, 2007, 9:21 AM
Replies: 10
Views: 328
Posted By magnus.therning
Replacing characters in std::string

How can I easily replace characters in a std::string with another character?

Basically what I'd like is something like gsub (an addition to the string class in GNU's C++ class library). But I'm...
Forum: C++ Jan 10th, 2007, 8:50 AM
Replies: 0
Views: 102
Posted By magnus.therning
Playing with PDBs in Windows

Well, this isn't really a C++ question as much as a Windows question, but since there's no specific Window area here...

I've been playing around with PDBs in Windows and I've successfully extracted...
Forum: C++ Dec 10th, 2006, 2:59 AM
Replies: 15
Views: 351
Posted By magnus.therning
Going back to C is always an option :-)

You can always use sprintf or one of its family members.
Forum: C Dec 9th, 2006, 5:22 PM
Replies: 0
Views: 125
Posted By magnus.therning
Problems with signals and ptrace on Linux

I'm trying to use the PTRACE_GETSIGINFO and PTRACE_SETSIGINFO, but I'm running into problems.

This is the code of my "debuggee"

#include <signal.h>
#include <stdio.h>
#include <string.h>
#include...
Forum: Other Programming Languages Oct 26th, 2006, 11:14 AM
Replies: 16
Views: 464
Posted By magnus.therning
I'm getting the distinct impression you are using...

I'm getting the distinct impression you are using this resource to get your home work done :-) I'm hoping for your sake you aren't and I don't think I'll bother with posting "full solutions" after...
Forum: Other Programming Languages Oct 24th, 2006, 4:41 AM
Replies: 58
Views: 2,936
Posted By magnus.therning
Oh, but then you're missing a big reason for...

Oh, but then you're missing a big reason for learning a new language--it teaches you to think in a different way. I.e. you see more solutions to a problem. In short, it'll make you a better C++...
Forum: Other Programming Languages Oct 24th, 2006, 4:37 AM
Replies: 58
Views: 2,936
Posted By magnus.therning
Even better, learn a functional language!

Even better, learn a functional language!
Forum: Other Programming Languages Oct 24th, 2006, 4:29 AM
Replies: 16
Views: 464
Posted By magnus.therning
You need some parentheses around the list...

You need some parentheses around the list pattern:


getelem 0 (x:xs) = x
getelem n (x:xs) = getelem (n - 1) xs


By terminating on 0 you have made the function count elements from 0, rather than...
Forum: C++ Sep 27th, 2006, 5:55 PM
Replies: 21
Views: 660
Posted By magnus.therning
In case the OP didn't know, C++ has a string...

In case the OP didn't know, C++ has a string class that does allow that sort of assignment.
Forum: C++ Sep 27th, 2006, 5:52 PM
Replies: 10
Views: 366
Posted By magnus.therning
Yes, and don't over-engineer it just in case your...

Yes, and don't over-engineer it just in case your gut is wrong and you need to back-track later on :-)

Either way you learn something. Arguably you learn more if you chose wrong the first time...
Forum: Community Announcements and Feedback Sep 27th, 2006, 5:43 PM
Replies: 7
Views: 247
Posted By magnus.therning
Fair enough. I just wanted to throw the idea out...

Fair enough. I just wanted to throw the idea out there. :-)
Forum: C++ Sep 26th, 2006, 6:15 PM
Replies: 9
Views: 324
Posted By magnus.therning
Apparently it was not 0 on some historic VAX...

Apparently it was not 0 on some historic VAX system. I said I was knit-picking ;-)
Forum: Community Announcements and Feedback Sep 26th, 2006, 6:10 PM
Replies: 7
Views: 247
Posted By magnus.therning
That's not really what I meant, more of a forum...

That's not really what I meant, more of a forum to discuss testing. Issues around writing unit tests, discussion of test frameworks, etc...
Forum: C++ Sep 26th, 2006, 6:07 PM
Replies: 0
Views: 84
Posted By magnus.therning
Testing client in client/server.

I'm just soliciting for ideas here. I don't think my situation is very unique so there ought to be someone out there that can offer some wisdom :-)

I'm writing a client for a client/server app. On...
Forum: Community Announcements and Feedback Sep 26th, 2006, 6:00 PM
Replies: 7
Views: 247
Posted By magnus.therning
Testing forum?

Would it be worth creating a forum specifically for testing?

I don't really know how language-specific testing is (I'm thinking of unit testing in particular) but I suspect others do know and can...
Forum: C++ Sep 26th, 2006, 5:51 PM
Replies: 9
Views: 324
Posted By magnus.therning
To be picky, and difficult--I believe 0==success...

To be picky, and difficult--I believe 0==success is system dependent as well. To be sure return EXIT_SUCCESS, which is defined in stdlib.h (cstdlib in C++).
Forum: C++ Sep 26th, 2006, 5:43 PM
Replies: 9
Views: 343
Posted By magnus.therning
Any good pinters on where to find an up-to-date...

Any good pinters on where to find an up-to-date version of the C++ standard?
Forum: C++ Sep 26th, 2006, 5:42 PM
Replies: 9
Views: 343
Posted By magnus.therning
OK, thanks for clearing that up. C++ can be...

OK, thanks for clearing that up. C++ can be extremely confusing, and that's without stumbling on bugs in the runtime libraries.
Forum: C++ Sep 21st, 2006, 3:31 AM
Replies: 9
Views: 343
Posted By magnus.therning
Would adding the & have caused a compile-time...

Would adding the & have caused a compile-time error?

For reference this is what I found in GCC:

auto_ptr&
operator=(auto_ptr& __a) throw()
{
reset(__a.release());
return *this;
}
Forum: C++ Sep 19th, 2006, 11:02 AM
Replies: 9
Views: 343
Posted By magnus.therning
auto_ptr fun

The following code compiles without errors or warnings using Visual Studio (2005 professional). However, it's not correct and when it's executed it throws an exception at the very end. GCC, however,...
Forum: Python Aug 31st, 2006, 10:24 AM
Replies: 3
Views: 232
Posted By magnus.therning
Just a small tip, python's interpreter has an...

Just a small tip, python's interpreter has an interactive mode which you can use to get some hands-on experience with the basics of the language. Just run "python" on the command line.

I can...
Forum: C++ Aug 31st, 2006, 10:18 AM
Replies: 4
Views: 170
Posted By magnus.therning
AFAIK that is because the state of the subclass...

AFAIK that is because the state of the subclass instance is somewhat up in the air while the baseclass constructor is executed.

(I couldn't help butting in :-)
Forum: Software Design and Algorithms Aug 3rd, 2006, 8:37 AM
Replies: 10
Views: 275
Posted By magnus.therning
I have used a similar technique in Python, but...

I have used a similar technique in Python, but then I don't wrap the system API but rather use decorators to extract common exception handling. Just for the sake of comparison I'm including a little...
Forum: C Aug 3rd, 2006, 8:24 AM
Replies: 4
Views: 251
Posted By magnus.therning
Thanks! I've been trying this on WinXP and it...

Thanks!

I've been trying this on WinXP and it looks like singlestepping is turned off automatically as soon as I receive an EXCEPTION_SINGLE_STEP. This means I need to keep on turning it on, which...
Forum: C Jul 26th, 2006, 12:19 PM
Replies: 4
Views: 251
Posted By magnus.therning
Writing a debugger on Windows: single stepping

I'm exploring the debugging API for Windows. Using the documentation on MSDN and a few other sources I've managed to write a very simple little program that uses the available API to control another...
Forum: C Jul 26th, 2006, 12:11 PM
Replies: 7
Views: 338
Posted By magnus.therning
I whish I could do that too!

I whish I could do that too!
Forum: C Jul 14th, 2006, 10:25 AM
Replies: 7
Views: 338
Posted By magnus.therning
Hmm, I can't find anything that looks relevant,...

Hmm, I can't find anything that looks relevant, except maybe for pslist (http://www.sysinternals.com/Utilities/PsList.html). However I can't find any source for pslist. (I also have my doubts since...
Forum: C Jul 13th, 2006, 2:50 AM
Replies: 7
Views: 338
Posted By magnus.therning
You're too kind ;)

You're too kind ;)
Forum: C Jul 12th, 2006, 10:38 AM
Replies: 7
Views: 338
Posted By magnus.therning
Inspecting process' memory on Windows

I'd like to find out what (virtual) pages are actually used within a process on Windows. The entire reachable address space is 2GB (or 3GB) but that doesn't mean that all the pages in that range are...
Forum: C Jul 12th, 2006, 10:30 AM
Replies: 9
Views: 294
Posted By magnus.therning
Using GlobalAlloc and GlobalFree is not...

Using GlobalAlloc and GlobalFree is not encouraged according to MSDN. Use the heap functions instead.

Not freeing memory always leads to memory leaks. Simple as that!

Note that global in...
Forum: C May 11th, 2006, 10:47 AM
Replies: 1
Views: 286
Posted By magnus.therning
MinGW and SecureZeroMemory

How do I go about calling SecureZeroMemory from a program compiled with MinGW?

It seems the function isn't in the distributed header files, so I declared it myself. Then it fails on linking.
Showing results 1 to 36 of 36

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:45 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC