formatting

This commit is contained in:
Mr. eXoDia 2014-07-25 22:37:28 +02:00
parent d6cb3e584b
commit b350775721
3 changed files with 27 additions and 26 deletions

View File

@ -120,7 +120,7 @@ __declspec(dllexport) void* TITCALL HandlerGetHandleNameW(HANDLE hProcess, DWORD
}
}
pHandle++;
pHandle++;
}
if(!NameFound)

View File

@ -252,7 +252,8 @@ typedef struct _PROCESS_BASIC_INFORMATION
} PROCESS_BASIC_INFORMATION;
typedef PROCESS_BASIC_INFORMATION *PPROCESS_BASIC_INFORMATION;
typedef struct _THREAD_BASIC_INFORMATION {
typedef struct _THREAD_BASIC_INFORMATION
{
NTSTATUS ExitStatus;
PVOID TebBaseAddress;
CLIENT_ID ClientId;

View File

@ -1,24 +1,24 @@
#include <windows.h>
wchar_t szLibraryPath[512];
int main()
{
memset(szLibraryPath, 0, sizeof(szLibraryPath));
wchar_t szName[256]=L"";
wsprintfW(szName, L"Global\\szLibraryName%X", (unsigned int)GetCurrentProcessId());
HANDLE hMapFile=OpenFileMappingW(FILE_MAP_READ, false, szName);
if(hMapFile)
{
const wchar_t* szLibraryPathMapping=(const wchar_t*)MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, sizeof(szLibraryPath));
if(szLibraryPathMapping)
{
lstrcpyW(szLibraryPath, szLibraryPathMapping);
UnmapViewOfFile(szLibraryPathMapping);
}
CloseHandle(hMapFile);
}
if(szLibraryPath[0])
return (LoadLibraryW(szLibraryPath)!=NULL);
return 0;
}
#include <windows.h>
wchar_t szLibraryPath[512];
int main()
{
memset(szLibraryPath, 0, sizeof(szLibraryPath));
wchar_t szName[256]=L"";
wsprintfW(szName, L"Global\\szLibraryName%X", (unsigned int)GetCurrentProcessId());
HANDLE hMapFile=OpenFileMappingW(FILE_MAP_READ, false, szName);
if(hMapFile)
{
const wchar_t* szLibraryPathMapping=(const wchar_t*)MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, sizeof(szLibraryPath));
if(szLibraryPathMapping)
{
lstrcpyW(szLibraryPath, szLibraryPathMapping);
UnmapViewOfFile(szLibraryPathMapping);
}
CloseHandle(hMapFile);
}
if(szLibraryPath[0])
return (LoadLibraryW(szLibraryPath)!=NULL);
return 0;
}