mirror of
https://github.com/stascorp/rdpwrap.git
synced 2025-08-19 21:03:43 -07:00
That epic commit
Seems to work well 👍
This commit is contained in:
parent
239cd5fe3f
commit
939a884f20
2 changed files with 23 additions and 20 deletions
|
@ -24,7 +24,7 @@ INI_FILE::INI_FILE(wchar_t *FilePath)
|
|||
DWORD Status = 0;
|
||||
DWORD NumberOfBytesRead = 0;
|
||||
|
||||
HANDLE hFile = CreateFile(FilePath, GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
HANDLE hFile = CreateFile(FilePath, GENERIC_READ, FILE_SHARE_WRITE|FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
|
@ -376,7 +376,7 @@ bool INI_FILE::GetVariableInSection(char *SectionName, char *VariableName, INI_V
|
|||
if (ValueLen > 32) ValueLen = 32; // 32 hex digits
|
||||
|
||||
memset(RetVariable, 0x00, sizeof(*RetVariable));
|
||||
memcpy(RetVariable->Name, Variable.VariableName, ValueLen);
|
||||
memcpy(RetVariable->Name, Variable.VariableName, strlen(Variable.VariableName));
|
||||
|
||||
for (DWORD i = 0; i <= ValueLen; i++)
|
||||
{
|
||||
|
@ -545,4 +545,4 @@ bool INI_FILE::GetSectionVariablesList(wchar_t *SectionName, INI_SECTION_VARLIST
|
|||
wcstombs(cSectionName, SectionName, MAX_STRING_LEN);
|
||||
|
||||
return GetSectionVariablesList(cSectionName, VariablesList);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue