Created
December 21, 2010 06:28
-
-
Save noqisofon/749577 to your computer and use it in GitHub Desktop.
パイプとフレームバッファ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct pipe_t { | |
handle_t output; | |
handle_t input; | |
}; | |
int pipe_init(pipe_t* pipe, security_attributes_t* attributes) | |
{ | |
boolean ret; | |
if ( !pipe ) | |
return -1; | |
ret = CreatePipe( &pipe->output, &pipe->input, attributes, 0 ); | |
return ret != 0; | |
} | |
struct frame_buffer_t { | |
int header; | |
int size; | |
BYTE buffer[FRAME_BUFFER_MAXLENGTH]; | |
}; | |
int frame_buffer_init(frame_buffer_t* frame) { | |
if ( !frame ) | |
return -1; | |
frame->header = 0; | |
frame->size = 0; | |
ZeroMemory( frame->buffer, FRAME_BUFFER_MAXLENGTH ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment