|
are you shure that it's not just that the exceptions are caught by the MFC ??
check your IDE settings for stop always, if you set it to stop if unhandled you might get your 'normal' behaviour back
regards
Rutger
|
|
|
|
|
~~~~~~ Bizzare, As you said it. ~~~~
|
|
|
|
|
Hum , I known , this behaviour, it's a VC6++ bug , the remedy is even more bizarre , it have to do with the registry !!! Unfortunately I don't remember how I solved it .
If you don't have SP5 , try to install it .
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
Hi
I'm trying to create a simple program that will format a ftp url..
Example:
ftp://user:pass@11.11.11.11:21/dir
Will be converted to:
IP:11.11.11.11
PORT:21
PATH:/dir
USERNAME:user
PASSWORD:pass
How could I do this? What functions might be usefull ??
Thanks
|
|
|
|
|
Use strtok, or you could just parse it yourself
reading character by character, i think most of us would
prefer pasring ourselves since it is pretty straight forward.
|
|
|
|
|
Take a look at the AfxParseURLEx function in the MFC. If you don't want to use MFC, take a look in the source of this function.
Martin
|
|
|
|
|
FYI,
Even if you don't want to use MFC, the ATL class CUrl (VS .NET Only AFAIK) may come handy
Regards,
R.
|
|
|
|
|
You may also want to take a look at the InternetCrackUrl function.
|
|
|
|
|
Hi,
I want to make use of a class derived form CWinapp in my mfc extension dll.Do i need have some write some message loop,If so where it should be written?
Regards
Neha
|
|
|
|
|
Actually, since you are trying to derive from CWinApp
I dont think you need to provide a message loop unless
you want to do any customization.
Of course the Run will be called only if the CWinApp object
is instantiated.
|
|
|
|
|
I have a MFC dialog-based application.
It fails sometimes between OnOK's end and the end of the global DoModal execution:
// code from App::InitInstance
int nResponse = dlg.DoModal();
// fails before reaching this line
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
The error is about reading from a wrong address in memory.
Do you know how should i debug the application to catch the error point?
rechi
|
|
|
|
|
Put a break point in the dlg's OnOK and step thru it.
Other fast track things are objects declared as a part of the
dialog, when getting destroyed must be doing some assertions.
Check out and let me know how you did.
|
|
|
|
|
OnOK goes well.
Indeed there are objects that cause failure when getting destroyed, but they
are so many that it seems almost impossible to debug. There are some working threads also, communicating with the main dialog.
On debuggin' version, it ends with memory leaks.
I'm looking for a faster method to debug the stuff.
rechi
|
|
|
|
|
Hi,
Can I override COleControl' default interface functions? for example, COleControl::XOleInPlaceActiveObject::ResizeBorder
(LPCRECT, LPOLEINPLACEUIWINDOW, BOOL) does nothing, I want to override it. What should I do?
Thank you very much
|
|
|
|
|
I have to create a dialog box where i need to display textboxes dynamically.
I also have to create a scrollable pane so that i can keep the display area of the textboxes constant.Anybody has an idea as to how this could be done.Need suggestion from your side
|
|
|
|
|
Ok, you want to create controls at runtime?
Sure create them and make sure to use ON_COMMAND_RANGE
and the set of ON_XXXX_RANGE message macros
and specify the max id you will deal with.
In the handler you can retrieve the control id and
perform operations on it.
|
|
|
|
|
is the MSVC++ 6.0 STL implementation threadsafe?
The earth is not dying. It is being killed.
|
|
|
|
|
It is threadsafe insomuch as it does not use thread-local-storage and does not have any thread-affinity.
Howvever, it does not provide synchronization for any of its templates. It is up to the programmer to synchronize access to the classes as needed.
|
|
|
|
|
*yuck* but thank you
The earth is not dying. It is being killed.
|
|
|
|
|
Howvever, it does not provide synchronization for any of its templates.
Depedning on version that's either true or false.
A stock MSVC5/6 (the same old crap from 1994-'95) indeed provide thread locking for e.g. _Tree (which is the R/B-tree implementation class used for e.g. set and map).
There are however fixes for this on the Dinukumware site that removes that thread-locking code.
For the VC7 C++ library it seems the thread locking is thankfully absent (at least in _Tree).
|
|
|
|
|
thanks for the info. I was not aware of this. Everything I've read from MS and others said otherwise.
I'm glad, however, that VC7 removes this. Synchronization is an issue best left to the module/app developer.
|
|
|
|
|
Whats wrong whit this code?:
PSID pSid = NULL;
SID_NAME_USE sNameUse = SidTypeUser ;
TCHAR RefDomain = NULL;
DWORD RefDomCtn = 256;
DWORD SidCtn = 256;
LookupAccountName(NULL,lpszSystemInfo , pSid ,&SidCtn , (LPSTR)RefDomain ,&RefDomCtn , &sNameUse );
I've got unhandled error:
0xC0000005: Access violation writing location 0x00000000.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
TCHAR RefDomain = NULL ;
Hah what's wrong with the above stmt ??
its a single char variable initialized to NULL(0).
When this is accessed in the function, where it is happily casted
to a LPSTR, the function tries to access the memory location at '0'.
So now what do think is wrong with the code ??
|
|
|
|
|
Thanks for your reply.Sorry,Can you tell me what should I write now?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Just specify the acct name and the buffer sizes that should be enough.
It will automatically test the local machine and the Domain and
trusted Domains.
|
|
|
|