Module: Windows::Library
- Defined in:
- lib/windows/library.rb
Constant Summary collapse
- DLL_PROCESS_DETACH =
0- DLL_PROCESS_ATTACH =
1- DLL_THREAD_ATTACH =
2- DLL_THREAD_DETACH =
3- GET_MODULE_HANDLE_EX_FLAG_PIN =
1- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT =
2- GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS =
4- DONT_RESOLVE_DLL_REFERENCES =
0x00000001- LOAD_LIBRARY_AS_DATAFILE =
0x00000002- LOAD_WITH_ALTERED_SEARCH_PATH =
0x00000008- LOAD_IGNORE_CODE_AUTHZ_LEVEL =
0x00000010- DisableThreadLibraryCalls =
Win32API.new('kernel32', 'DisableThreadLibraryCalls', 'L', 'I')
- FreeLibrary =
Win32API.new('kernel32', 'FreeLibrary', 'L', 'I')
- FreeLibraryAndExitThread =
Win32API.new('kernel32', 'FreeLibraryAndExitThread', 'LL', 'V')
- GetModuleFileName =
Win32API.new('kernel32', 'GetModuleFileName', 'LPL', 'L')
- GetModuleHandle =
Win32API.new('kernel32', 'GetModuleHandle', 'P', 'L')
- GetProcAddress =
Win32API.new('kernel32', 'GetProcAddress', 'LP', 'L')
- LoadLibrary =
Win32API.new('kernel32', 'LoadLibrary', 'P', 'L')
- LoadLibraryEx =
Win32API.new('kernel32', 'LoadLibraryEx', 'PLL', 'L')
- LoadModule =
Win32API.new('kernel32', 'LoadModule', 'PP', 'L')
Instance Method Summary collapse
- #DisableThreadLibraryCalls(hmodule) ⇒ Object
- #FreeLibrary(hmodule) ⇒ Object
- #GetModuleFileName(hmodule, file, size) ⇒ Object
- #GetModuleHandle(module_name) ⇒ Object
- #GetProcAddress(hmodule, proc_name) ⇒ Object
- #LoadLibrary(library) ⇒ Object
- #LoadLibraryEx(library, file, flags) ⇒ Object
- #LoadModule(hmodule, param_block) ⇒ Object
Instance Method Details
#DisableThreadLibraryCalls(hmodule) ⇒ Object
39 40 41 |
# File 'lib/windows/library.rb', line 39 def DisableThreadLibraryCalls(hmodule) DisableThreadLibraryCalls.call(hmodule) != 0 end |
#FreeLibrary(hmodule) ⇒ Object
43 44 45 |
# File 'lib/windows/library.rb', line 43 def FreeLibrary(hmodule) FreeLibrary.call(hmodule) != 0 end |
#GetModuleFileName(hmodule, file, size) ⇒ Object
47 48 49 |
# File 'lib/windows/library.rb', line 47 def GetModuleFileName(hmodule, file, size) GetModuleFileName.call(hmodule, file, size) end |
#GetModuleHandle(module_name) ⇒ Object
51 52 53 |
# File 'lib/windows/library.rb', line 51 def GetModuleHandle(module_name) GetModuleHandle.call(module_name) end |
#GetProcAddress(hmodule, proc_name) ⇒ Object
55 56 57 |
# File 'lib/windows/library.rb', line 55 def GetProcAddress(hmodule, proc_name) GetProcAddress.call(hmodule, proc_name) end |
#LoadLibrary(library) ⇒ Object
59 60 61 |
# File 'lib/windows/library.rb', line 59 def LoadLibrary(library) LoadLibrary.call(library) end |
#LoadLibraryEx(library, file, flags) ⇒ Object
63 64 65 |
# File 'lib/windows/library.rb', line 63 def LoadLibraryEx(library, file, flags) LoadLibraryEx.call(library, file, flags) end |
#LoadModule(hmodule, param_block) ⇒ Object
67 68 69 |
# File 'lib/windows/library.rb', line 67 def LoadModule(hmodule, param_block) LoadModule.call(hmodule, param_block) end |