Skip to content

Commit

Permalink
コメント追記
Browse files Browse the repository at this point in the history
  • Loading branch information
i-saint committed Sep 1, 2013
1 parent 104802d commit 5edfcaa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
15 changes: 7 additions & 8 deletions DynamicPatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ dpAPI bool dpFinalize()
return false;
}


dpAPI size_t dpLoad(const char *path) { return dpGetCurrentContext()->load(path); }
dpAPI bool dpLoadObj(const char *path) { return dpGetCurrentContext()->getLoader()->loadObj(path)!=nullptr; }
dpAPI bool dpLoadLib(const char *path) { return dpGetCurrentContext()->getLoader()->loadLib(path)!=nullptr; }
dpAPI bool dpLoadDll(const char *path) { return dpGetCurrentContext()->getLoader()->loadDll(path)!=nullptr; }
dpAPI size_t dpLoadMapFiles() { return dpGetCurrentContext()->getLoader()->loadMapFiles(); };
dpAPI bool dpUnload(const char *path) { return dpGetCurrentContext()->getLoader()->unload(path); };
dpAPI bool dpLink() { return dpGetCurrentContext()->getLoader()->link(); }
dpAPI size_t dpLoad(const char *path) { return dpGetCurrentContext()->load(path); }
dpAPI bool dpLoadObj(const char *path) { return dpGetCurrentContext()->getLoader()->loadObj(path)!=nullptr; }
dpAPI bool dpLoadLib(const char *path) { return dpGetCurrentContext()->getLoader()->loadLib(path)!=nullptr; }
dpAPI bool dpLoadDll(const char *path) { return dpGetCurrentContext()->getLoader()->loadDll(path)!=nullptr; }
dpAPI bool dpUnload(const char *path) { return dpGetCurrentContext()->getLoader()->unload(path); };
dpAPI bool dpLink() { return dpGetCurrentContext()->getLoader()->link(); }
dpAPI size_t dpLoadMapFiles() { return dpGetCurrentContext()->getLoader()->loadMapFiles(); };

dpAPI size_t dpPatchByFile(const char *filename, const char *filter_regex)
{
Expand Down
7 changes: 5 additions & 2 deletions DynamicPatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,12 @@ dpAPI size_t dpLoad(const char *path); // path to .obj .lib .dll .exe. accepts w
dpAPI bool dpLoadObj(const char *path); // load as .obj regardless file extension
dpAPI bool dpLoadLib(const char *path); // load as .lib regardless file extension
dpAPI bool dpLoadDll(const char *path); // load as .dll regardless file extension
dpAPI size_t dpLoadMapFiles(); // load symbol info from .map files.
dpAPI bool dpUnload(const char *path);
dpAPI bool dpLink(); // must be called after dpLoad*()s & dpUnload()s. onload handler is called in this.
dpAPI size_t dpLoadMapFiles(); // load symbol info from .map files. this function will reduce link time for .obj files drastically.
// .map files should be placed on same directory of .exe or .dll with same name.
// ex) c:/foo/bar.exe -> c:/foo/bar.map
// .map files will be generated if linker option /map is specified.

dpAPI size_t dpPatchByFile(const char *filename, const char *filter_regex); // ex: dpPatchByFile("MyClass.obj", "MyClass::.*")
#ifdef dpWithStdFunction
Expand Down Expand Up @@ -178,9 +181,9 @@ dpAPI const char* dpGetVCVarsPath();
#define dpLoadObj(...)
#define dpLoadLib(...)
#define dpLoadDll(...)
#define dpLoadMapFiles(...)
#define dpUnload(...)
#define dpLink(...)
#define dpLoadMapFiles(...)
#define dpPatchByFile(...)
#define dpPatchNameToName(...)
#define dpPatchAddressToName(...)
Expand Down
1 change: 1 addition & 0 deletions Test/Test_UseLibDll.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<GenerateMapFile>true</GenerateMapFile>
</Link>
<PostBuildEvent>
<Command>
Expand Down

0 comments on commit 5edfcaa

Please sign in to comment.