WriteFile requires 4th parameter

Fixes crashes on certain versions of Windows.
This commit is contained in:
Alex Mayfield 2017-03-09 20:12:21 -05:00
parent b4701b6c91
commit fee18df791
2 changed files with 4 additions and 2 deletions

View file

@ -161,8 +161,9 @@ static boolean MidiPipe_RegisterSong(buffer_reader_t *reader)
buffer[0] = (i >> 8) & 0xff;
buffer[1] = i & 0xff;
DWORD bytes_written;
WriteFile(midi_process_out, buffer, sizeof(buffer),
NULL, NULL);
&bytes_written, NULL);
return true;
}

View file

@ -127,8 +127,9 @@ static boolean UsingNativeMidi()
//
static boolean WritePipe(net_packet_t *packet)
{
DWORD bytes_written;
BOOL ok = WriteFile(midi_process_in_writer, packet->data, packet->len,
NULL, NULL);
&bytes_written, NULL);
if (!ok)
{