-
Notifications
You must be signed in to change notification settings - Fork 0
/
dxerr.c
46 lines (37 loc) · 1.15 KB
/
dxerr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/////////////////////////////////////////////////////////////////////////////////////
// DirectX Includes...
/////////////////////////////////////////////////////////////////////////////////////
#include "windows.h"
#include <stdio.h>
void WriteDebug(char *);
void DS_Error( ULONG hresult, char *msg )
{
char msgtext[128];
char errmsg[128];
sprintf(errmsg,"Error Code: %04X", hresult);
strcpy(errmsg, msgtext);
sprintf(msgtext, "DSERR: %s\n", errmsg);
WriteDebug( msgtext );
sprintf(msgtext, "%s FAILED\n", msg);
WriteDebug( msgtext );
}
void DD_Error( ULONG hresult, char *msg )
{
static char msgtext[128];
static char errmsg[128];
sprintf(errmsg, "Error Code : %04X", hresult);
sprintf(msgtext, "DDERR: %s\n", errmsg);
WriteDebug( msgtext );
sprintf(msgtext, "%s FAILED\n", msg);
WriteDebug( msgtext );
}
void DI_Error( ULONG hresult, char *msg)
{
char msgtext[512];
char errmsg[512];
sprintf(errmsg, "Error Code : %04X", hresult);
sprintf(msgtext, "DIERR: %s\n", errmsg);
WriteDebug( msgtext );
sprintf(msgtext, "%s FAILED\n", msg);
WriteDebug( msgtext );
}