| 116 | } |
| 117 | |
| 118 | void verror(DWORD dwErrorCode, const char *msg, va_list ap) |
| 119 | { |
| 120 | debug("ERROR: "); |
| 121 | |
| 122 | vdebug(msg, ap); |
| 123 | |
| 124 | char *msgbuf; |
| 125 | int rc= FormatMessage( |
| 126 | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, |
| 127 | NULL, dwErrorCode, 0, (char*) &msgbuf, 0, NULL); |
| 128 | if (rc) |
| 129 | debug(" - %s\n", msgbuf); |
| 130 | else |
| 131 | debug(" - UNKNOWNERROR: 0x%08lx\n", dwErrorCode); |
| 132 | LocalFree(msgbuf); |
| 133 | } |
| 134 | void error(DWORD dwErrorCode, const char *msg, ...) |
| 135 | { |
| 136 | va_list ap; |