GetProcAddress is a function in the Windows API for getting addresses of functions in dynamically loaded libraries
Questions tagged [getprocaddress]
106 questions
0
votes
1 answer
GetProcAddress does not find function in DLL
I have a DLL and I want to call a function in it. I check the DLL using Dependency Walker and the result I got is:
void U2U_Test(void)
This is the code that I wrote, but GetProcAddress() returns NULL:
typedef void(*U2U_Test_pointer)();
void …

Sasan
- 149
- 15
0
votes
0 answers
What is the "address" being returned from GetProcAddress()?
I'm a little bit confused with GetProcAddress().
Quoting the Win32 docs:
If the function succeeds, the return value is the address of the exported function or variable.
I know that for functions, GetProcAddress() returns a function pointer that…

itzjackyscode
- 970
- 9
- 27
0
votes
0 answers
Loading a C DLL with LoadLibrary into a C++ Application, Calling Convention Errors
I'm using Visual Studio 2019 with C++.
I'm trying to load a 32-bit DLL written in C code (not by me) into my C++ application. The dll is something called SDL_mixer.dll (an early version of it, SDL_mixer-1.2.12, which is required). I have to load…

John Alway
- 65
- 10
0
votes
0 answers
Accessing members of a structure from a DLL, loaded at runtime in C++
I have the following problem: At runtime I load a Matlab-generated DLL of a Simulink model, which contains structs for the outputs and inputs of the model and some methods.
Example of the generated structs and methods (the name of the model is…

lechrizzle
- 1
- 4
0
votes
0 answers
Calling C++ Function from a DLL via GetProcAddress is Not Passing the Correct Parameter Value
I have a DLL which I wrote using C++. I'm loading this DLL in another C++ (console) project during runtime by the use of LoadLibrary(), and then accessing the function within the DLL by GetProcAddress().
Here's the DLL code:
SHARED_CLASS string…

Ken
- 19
- 4
0
votes
2 answers
Python- GetProcAddress using ctypes returns NULL
Problem:
I am trying to get the address of LoadLibraryW but gets NULL.
Research effort:
The function successfully retrieves the kernel32.dll address that is mapped to the python process, but returns NULL for the LoadLibraryW address with 126 error…

shon
- 109
- 2
- 11
0
votes
1 answer
about exporting function methods from .net dll (C#)
math.dll
namespace math
{
public class MyClass {
public static int Add(int x, int y)
{
return x+y;
}
}
And in my exe project I want to use Add() function so,
Example 1 - This is working
public void…

Okan Kocyigit
- 13,203
- 18
- 70
- 129
0
votes
1 answer
How to release the resource allocated in GetProcAddress() while being used in C++?
I am loading the C++ DLL dynamically into the exe written in C++.
My requirement is
1) Loading the DLL dynamicaaly using LoadLibrary()
2) The calling the GetProcAddress more than few time to assign same function pointer as the functions get called…

Raj
- 151
- 1
- 14
0
votes
1 answer
Is there a reference for DLL function decorations in the lpProcName of GetProcAddress?
I am trying to understand and anticipate how to reference functions in a DLL.
When we reference some functions in a couple of DLLs that we are accessing to do some calculations, in some of the functions, we simply use the process name as the…

Cool-Dr-T
- 21
- 3
0
votes
3 answers
GetProcAddress an Class object without header file
It should be possible to get an class object from an dll without the corresponding dll header file!? But how can I make the typedef of the class for GetProcAddress without known type from header file?
Have you an example?!
Thanks and greets,
leon22

leon22
- 5,280
- 19
- 62
- 100
0
votes
1 answer
Persistent access error calling a function returned by GetProcAddress
Here is my code. It seems straighforward to do, but somehow it just isn't working.
The final call to the function always fails with an access error.
extern "C"
{
typedef const char* (*Init_fptr_t)();
HMODULE CMolNet::LoadDLL()
{
…
user236520
0
votes
3 answers
Getting a DLL class procedure address in Delphi
I have a DLL file from which I need the memory address of a class procedure. I am getting the handle to the DLL file, but when I use GetProcAddress, I can't get the address of the procedure. I have tried the following strings for the process name…

mnuzzo
- 3,529
- 4
- 26
- 29
0
votes
1 answer
Checking, at runtime, for existence of a function in a program
I am writing a program that is meant to be extended by some function definitions. One of the way of compiling the program is to create a single executable linking your code to the main code. The problem is: one of the function to define is optional…

PierreBdR
- 42,120
- 10
- 46
- 62
0
votes
0 answers
How does one explicitly load a DLL file that is ordinarily linked at compile time?
I have a library (PythonXX.dll) that I need to conditionally load at run-time. To support it, there are extensive include files and over a thousand calls to it.
The good news is that I probably only use about 20-30 of them, but it is still a pain…

Jiminion
- 5,080
- 1
- 31
- 54
0
votes
1 answer
How to use GetProcAddress with JNA?
First of all, i'm a JNA newbie. I would like to control my motherboard's LED lighting from java code. Asus provides an SDK for this purpose which is written in C (C++?).
Their header file looks simple:
#pragma once
#include
typedef…

Istvan
- 17
- 1
- 5