GetProcAddress is a function in the Windows API for getting addresses of functions in dynamically loaded libraries
Questions tagged [getprocaddress]
106 questions
2
votes
1 answer
Using GetProcAddress and EasyHook to hook class methods and constructors
I've had plenty of success using EasyHook to hook system API routines (in C++) out of libraries. These libraries have always been flat and basically filled with globally callable routines. Here is a small sample using MessageBeep() out of the…

Ultratrunks
- 2,464
- 5
- 28
- 48
2
votes
5 answers
Casting GetProcAddress returned pointer in C++
GetProcAddress returns a function pointer.
Lets suppose we get the address of the function Beep ( its declaration can be found at WinBase.h (when including Windows.h))
BOOL WINAPI Beep(
_In_ DWORD dwFreq,
_In_ DWORD dwDuration
);
then the…

Pat
- 2,670
- 18
- 27
2
votes
1 answer
Calling any dll function based on variable arguments
I have the following items in a structure:
- Dll name (absolute/relative path)
- Function name in the dll
- number of parameters
- Array of parameter types and values
With this information, I need to load the dll and call the function.
To load the…

Karthick
- 275
- 1
- 4
- 14
2
votes
1 answer
Function pointer to multiple argument C++11 std::function: Templating GetProcAddress
I am trying to return a function instance from a FARPROC address given by another function that calls GetProcAddress. Came up with an interesting issue. Here's the function:
template
std::function to_function(FARPROC address) {
…

austere
- 157
- 7
2
votes
2 answers
Make a VB-dll and load it in C++ application
I have a problem I've been struggeling with for a full week now, and I'm not able to solve it by myself. I've been googeling, and searching in all kind of forums... I have found lots of "this might work", tried it, but no, no success. If anyone have…

Sara H
- 71
- 1
- 7
1
vote
3 answers
Undeclared identifier 'GetProcAddress' in a FireMonkey Application
I am trying to make a plugin system all by using Delphi XE2 via the Firemonkey framework. The issue is that I am getting the error GetProcAddress is undeclared identifier. When I attempt to use GetProcAddress in a VCL project everything works fine,…

user1274162
- 11
- 2
1
vote
1 answer
ASM: LoadLibrary & GetProcAddress
I am using ASM first time ever and before i continue i need to know if i understood everything right when i wrote this. The current code looks like this:
push 0xDEADBEEF ; address of library name
mov eax, 0xDEADBEEF ; address of…

thatoneguy
- 45
- 1
- 3
1
vote
2 answers
GetProcAddress doesn't work for functions other than void
I have a problem with GetProcAddress:
I wrote a simple DLL with just one function in it:
extern "C" LRESULT WINAPI Function(HWND Hwnd, UINT Message,
WPARAM wParam, LPARAM lParam)
{
Beep(1000, 1000);
return…

dllloader
- 11
- 1
- 2
1
vote
1 answer
Win32 equivalent of dlopen(NULL, ...)
Is there a simple equivalent to dlopen(NULL, ...) on Windows?
The behavior on POSIX (or at least Linux) is: the returned handle can be used to find exported symbols on the executable as well as on dependent shared objects. To put simply,…

Jarhmander
- 344
- 5
- 19
1
vote
2 answers
STATUS_STACK_BUFFER_OVERRUN with LoadLibrary
When I load iphlpapi.dll with LoadLibrary my stack buffer overrun! How can I solve
this problem?!
typedef DWORD (*GetExtendedTcpTable)(PVOID, PDWORD, BOOL, ULONG, TCP_TABLE_CLASS, ULONG);
GetExtendedTcpTable _GetExtendedTcpTable;
// load…

leon22
- 5,280
- 19
- 62
- 100
1
vote
2 answers
How to find the proc name for `GetProcAddress` function using WinDbg
I want to use GetProcAddress to get some functions addresses inside a loaded DLL. I run some attempts on PSAPI library and I can see the the expected proc name is not identical to the symbol names I find with WinDbg x statements. For example, I look…

benams
- 4,308
- 9
- 32
- 74
1
vote
3 answers
How to dynamically define member functions in C++
I have this object what is just a wrapper around an external dll, in Windows. On creation of the object, the constructor queries the registry for the key, then queries this key's value for the folder with the dll, then loads the dll, gets the…

Nelson Vides
- 443
- 4
- 11
1
vote
1 answer
how call dll export function in vb6?
how can call dll export faunction in vb6?
CallWindowProc have limtied in paramet.
in example how call this fanction ?
Dim lb As Long, pa As Long
lb = LoadLibrary("wininet.dll")
pa = GetProcAddress(lb, "InternetOpen")

user2522767
- 11
- 5
1
vote
1 answer
Invoking GetProcAddress resulting procedure reports ERROR_FILE_NOT_FOUND
I am accessing a c++ dll library (I don't have the source code) from c++ code. I use this library to mount a usb device so I can access the files on the device. This code worked well in VS2010 but since we updated to VS2013 it no longer works. …

Steve E
- 11
- 3
1
vote
1 answer
Calling GetProcAddress from VBA always returns null
I have 64 bit windows 10 with MS Office 64 bit.
I am trying to get the VBA for Powerpoint to load and execute a function in a self-written 64 bit windows DLL.
To prevent export name mangling I have used extern C:
extern "C" {
…

Jon Anthony
- 77
- 1
- 10