91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 29KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-03
  • 語言: 其他
  • 標簽: 內存??DLL??

資源簡介

使用MemoryModule開源方案,內存加載DLL,替代LoadLibrary,不需要把文件存放在磁盤上

資源截圖

代碼片段和文件信息

/*
?*?Memory?DLL?loading?code
?*?Version?0.0.4
?*
?*?Copyright?(c)?2004-2014?by?Joachim?Bauch?/?mail@joachim-bauch.de
?*?http://www.joachim-bauch.de
?*
?*?The?contents?of?this?file?are?subject?to?the?Mozilla?Public?License?Version
?*?2.0?(the?“License“);?you?may?not?use?this?file?except?in?compliance?with
?*?the?License.?You?may?obtain?a?copy?of?the?License?at
?*?http://www.mozilla.org/MPL/
?*
?*?Software?distributed?under?the?License?is?distributed?on?an?“AS?IS“?basis
?*?WITHOUT?WARRANTY?OF?ANY?KIND?either?express?or?implied.?See?the?License
?*?for?the?specific?language?governing?rights?and?limitations?under?the
?*?License.
?*
?*?The?Original?Code?is?MemoryModule.c
?*
?*?The?Initial?Developer?of?the?Original?Code?is?Joachim?Bauch.
?*
?*?Portions?created?by?Joachim?Bauch?are?Copyright?(C)?2004-2014
?*?Joachim?Bauch.?All?Rights?Reserved.
?*
?*/

#ifndef?__GNUC__
//?disable?warnings?about?pointer?<->?DWORD?conversions
#pragma?warning(?disable?:?4311?4312?)
#endif

#ifdef?_WIN64
#define?POINTER_TYPE?ULONGLONG
#else
#define?POINTER_TYPE?DWORD
#endif

#include?
#include?
#include?
#ifdef?DEBUG_OUTPUT
#include?
#endif

#ifndef?IMAGE_SIZEOF_base_RELOCATION
//?Vista?SDKs?no?longer?define?IMAGE_SIZEOF_base_RELOCATION!?
#define?IMAGE_SIZEOF_base_RELOCATION?(sizeof(IMAGE_base_RELOCATION))
#endif

#include?“MemoryModule.h“

typedef?struct?{
????PIMAGE_NT_HEADERS?headers;
????unsigned?char?*codebase;
????HCUSTOMMODULE?*modules;
????int?numModules;
????int?initialized;
????CustomLoadLibraryFunc?loadLibrary;
????CustomGetProcAddressFunc?getProcAddress;
????CustomFreeLibraryFunc?freeLibrary;
????void?*userdata;
}?MEMORYMODULE?*PMEMORYMODULE;

typedef?BOOL?(WINAPI?*DllEntryProc)(HINSTANCE?hinstDLL?DWORD?fdwReason?LPVOID?lpReserved);

#define?GET_HEADER_DICTIONARY(module?idx) &(module)->headers->OptionalHeader.DataDirectory[idx]

#ifdef?DEBUG_OUTPUT
static?void
OutputLastError(const?char?*msg)
{
????LPVOID?tmp;
????char?*tmpmsg;
????FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER?|?FORMAT_MESSAGE_FROM_SYSTEM?|?FORMAT_MESSAGE_IGNORE_INSERTS
????????NULL?GetLastError()?MAKELANGID(LANG_NEUTRAL?SUBLANG_DEFAULT)?(LPTSTR)&tmp?0?NULL);
????tmpmsg?=?(char?*)LocalAlloc(LPTR?strlen(msg)?+?strlen(tmp)?+?3);
????sprintf(tmpmsg?“%s:?%s“?msg?tmp);
????OutputDebugString(tmpmsg);
????LocalFree(tmpmsg);
????LocalFree(tmp);
}
#endif

static?void
CopySections(const?unsigned?char?*data?PIMAGE_NT_HEADERS?old_headers?PMEMORYMODULE?module)
{
????int?i?size;
????unsigned?char?*codebase?=?module->codebase;
????unsigned?char?*dest;
????PIMAGE_SECTION_HEADER?section?=?IMAGE_FIRST_SECTION(module->headers);
????for?(i=0;?iheaders->FileHeader.NumberOfSections;?i++?section++)?{
????????if?(section->SizeOfRawData?==?0)?{
????????????//?section?doesn‘t?contain?data?in?the?dll?itself?but?may?define
????????????//?uninitialized?data
????????????size?=?old_headers->OptionalHeader.SectionAlignment;
????????????if?(size?>?0)?{
?????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1669??2014-09-29?00:53??DllLoader\DllLoader.cpp

?????文件???????4775??2014-09-29?01:10??DllLoader\DllLoader.vcxproj

?????文件???????1532??2014-09-29?00:41??DllLoader\DllLoader.vcxproj.filters

?????文件????????165??2014-09-23?00:46??DllLoader\DllLoader.vcxproj.user

?????文件??????26724??2014-09-25?22:35??DllLoader\MemoryModule.cpp

?????文件???????3237??2014-09-22?00:34??DllLoader\MemoryModule.h

?????文件???????1729??2014-06-08?23:26??DllLoader\ReadMe.txt

?????文件????????296??2014-06-08?23:26??DllLoader\stdafx.cpp

?????文件????????340??2014-09-25?22:33??DllLoader\stdafx.h

?????文件????????314??2014-06-08?23:26??DllLoader\targetver.h

?????文件????????455??2014-09-24?00:02??MemDllTest\dllmain.cpp

?????文件?????????45??2014-09-29?00:44??MemDllTest\Export.def

?????文件????????476??2014-09-29?00:52??MemDllTest\ImgFunc.cpp

?????文件?????????97??2014-09-29?00:44??MemDllTest\ImgFunc.h

?????文件????????461??2014-09-29?00:43??MemDllTest\MemDllTest.cpp

?????文件???????6301??2014-09-29?00:45??MemDllTest\MemDllTest.vcxproj

?????文件???????1731??2014-09-23?23:57??MemDllTest\MemDllTest.vcxproj.filters

?????文件????????165??2014-09-25?22:22??MemDllTest\MemDllTest.vcxproj.user

?????文件???????2189??2014-09-23?22:29??MemDllTest\ReadMe.txt

?????文件????????297??2014-09-23?22:29??MemDllTest\stdafx.cpp

?????文件???????1232??2014-09-23?23:58??MemDllTest\stdafx.h

?????文件????????314??2014-09-23?22:29??MemDllTest\targetver.h

?????文件???????1442??2014-09-29?00:55??DllLoader.sln

????..A..H.?????26624??2014-09-29?01:10??DllLoader.v12.suo

?????文件??????25524??2014-09-21?05:24??MemoryModule.c

?????文件???????2743??2014-09-21?05:24??MemoryModule.h

?????目錄??????????0??2015-06-09?17:38??Debug

?????目錄??????????0??2015-05-16?23:37??DllLoader

?????目錄??????????0??2015-05-16?23:37??MemDllTest

-----------?---------??----------?-----??----

............此處省略2個文件信息

評論

共有 條評論