Click here to Skip to main content
15,900,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: More linker errors Pin
Christian Graus22-Aug-05 19:36
protectorChristian Graus22-Aug-05 19:36 
GeneralRe: More linker errors Pin
Jose Lamas Rios22-Aug-05 20:06
Jose Lamas Rios22-Aug-05 20:06 
GeneralRe: More linker errors Pin
Christian Graus23-Aug-05 13:14
protectorChristian Graus23-Aug-05 13:14 
GeneralClistCtrl question Pin
Tom Wright22-Aug-05 12:54
Tom Wright22-Aug-05 12:54 
GeneralRe: ClistCtrl question Pin
Jose Lamas Rios22-Aug-05 17:02
Jose Lamas Rios22-Aug-05 17:02 
GeneralRe: ClistCtrl question Pin
Tom Wright23-Aug-05 4:57
Tom Wright23-Aug-05 4:57 
GeneralTrouble passing a class pointer to AfxBeingThread Pin
KnaveR77722-Aug-05 12:49
KnaveR77722-Aug-05 12:49 
GeneralRe: Trouble passing a class pointer to AfxBeingThread Pin
MailtoGops22-Aug-05 23:00
MailtoGops22-Aug-05 23:00 
Hi KnaveD,

I would like to interpret the following your statement..

LPVOID ptr = (LPVOID)((ServerData)m_serversList[pNMIA->iItem]);

I can assume that m_serversList[pNMIA->iItem] returns the ServerData object from an array of m_serversList. If you look at your typecasting, it seems to be, it is returning a temporary object, which you are typecasting to a void. That object is not at all a pointer!!!!

Solution
---------

If I am not wrong, you can modify your code like this..

LPVOID ptr = (LPVOID)((ServerData*) &m_serversList[pNMIA->iItem]);

ie to get the address of the array element..







" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "

- Words from Nelson Mandela

Thanks & Regards,

Gopalakrishnan
GeneralQ about WINDBG Pin
valerie9922-Aug-05 12:41
valerie9922-Aug-05 12:41 
GeneralRe: Q about WINDBG Pin
Blake Miller23-Aug-05 4:28
Blake Miller23-Aug-05 4:28 
QuestionHow to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 12:03
shanzy22-Aug-05 12:03 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 12:40
protectorChristian Graus22-Aug-05 12:40 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 12:50
shanzy22-Aug-05 12:50 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 13:03
protectorChristian Graus22-Aug-05 13:03 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:01
shanzy22-Aug-05 14:01 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 14:03
protectorChristian Graus22-Aug-05 14:03 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:08
shanzy22-Aug-05 14:08 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
Christian Graus22-Aug-05 14:10
protectorChristian Graus22-Aug-05 14:10 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 14:26
shanzy22-Aug-05 14:26 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
Jose Lamas Rios22-Aug-05 17:25
Jose Lamas Rios22-Aug-05 17:25 
AnswerRe: How to use the WIN32API in MFC Application?? Pin
ThatsAlok22-Aug-05 20:13
ThatsAlok22-Aug-05 20:13 
GeneralRe: How to use the WIN32API in MFC Application?? Pin
shanzy22-Aug-05 21:49
shanzy22-Aug-05 21:49 
GeneralWMI Pin
YusufK22-Aug-05 10:52
YusufK22-Aug-05 10:52 
GeneralRe: WMI Pin
Christian Graus22-Aug-05 12:02
protectorChristian Graus22-Aug-05 12:02 
GeneralRe: WMI Pin
YusufK23-Aug-05 7:59
YusufK23-Aug-05 7:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.