Click here to Skip to main content
15,907,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Callback Function Pin
Tom Wright27-Dec-04 10:30
Tom Wright27-Dec-04 10:30 
GeneralRe: Callback Function Pin
RedDragon2k27-Dec-04 10:43
RedDragon2k27-Dec-04 10:43 
GeneralRe: Callback Function Pin
Tom Wright27-Dec-04 12:00
Tom Wright27-Dec-04 12:00 
GeneralRe: Callback Function Pin
Dennis Gourjii28-Dec-04 0:15
Dennis Gourjii28-Dec-04 0:15 
Generalpassing a struct with WM_COPYDATA Pin
Tom Wright27-Dec-04 9:14
Tom Wright27-Dec-04 9:14 
GeneralRe: passing a struct with WM_COPYDATA Pin
PJ Arends27-Dec-04 11:01
professionalPJ Arends27-Dec-04 11:01 
GeneralRe: passing a struct with WM_COPYDATA Pin
Tom Wright27-Dec-04 11:33
Tom Wright27-Dec-04 11:33 
GeneralRe: passing a struct with WM_COPYDATA Pin
PJ Arends27-Dec-04 11:53
professionalPJ Arends27-Dec-04 11:53 
Tom Wright wrote:
typedef struct tagCONNSTATUS {
int nConnID;
CString sThreadID;
CString sConnStatus;
}CONNSTATUS;
CONNSTATUS ConnStatus;


AFAIK the problem is with the CStrings. They contain pointers to the actual string data, and you can not pass pointers across process boundaries as the pointers will have no meaning to the recieving process.

You have to build your structure in such a way that it does not contain any pointers.
For example:
typedef struct tagCONNSTATUS {
   int nConnID;
   TCHAR sThreadID[128];
   TCHAR sConnStatus[128];
} CONNSTATUS;




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
GeneralRe: passing a struct with WM_COPYDATA Pin
Tom Wright28-Dec-04 11:55
Tom Wright28-Dec-04 11:55 
GeneralRe: passing a struct with WM_COPYDATA Pin
PJ Arends28-Dec-04 16:09
professionalPJ Arends28-Dec-04 16:09 
GeneralRe: passing a struct with WM_COPYDATA Pin
Tom Wright29-Dec-04 3:54
Tom Wright29-Dec-04 3:54 
GeneralCStatusBar Pin
Anthony988727-Dec-04 8:40
Anthony988727-Dec-04 8:40 
GeneralRe: CStatusBar Pin
Tom Wright27-Dec-04 10:35
Tom Wright27-Dec-04 10:35 
GeneralRe: CStatusBar Pin
virtualkiran28-Dec-04 0:10
sussvirtualkiran28-Dec-04 0:10 
GeneralStatic Control Question Pin
Deian27-Dec-04 7:30
Deian27-Dec-04 7:30 
GeneralRe: Static Control Question Pin
Renjith Ramachandran27-Dec-04 8:43
Renjith Ramachandran27-Dec-04 8:43 
GeneralRe: Static Control Question Pin
Deian27-Dec-04 8:46
Deian27-Dec-04 8:46 
GeneralRe: Static Control Question Pin
Prakash Nadar27-Dec-04 18:48
Prakash Nadar27-Dec-04 18:48 
GeneralThe CDialog and The Thread... Pin
babaum27-Dec-04 6:47
babaum27-Dec-04 6:47 
GeneralRe: The CDialog and The Thread... Pin
Michael Dunn27-Dec-04 7:36
sitebuilderMichael Dunn27-Dec-04 7:36 
GeneralRe: The CDialog and The Thread... Pin
babaum27-Dec-04 15:57
babaum27-Dec-04 15:57 
GeneralRe: The CDialog and The Thread... Pin
Tom Wright27-Dec-04 9:07
Tom Wright27-Dec-04 9:07 
GeneralRe: The CDialog and The Thread... Pin
Dennis Gourjii28-Dec-04 0:25
Dennis Gourjii28-Dec-04 0:25 
GeneralRe: The CDialog and The Thread... Pin
babaum28-Dec-04 0:35
babaum28-Dec-04 0:35 
GeneralRe: The CDialog and The Thread... Pin
Tom Wright28-Dec-04 11:47
Tom Wright28-Dec-04 11:47 

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.