named pipe: how to write array of struct
-
hi... this is my first post here. can someone provide me with a sample of how to write an array of struct via named pipe? i am new to named pipe. i have tried writing using the message type mode... however i have not tried using byte mode. moreover, i have an array of struct to write. thanks in advance for any help! newbie :)
-
hi... this is my first post here. can someone provide me with a sample of how to write an array of struct via named pipe? i am new to named pipe. i have tried writing using the message type mode... however i have not tried using byte mode. moreover, i have an array of struct to write. thanks in advance for any help! newbie :)
This question should be posted on the Visual C++/MFC board since it doesn't seem to involve managed C++. In byte mode you need a pointer to the first struct you want to write. The number of bytes to write is the sizeof the struct times the number of structs to write. Which part is giving you trouble? Mark
"If you can dodge a wrench, you can dodge a ball."
-
hi... this is my first post here. can someone provide me with a sample of how to write an array of struct via named pipe? i am new to named pipe. i have tried writing using the message type mode... however i have not tried using byte mode. moreover, i have an array of struct to write. thanks in advance for any help! newbie :)
Definitely a first post worthy of a 5 vote! :)
"If you can dodge a wrench, you can dodge a ball."
-
Definitely a first post worthy of a 5 vote! :)
"If you can dodge a wrench, you can dodge a ball."
hi Mark... thanks and sorry for the wrong post... can i just continue the thread here and not repost in vc++? :) i have done a sample app of writing structs via named pipe... my trouble now is how to properly manage/convert the array of structs to LPVOID which is what i am passing to the named pipe functions (readfile/writefile)... and from LPVOID back to array of structs. or should i use a different data type and not lpvoid? thanks again! newbie :)