Click here to Skip to main content
15,913,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable Text Box in dialog Box Pin
Member 15087325-Jan-05 0:24
Member 15087325-Jan-05 0:24 
GeneralI need some pointer help please Pin
fklldsvs4-Jan-05 17:29
fklldsvs4-Jan-05 17:29 
GeneralRe: I need some pointer help please Pin
ThatsAlok4-Jan-05 18:54
ThatsAlok4-Jan-05 18:54 
GeneralRe: I need some pointer help please Pin
John R. Shaw5-Jan-05 9:29
John R. Shaw5-Jan-05 9:29 
Questionhow can i play audio that use vivo's siren codec Pin
stephen_yeerwu4-Jan-05 15:31
stephen_yeerwu4-Jan-05 15:31 
QuestionHow can I share data which contain pointers between processes? Pin
berserkerr4-Jan-05 14:39
berserkerr4-Jan-05 14:39 
AnswerRe: How can I share data which contain pointers between processes? Pin
KaЯl4-Jan-05 21:26
KaЯl4-Jan-05 21:26 
AnswerRe: How can I share data which contain pointers between processes? Pin
Blake Miller5-Jan-05 5:09
Blake Miller5-Jan-05 5:09 
One way this will work is to create a memory mapped file at the same virtual address in both processes. The pointers in your data structures must point to this 'shared' memory that is at exactly the same address.

One thing to keep in mind, virtual memory available in one process at a speciftic address might not necessarily be available in the second, like one has a DLL loaded there already or something.
I would strongly recommend against the use of the pointers like this.

You could change your data structure to store an index, and have an array of your FirstStruct and
SecondStruct in shared memory, then they would not have to be at same address.

struct DataIndexes{
DWORD dwFirstStructOffset;
DWORD dwSecondStructOffset;
}

array of FirstStruct in shared memory
array of SecondStruct in shared memory

These two don't need to be in same shared memory mapped file, either.


Then you do not have to worry if the data is shared at exactly the same virtual address.


If you know how many items you need ahead of time, the easiest way woudl be to just create array of

struct SharedData{
FirstStruct mFirst;
SecondStruct mSecond;
}

and make an array of them in the shared memory (via memory mapped file), which, again, would not have to be at same virtual address within each process.
GeneralDoc View question Pin
act_x4-Jan-05 14:24
act_x4-Jan-05 14:24 
GeneralRe: Doc View question Pin
Shog94-Jan-05 14:36
sitebuilderShog94-Jan-05 14:36 
GeneralRe: Doc View question Pin
act_x4-Jan-05 14:47
act_x4-Jan-05 14:47 
Generalchar* from C++ dll in C# Pin
vinayakdl4-Jan-05 12:31
vinayakdl4-Jan-05 12:31 
GeneralRe: char* from C++ dll in C# Pin
Anthony_Yio4-Jan-05 20:53
Anthony_Yio4-Jan-05 20:53 
GeneralMaximizing view Pin
act_x4-Jan-05 10:55
act_x4-Jan-05 10:55 
GeneralRe: Maximizing view Pin
KaЯl4-Jan-05 21:39
KaЯl4-Jan-05 21:39 
GeneralRe: Maximizing view Pin
Rahim Rattani4-Jan-05 21:57
Rahim Rattani4-Jan-05 21:57 
GeneralIP address resolution Pin
Themis4-Jan-05 10:16
Themis4-Jan-05 10:16 
GeneralRe: IP address resolution Pin
Roger Wright4-Jan-05 10:47
professionalRoger Wright4-Jan-05 10:47 
GeneralSending strings (or characters) through sockets. Pin
SimCom4-Jan-05 10:15
SimCom4-Jan-05 10:15 
GeneralMicrosoft Word Event handling help... Pin
Moozz4-Jan-05 10:09
Moozz4-Jan-05 10:09 
GeneralStruct array with string identifier Pin
Oscar Rodriguez4-Jan-05 9:55
Oscar Rodriguez4-Jan-05 9:55 
GeneralRe: Struct array with string identifier Pin
Chris Losinger4-Jan-05 10:14
professionalChris Losinger4-Jan-05 10:14 
GeneralRe: Struct array with string identifier Pin
Oscar Rodriguez5-Jan-05 0:23
Oscar Rodriguez5-Jan-05 0:23 
GeneralRe: Struct array with string identifier Pin
Chris Losinger5-Jan-05 1:09
professionalChris Losinger5-Jan-05 1:09 
GeneralRe: Struct array with string identifier Pin
Oscar Rodriguez6-Jan-05 1:26
Oscar Rodriguez6-Jan-05 1:26 

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.