'DLL'에 해당되는 글 4건
- 2019.01.08 DLL Surrogates
- 2016.12.23 Binary-compatible C++ Interfaces
- 2013.10.15 DLL Inject
- 2013.08.01 Allocating and freeing memory across module boundaries
2019. 1. 8. 16:34
DLL Surrogates
2019. 1. 8. 16:34 in link/COM
example
- A DLL Surrogate is called with the appwiz.cpl's CLSID when a user deletes a program on the 'UnInstall or change a program.'
2016. 12. 23. 16:46
Binary-compatible C++ Interfaces
2016. 12. 23. 16:46 in link/language
Binary-compatible C++ Interfaces
// Window.h class Window { public: virtual void CALL destroy() = 0; virtual void CALL setTitle(const char* title) = 0; virtual const char* CALL getTitle() = 0; void operator delete(void* p) { if (p) { Window* w = static_cast<Window*>(p); w->destroy(); } } }; extern "C" Window* CALL CreateWindow(const char* title);
// Window.cpp #include <string> #include <windows.h> #include "DefaultDelete.h" class WindowImpl : public DefaultDelete<Window> { public: WindowImpl(HWND window) { m_window = window; } ~WindowImpl() { DestroyWindow(m_window); } void CALL destroy() { delete this; } void CALL setTitle(const char* title) { SetWindowText(m_window, title); } const char* CALL getTitle() { char title[512]; GetWindowText(m_window, title, 512); m_title = title; // save the title past the call return m_title.c_str(); } private: HWND window; std::string m_title; }; Window* CALL CreateWindow(const char* title) { // create the Win32 window object HWND window = ::CreateWindow(..., title, ...); return (window ? new WindowImpl(window) : 0); }// DefaultDelete.h
template<typename T> class DefaultDelete : public T { public: void operator delete(void* p) { ::operator delete(p); } };
2013. 10. 15. 18:18
DLL Inject
2013. 10. 15. 18:18 in link/window general
NtCreateThreadEx for Vista & Windwos7
http://securityxploded.com/ntcreatethreadex.php
method of DLL Injection
DLL Injection on Wow64
http://www.corsix.org/content/dll-injection-and-wow64
Example of using NtCreateThreadEx
http://noobys-journey.blogspot.kr/2010/11/injecting-shellcode-into-xpvista7.html
2013. 8. 1. 10:30
Allocating and freeing memory across module boundaries
2013. 8. 1. 10:30 in link/general
memory across module boundaries issue
http://blogs.msdn.com/b/oldnewthing/archive/2006/09/15/755966.aspx
DybObj - plugIn Objects( relate memory across module boundaries issue )
http://www.codeproject.com/Articles/20648/DynObj-C-Cross-Platform-Plugin-Objects
Binary-compatible c++ interface