mirror of
https://github.com/stascorp/rdpwrap.git
synced 2024-11-10 02:08:20 +00:00
Some fixes
This commit is contained in:
parent
31cce7a873
commit
b5b5806177
@ -56,7 +56,7 @@ FARJMP Old_SLGetWindowsInformationDWORD, Stub_SLGetWindowsInformationDWORD;
|
|||||||
SLGETWINDOWSINFORMATIONDWORD _SLGetWindowsInformationDWORD;
|
SLGETWINDOWSINFORMATIONDWORD _SLGetWindowsInformationDWORD;
|
||||||
|
|
||||||
INI_FILE *IniFile;
|
INI_FILE *IniFile;
|
||||||
wchar_t LogFile[256] = L"\\rdpwrap.txt";
|
wchar_t LogFile[256] = L"\\rdpwrap.txt\0";
|
||||||
HMODULE hTermSrv;
|
HMODULE hTermSrv;
|
||||||
HMODULE hSLC;
|
HMODULE hSLC;
|
||||||
PLATFORM_DWORD TermSrvBase;
|
PLATFORM_DWORD TermSrvBase;
|
||||||
@ -497,6 +497,7 @@ void Hook()
|
|||||||
extern wchar_t LogFile[256];
|
extern wchar_t LogFile[256];
|
||||||
|
|
||||||
AlreadyHooked = true;
|
AlreadyHooked = true;
|
||||||
|
char *Log;
|
||||||
|
|
||||||
wchar_t ConfigFile[256] = {0x00};
|
wchar_t ConfigFile[256] = {0x00};
|
||||||
WriteToLog("Loading configuration...\r\n");
|
WriteToLog("Loading configuration...\r\n");
|
||||||
@ -507,10 +508,15 @@ void Hook()
|
|||||||
if(ConfigFile[i] == '\\')
|
if(ConfigFile[i] == '\\')
|
||||||
{
|
{
|
||||||
memset(&ConfigFile[i+1], 0x00, ((256-(i+1)))*2);
|
memset(&ConfigFile[i+1], 0x00, ((256-(i+1)))*2);
|
||||||
memcpy(&ConfigFile[i+1], "rdpwrap.ini", strlen("rdpwrap.ini")*2);
|
memcpy(&ConfigFile[i+1], L"rdpwrap.ini", strlen("rdpwrap.ini")*2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log = new char[1024];
|
||||||
|
wsprintfA(Log, "Configuration file: %S\r\n", ConfigFile);
|
||||||
|
WriteToLog(Log);
|
||||||
|
delete[] Log;
|
||||||
|
|
||||||
IniFile = new INI_FILE(ConfigFile);
|
IniFile = new INI_FILE(ConfigFile);
|
||||||
|
|
||||||
if (IniFile == NULL)
|
if (IniFile == NULL)
|
||||||
@ -519,7 +525,7 @@ void Hook()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*INI_VAR_STRING LogFileVar;
|
INI_VAR_STRING LogFileVar;
|
||||||
|
|
||||||
if(!(IniFile->GetVariableInSection("Main", "LogFile", &LogFileVar)))
|
if(!(IniFile->GetVariableInSection("Main", "LogFile", &LogFileVar)))
|
||||||
{
|
{
|
||||||
@ -529,13 +535,17 @@ void Hook()
|
|||||||
if(LogFile[i] == '\\')
|
if(LogFile[i] == '\\')
|
||||||
{
|
{
|
||||||
memset(&LogFile[i+1], 0x00, ((256-(i+1)))*2);
|
memset(&LogFile[i+1], 0x00, ((256-(i+1)))*2);
|
||||||
memcpy(&LogFile[i+1], "rdpwrap.txt", strlen("rdpwrap.txt")*2);
|
memcpy(&LogFile[i+1], L"rdpwrap.txt", strlen("rdpwrap.txt")*2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else memcpy((void*)LogFile, LogFileVar.Value, strlen(LogFileVar.Value));*/
|
else memcpy((void*)LogFile, LogFileVar.Value, strlen(LogFileVar.Value));
|
||||||
|
|
||||||
|
Log = new char[1024];
|
||||||
|
wsprintfA(Log, "Log file: %S\r\n", LogFile);
|
||||||
|
WriteToLog(Log);
|
||||||
|
delete[] Log;
|
||||||
|
|
||||||
char *Log;
|
|
||||||
SIZE_T bw;
|
SIZE_T bw;
|
||||||
WORD Ver = 0;
|
WORD Ver = 0;
|
||||||
PLATFORM_DWORD TermSrvSize, SignPtr;
|
PLATFORM_DWORD TermSrvSize, SignPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user