|
Please provide more information ! And USE your debugger instead of trying to guess what the problem is. The only way to be sure of the problem is by debugging your code. If you know how to use it, your debugger will give you much more information that anybody here can give you.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
error is Cx0000005 Access violation
Regards.
|
|
|
|
|
Put a break point before this lines:
m_pListenSock = new CSock();<br />
m_pListenSock->Create(200);
And then press F11 (or F10) to step the program and find why comes the error.
Probally it depends on a bad initialization in the constructor (CSock() ), or in some strange operation in Create that uses an unitialized pointer.
Russell
|
|
|
|
|
CSock * m_ListenSock;
m_pListenSock is the memeber of CSock class that is inherited from CSocket class.
nothing is done in CSock() constructor.
then steps are CServerHandler class that is inherited from CWinThread class
m_pListenSock = new CSock();
upto this step all is fine
it crashes at
m_pListenSock->Create(200);
and says access violation
Regards.
|
|
|
|
|
zahid_ash wrote: it crashes at
m_pListenSock->Create(200);
and says access violation
So step into the Create() method to narrow down the problem.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
violation is at
if (m_pHashTable == NULL) in the following code in some VC++ file
void* CMapPtrToPtr::GetValueAt(void* key) const
// find value (or return NULL -- NULL values not different as a result)
{
if (m_pHashTable == NULL)
return NULL;
UINT nHash = HashKey(key) % m_nHashTableSize;
// see if it exists
CAssoc* pAssoc;
for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext)
{
if (pAssoc->key == key)
return pAssoc->value;
}
return NULL;
}
Regards.
|
|
|
|
|
zahid_ash wrote: m_pListenSock = new CSock();m_pListenSock->Create(200); // Before this statment ( Eror is access violation)
have you check, that m_pListenSock hold requested memory or not!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
can you show contructor CSock?
whitesky
|
|
|
|
|
I want to change button properties like shape,etc.i want to use a bit map as a button but not as rectangular shape.how can i do this?and what is owner draw?what is its use?
E-Ramu
|
|
|
|
|
|
Ramu wrote: I want to change button properties like shape,etc.i want to use a bit map as a button but not as rectangular shape.how can i do this?and what is owner draw?what is its use?
Use CBitmapButton
Set the property of the button as OwnerDraw.
And use LoadBitmap to load the bitmap of the button
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
You can derived cbutton and use event WM_DRAWITEM of course change ownerdraw in property from button
whitesky
|
|
|
|
|
Ramu.e wrote: want to change button properties like shape,etc.i want to use a bit map as a button but not as rectangular shape.how can i do this?and what is owner draw?what is its use?
have a look at this article :- http://www.codeproject.com/miscctrl/subclassdemo.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello comunity,
how is to use TCS_OWNERDRAWFIXED for the CTabCtrl, in my case they dont answer on NM_CUSTOMDRAW message, so i think to try with this to set own tab style like font color for each tabitem??!!!!
Thanx
break;
|
|
|
|
|
Hi,
im finish with this!
break;
|
|
|
|
|
As you can see,any .exe file was compiled by Turbo C (for dos version) will run in dos mode!And if you write an application(in Turbo C) to draw something(a line,a circle...),you'll see these line or circle in dos mode!
I really dont know how to do that in VC++!
Can you help me!
Thank!
|
|
|
|
|
You should click on "Reply" instead of starting a new thread every time.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
|
|
kflrei wrote: write an application(in Turbo C) to draw something(a line,a circle...),you'll see these line or circle in dos mode!
It's 16-bit DOS; it's in graphical mode.
Maxwell Chen
|
|
|
|
|
Thank you,but i really mean that it will draw something in a
"console window"(like command promt window)...
|
|
|
|
|
In the old DOS days, most "graphics" was drawn using the semi-graphic characters in the normal character set.
The semi-graphic characters has "ASCII" values in the interval 0xB0 to 0xDF.
In addition, there is (was) the possibility to set foreground and background colors.
Is this what you are looking for?
|
|
|
|
|
I want to do more things than set foreground and background colors!
But,thank you!(^-^)
|
|
|
|
|
Hi,
can anyone please help me out in understanding COPY CONSTRUCTOR..please clarify me on the following questions..
1. What a COPY CONSTRUCTOR actually does and when it is used..
2. Please let me know as when we go about writing our own COPY CONSTRUCTORS(though system provides one by default)..
3. What a assigment operator does and in what way is it different from COPY CONSTRUCTOR..
if there are any interesting materials on these topics do let me know as I am getting much confused on the usage of these concepts..
Thanks In Advance
|
|
|
|