Revert win long -> int changes

This commit is contained in:
Jacob Coby 2024-04-29 14:46:14 -04:00
parent a6a6869a7e
commit 2210afe02b
2 changed files with 9 additions and 9 deletions

View File

@ -1057,7 +1057,7 @@ static void PrintFileTime(char *sztime, FILETIME ftime) {
static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle) {
char FmtString[2000];
unsigned int bytesout;
unsigned long bytesout;
char ModName[MAX_PATH];
__try {
if (GetModuleFileName(ModuleHandle, ModName, sizeof(ModName)) > 0) {
@ -1102,7 +1102,7 @@ static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle) {
static void RecordModuleList(HANDLE LogFile) {
char FmtString[2000];
unsigned int bytesout;
unsigned long bytesout;
wsprintf(FmtString, "\r\n"
"Modules:\r\n");
WriteFile(LogFile, FmtString, lstrlen(FmtString), &bytesout, 0);
@ -1139,7 +1139,7 @@ static void RecordModuleList(HANDLE LogFile) {
static void RecordSystemInformation(HANDLE LogFile) {
char FmtString[2000];
unsigned int bytesout;
unsigned long bytesout;
FILETIME CurrentTime;
GetSystemTimeAsFileTime(&CurrentTime);
char TimeBuffer[100];
@ -1220,16 +1220,16 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message) {
char *p = Debug_DumpInfo();
lstrcpy(callstack, p);
unsigned int NumBytes;
unsigned long NumBytes;
SetFilePointer(LogFile, 0, 0, FILE_END);
WriteFile(LogFile, topmsg, lstrlen(topmsg), &NumBytes, 0);
WriteFile(LogFile, FORMATCRLF, lstrlen(FORMATCRLF), &NumBytes, 0);
char Username[100];
unsigned int unamelen = 99;
unsigned long unamelen = 99;
char Machinename[200];
unsigned int cnamelen = 199;
unsigned long cnamelen = 199;
GetUserName(Username, &unamelen);
GetComputerName(Machinename, &cnamelen);
wsprintf(callstack, "Username: %s\r\nMachineName: %s\r\n", Username, Machinename);

View File

@ -129,7 +129,7 @@ SOCKADDR_IN tcp_log_addr;
char tcp_log_buffer[MAX_TCPLOG_LEN];
void nw_InitTCPLogging(char *ip, unsigned short port) {
unsigned int argp = 1;
unsigned long argp = 1;
int addrlen = sizeof(SOCKADDR_IN);
tcp_log_sock = socket(AF_INET, SOCK_STREAM, 0);
if (INVALID_SOCKET == tcp_log_sock) {