Click here to Skip to main content
15,915,869 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Unsorted Map and Multimap :: STL Pin
valikac21-Dec-02 11:43
valikac21-Dec-02 11:43 
GeneralRe: Unsorted Map and Multimap :: STL Pin
Christian Graus21-Dec-02 11:33
protectorChristian Graus21-Dec-02 11:33 
GeneralRe: Unsorted Map and Multimap :: STL Pin
valikac21-Dec-02 12:43
valikac21-Dec-02 12:43 
GeneralRe: Unsorted Map and Multimap :: STL Pin
Christian Graus21-Dec-02 12:46
protectorChristian Graus21-Dec-02 12:46 
GeneralRe: Unsorted Map and Multimap :: STL Pin
valikac21-Dec-02 12:50
valikac21-Dec-02 12:50 
GeneralPackaging a VC++ Software Pin
xxhimanshu21-Dec-02 1:46
xxhimanshu21-Dec-02 1:46 
GeneralRe: Packaging a VC++ Software Pin
Anatoly Ivasyuk24-Dec-02 5:57
Anatoly Ivasyuk24-Dec-02 5:57 
Generalserialize using stream. - binary Pin
magicast20-Dec-02 2:48
magicast20-Dec-02 2:48 
hi~
I apologize being not good at English.

I wanna serialize my own data for network/file/etc...

I thought that stream of c++ standard library is suitable.
but, there's no facilities exactly for my use.

1. I wanna store stream data into memory.(not file)
2. insertion and extraction must operate in binary mode.

// example of usage
// proc A
omystream ms; // mystream is that I wanted..
int n = 1;
short s = 2;

ms << n << s;
// or ms << int_b(n) << short_b(s);
// int_b(), short_b() is custom manipulators

::send(ms.buf(),...); // send to network

// proc B
BYTE buf[4096];

::revc(buf,...); // receive from network

imystream ms(buf, dwSizeReceived); // dwSizeReceived = 6

int n;
short s;

ms >> n >> s; // n = 1, s = 2
// or ms >> int_b(n) >> short_b(s);


// result
data occupy 6 bytes memory. (4 for n(int), 2 for s(short))
send and receive 6 byte of memory.
memory layout:
00 00 00 01 00 02 // 6 byte
not
"000000010002" // 12 byte

this mean not string but binary.


how can I achieve it?
derive strstream or stream?
derive stream_buf?
I need your advice. Smile | :)

thanks in advance.
GeneralRe: serialize using stream. - binary Pin
AlexO20-Dec-02 4:04
AlexO20-Dec-02 4:04 
GeneralRe: serialize using stream. - binary Pin
Ben Burnett5-Jan-03 13:17
Ben Burnett5-Jan-03 13:17 
GeneralNeed help using SafeArray/VARIANT from ASP/VBScript client Pin
bahruddina19-Dec-02 16:20
bahruddina19-Dec-02 16:20 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn19-Dec-02 20:40
protectorBarry Lapthorn19-Dec-02 20:40 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 3:33
AlexO20-Dec-02 3:33 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn20-Dec-02 5:59
protectorBarry Lapthorn20-Dec-02 5:59 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 7:17
AlexO20-Dec-02 7:17 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn22-Dec-02 0:44
protectorBarry Lapthorn22-Dec-02 0:44 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Anonymous20-Dec-02 3:42
Anonymous20-Dec-02 3:42 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 4:05
AlexO20-Dec-02 4:05 
GeneralExecutable as server type Pin
jmodia19-Dec-02 3:58
jmodia19-Dec-02 3:58 
GeneralATL Server include issue.... Pin
nw6031218-Dec-02 18:25
nw6031218-Dec-02 18:25 
GeneralATL and GDI+ Pin
Jonathan de Halleux18-Dec-02 2:26
Jonathan de Halleux18-Dec-02 2:26 
GeneralRe: ATL and GDI+ Pin
Jörgen Sigvardsson21-Dec-02 10:21
Jörgen Sigvardsson21-Dec-02 10:21 
GeneralRe: ATL and GDI+ Pin
pba_23-Dec-02 12:54
pba_23-Dec-02 12:54 
GeneralRe: ATL and GDI+ Pin
Jonathan de Halleux24-Dec-02 2:58
Jonathan de Halleux24-Dec-02 2:58 
GeneralAttributed ATL and interfaces Pin
Chad Busche16-Dec-02 6:44
Chad Busche16-Dec-02 6:44 

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.