Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to disable CDockablePane context menu? Pin
eight19-Jul-09 17:02
eight19-Jul-09 17:02 
GeneralRe: How to disable CDockablePane context menu? Pin
eight19-Jul-09 17:54
eight19-Jul-09 17:54 
AnswerRe: How to disable CDockablePane context menu? Pin
severin09-Oct-09 8:17
severin09-Oct-09 8:17 
QuestionPragma pack, pointer, 32 vs 64 bits build Pin
Kochise17-Jul-09 0:55
Kochise17-Jul-09 0:55 
AnswerRe: Pragma pack, pointer, 32 vs 64 bits build [modified] Pin
Kochise17-Jul-09 1:17
Kochise17-Jul-09 1:17 
GeneralRe: Pragma pack, pointer, 32 vs 64 bits build Pin
Randor 17-Jul-09 1:54
professional Randor 17-Jul-09 1:54 
AnswerRe: Pragma pack, pointer, 32 vs 64 bits build Pin
Stuart Dootson17-Jul-09 1:50
professionalStuart Dootson17-Jul-09 1:50 
GeneralRe: Pragma pack, pointer, 32 vs 64 bits build [modified] Pin
Kochise17-Jul-09 5:44
Kochise17-Jul-09 5:44 
Yeah, the root of the problem is that I'm currently writing a generic linked-in driver for Erlang that should adapt to any kind of platform, be it 32 or 64 bits. Imagine the client side to be 64 and the server side to be 32 bits, of course the pointers provided in the structs can only be used locally, yet if the server needs a data chunk from the client side, it just have to request it using its handle (the pointer). That's why both side MUST have the same struct layout, so that the 32 bits server could catch up the valid 64 bits pointer from the raw piece of data extracted from the up-coming message, then send it back in a 'hands-up and gimme your memory' kinda request (handshake).

I imagine it would be kind to pack the whole struct in a #pragma pack(1) fashion for message-passing, yet rendering it useless for run-time usage due to alignment fault that could arise. And packing/unpacking structs while they are sent/read is NOT the solution, the best would be to get them correctly shaped from the very beginning, the extra (wasteful) padding bytes included :/ Problems arises as the size but also the alignment of data change between a 32 and 64 bits architechture, what makes things a bit over complicated to my taste : http://docs.hp.com/en/5966-9844/ch03s02.html

I would like to avoid requiring the use of an extra library, because one might lead to require another one, leading to a complete mess. I'm a macro freak, and if some well defined macros do the job, I'm pretty for that kind of solution.

Kochise

In Code we trust !

modified on Friday, July 17, 2009 11:50 AM

GeneralRe: Pragma pack, pointer, 32 vs 64 bits build Pin
Stuart Dootson17-Jul-09 13:05
professionalStuart Dootson17-Jul-09 13:05 
AnswerRe: Pragma pack, pointer, 32 vs 64 bits build Pin
cmk17-Jul-09 8:54
cmk17-Jul-09 8:54 
GeneralRe: Pragma pack, pointer, 32 vs 64 bits build Pin
Kochise17-Jul-09 10:32
Kochise17-Jul-09 10:32 
GeneralRe: Pragma pack, pointer, 32 vs 64 bits build Pin
cmk17-Jul-09 11:43
cmk17-Jul-09 11:43 
QuestionBHO IE7 problem when protected mode is ON? Pin
svt gdwl17-Jul-09 0:16
svt gdwl17-Jul-09 0:16 
AnswerRe: BHO IE7 problem when protected mode is ON? Pin
Michael Schubert17-Jul-09 0:51
Michael Schubert17-Jul-09 0:51 
GeneralRe: BHO IE7 problem when protected mode is ON? Pin
ThatsAlok18-Jul-09 7:45
ThatsAlok18-Jul-09 7:45 
QuestionSpecifying unicode strings Pin
Jon17-Jul-09 0:14
Jon17-Jul-09 0:14 
AnswerRe: Specifying unicode strings Pin
Randor 17-Jul-09 0:32
professional Randor 17-Jul-09 0:32 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 0:56
Jon17-Jul-09 0:56 
GeneralRe: Specifying unicode strings Pin
Michael Schubert17-Jul-09 1:10
Michael Schubert17-Jul-09 1:10 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 2:49
Jon17-Jul-09 2:49 
GeneralRe: Specifying unicode strings Pin
Michael Schubert17-Jul-09 3:12
Michael Schubert17-Jul-09 3:12 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 3:30
Jon17-Jul-09 3:30 
AnswerRe: Specifying unicode strings Pin
Michael Schubert17-Jul-09 0:41
Michael Schubert17-Jul-09 0:41 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 1:11
Jon17-Jul-09 1:11 
AnswerRe: Specifying unicode strings Pin
Adam Roderick J17-Jul-09 0:56
Adam Roderick J17-Jul-09 0:56 

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.