|
I guess maybe it's ok then, if the socket is created successfully.
First chance exceptions in the debugger are only notifications - you can actually turn them off
so the debugger won't break at the first chance exception but instead will just write a message
to the output window.
Only if the exception goes unhandled - then it's a problem. If you can continue on without
problem after a first-chance exception then that means the exception was handled.
I've just never seen a first-chance exception using sockets
Mark
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
I tried to turn off the first chance exceptions as shown here http://www.helixoft.com/blog/archives/24[^].
No success though... I still have to try to reproduce this on another computer. I'll get back with results.
Thanks again for the time.
|
|
|
|
|
Hi All,
My Task in vc++ is to save System LogIn and LogOff Times ,Date in A TextFile.
I have No Idea of How to Do.
I search a lot in Net But Unable to get my Requirement
Plz Suggest me to get rid of this.
Thanks In Advance
Nagaraju
|
|
|
|
|
In Windows, I think there's already a logger. check Event Viewer in 'Administrative Tools' in Control panel.
If you still stick with using a text file with your app, you may consider developing an NT Service that after startup and before shutdown of the service gets the current time and date using a time class like:CTime and stores it in a text file.
For writing a simple service Nishant.S. already wrote a perfect article here in CP.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hello,
I want to derive a class from CDialog without resource-ID. How should I use InitModalIndirect() for the dialog initialization?
How should I use DLGTEMPLATE and DLGITEMTEMPLATE structure for the derived class?
Prithaa
|
|
|
|
|
|
prithaa wrote: How should I use DLGTEMPLATE and DLGITEMTEMPLATE structure for the derived class?
That depends on where the dialog template is going to come from. Will you be loading it as a
resource from a module? Will you be creating a template in memory?
The DLGTEMPLATE[^] documentation explains how these structs need to be layed out in memory.
Mark
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Problem solved. Thanks.
I need to use this function in c++ console app, and the documentation says:
errno_t <code>_get_pgmptr</code>( char **pValue );
pValue
A pointer to a string to be filled with ...
So I did this:
char *path = new char[MAX_PATH+1];
memset(path, NULL, MAX_PATH + 1);
<code>_get_pgmptr</code>(&path);
...
delete[] path;
But the call to the function, changes the address of the pointer(path) and calling the delete will fail.
I thought first that perhaps, I don't need to allocate any memory and the function (oddly) allocates it automatically and sends me the address but this is not the case either. Can anyone tell me what's wrong with this?
-- modified at 8:18 Tuesday 26th June, 2007
|
|
|
|
|
Hi,
It gets the current value of the _pgmptr, a global variable which contains the file path. You need not allocate the buffer.
What happen if you pass without allocating?
|
|
|
|
|
I found the problem was another mistake! You're right and the function gets a pointer to that variable.
I forgot to remove my question here, I guess I posted too soon, before investigating the code completely. Sorry!
Anyway, Thanks a lot for your attention and reply.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
No need to strike your question, it could be useful for others
|
|
|
|
|
Done.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Thanks from the community
When they kick at your front door
How you gonna come?
With your hands on your head
Or on the trigger of your gun?
Fold with us! ¤ flickr
|
|
|
|
|
Why does te following C++ code flag error?
# include
const int i=10;
void main()
{
const int i = 20;
cout << i << endl << ::i;
cout << &i;
}
The error flagged is "Illegal structure operation in main"
Compiler use : Borland C++ 4.5
How can I access the address of the local and global constant 'i's?
Please help me.
Thanks,
Biju
|
|
|
|
|
Nothing is in front of #include
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Your code print 20 with address of i whats the problem?
|
|
|
|
|
xbiju wrote: How can I access the address of the local and global constant 'i's?
Address of local is &i
Address of global is &::i
In the words of WhiteSky, what's the problem?
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
I am creating some control over a form at run time.
How to set the tab order for these controls.
Regards
Anil
|
|
|
|
|
Sorry, I first did not notice it's on runtime.
I'm not sure if it is possible to change tab order at runtime, because as far as I know, controls orders depends on the order they have been created.
I mostly use these 2 function:
GetNextDlgTabItem to get the next control in the focus order
SetFocus to set the focus to a particular control when user presses a key (e.g. Enter = OnOk).
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
|
Your right. It changes z order and place it after the first handle.
I already used this API several times, but never for this purpose.
Thanks, I learned something
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
|
Thanks
This is exactly what I was looking for.
Regards
Anil
|
|
|
|
|
Hello all,
I have made a SDI window and divided it into two parts using splitter control. Now my problem is i have made 2 classes that are derived from CFormView. In that i have made a List control. Now what i want is when i resize the window or splitter control my list control should adjust itself accordingly. How to do it. Can anybody help me in this?
Thanks in advance
|
|
|
|
|
As u have told the listcontol is in a fromview.
On the OnSize of the form view resize the ListControl.
LookFor OnSize, MoveWindow, ScreenToClient
Regards
Anil
|
|
|
|