Click here to Skip to main content
15,899,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with resizing window Pin
blackbolek10-Jan-12 20:52
blackbolek10-Jan-12 20:52 
GeneralRe: Problem with resizing window Pin
Albert Holguin11-Jan-12 7:55
professionalAlbert Holguin11-Jan-12 7:55 
AnswerRe: Problem with resizing window Pin
Richard MacCutchan9-Jan-12 5:50
mveRichard MacCutchan9-Jan-12 5:50 
GeneralRe: Problem with resizing window Pin
Albert Holguin9-Jan-12 7:26
professionalAlbert Holguin9-Jan-12 7:26 
GeneralRe: Problem with resizing window Pin
blackbolek9-Jan-12 10:14
blackbolek9-Jan-12 10:14 
AnswerRe: Problem with resizing window Pin
Luc Pattyn9-Jan-12 11:07
sitebuilderLuc Pattyn9-Jan-12 11:07 
GeneralRe: Problem with resizing window Pin
Richard MacCutchan9-Jan-12 21:19
mveRichard MacCutchan9-Jan-12 21:19 
QuestionTop level menu - Message on losing focus Pin
RavishB9-Jan-12 3:22
RavishB9-Jan-12 3:22 
AnswerRe: Top level menu - Message on losing focus Pin
Code-o-mat9-Jan-12 6:14
Code-o-mat9-Jan-12 6:14 
QuestionLog event message Pin
_Flaviu8-Jan-12 22:58
_Flaviu8-Jan-12 22:58 
AnswerRe: Log event message Pin
Chandrasekharan P8-Jan-12 23:38
Chandrasekharan P8-Jan-12 23:38 
QuestionWinSNMP Pin
msr_codeproject8-Jan-12 19:40
msr_codeproject8-Jan-12 19:40 
AnswerRe: WinSNMP Pin
Richard MacCutchan8-Jan-12 22:55
mveRichard MacCutchan8-Jan-12 22:55 
AnswerRe: WinSNMP Pin
S p k 5219-Jan-12 19:16
S p k 5219-Jan-12 19:16 
QuestionCalling via TAPI Pin
Hadi Dayvary7-Jan-12 4:03
professionalHadi Dayvary7-Jan-12 4:03 
Question#pragma data_seg issue - Sharing only works with multiple instances of the same EXE Pin
bcb_guy6-Jan-12 21:00
bcb_guy6-Jan-12 21:00 
AnswerRe: #pragma data_seg issue - Sharing only works with multiple instances of the same EXE Pin
bcb_guy7-Jan-12 10:37
bcb_guy7-Jan-12 10:37 
I think I might have found out what's going on. The above code works fine with an integer. According to MSDN:

Each process gets its own address space. It is very important that pointers are never stored in a variable contained in a shared data segment. A pointer might be perfectly valid in one application but not in another.


And when you think of it, LPSTR is an array of chars which *is* a pointer. I've tried the above example also with a char * (before I read this) and still made no difference as well as a std:string. All I want to really share is a bunch of chars.

Update: I found more clarification here: http://sites.google.com/site/jozsefbekes/Home/windows-programming/shared-data-segment-in-a-dll[^]

You can only have fixed size data here (no dynamic arrays or CString)
You have to initialize all data otherwise it won't be shared (Of course it makes no sense to put pointers here as the address would be valid in one process only)

So to share a string, you can create a char[] array and initialize it and then just store the value in it.

modified 7-Jan-12 16:54pm.

QuestionDLL global variable question - VC++ 2010 Express - unable to set Pin
bcb_guy6-Jan-12 15:17
bcb_guy6-Jan-12 15:17 
AnswerRe: DLL global variable question - VC++ 2010 Express - unable to set Pin
«_Superman_»6-Jan-12 15:56
professional«_Superman_»6-Jan-12 15:56 
GeneralRe: DLL global variable question - VC++ 2010 Express - unable to set Pin
bcb_guy6-Jan-12 16:53
bcb_guy6-Jan-12 16:53 
Questionpackage and deployment for VC6 Pin
azhari246-Jan-12 2:41
azhari246-Jan-12 2:41 
AnswerRe: package and deployment for VC6 Pin
Maximilien6-Jan-12 9:23
Maximilien6-Jan-12 9:23 
GeneralRe: package and deployment for VC6 Pin
azhari246-Jan-12 17:27
azhari246-Jan-12 17:27 
AnswerRe: package and deployment for VC6 Pin
jeron16-Jan-12 11:01
jeron16-Jan-12 11:01 
GeneralRe: package and deployment for VC6 Pin
azhari246-Jan-12 17:32
azhari246-Jan-12 17:32 

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.