GetProcAddress is a function in the Windows API for getting addresses of functions in dynamically loaded libraries
Questions tagged [getprocaddress]
106 questions
1
vote
2 answers
GetProcAddress function returning NULL
I tried to load C++ dll dynamically, first I loaded the dll using "LoadLibrary" function and it is getting its handle correctly. After that I tried to get the function pointer of DLL file function using "GetProcAddress", it is returning NULL. Please…

sivanesan1
- 779
- 4
- 20
- 44
1
vote
1 answer
Dynamic calling member method c++
I know this has been discussed a few times, but my situation is a bit different.
I have a third-party dll exporting some classes. Unfortunately, the header file is not available.
It is still possible to call exported functions. But I cannot get…

Jurys
- 46
- 4
1
vote
2 answers
Using GetProcAddress when the name might be decorated
What is the correct way to use GetProcAddress() on a 32 bit DLL? On win32, there are three calling conventions, cdecl, stdcall and fastcall. If the function in the DLL is foo they will decorate the name in the following ways _foo, _foo@N and @foo@N.…

Björn Lindqvist
- 19,221
- 20
- 87
- 122
1
vote
1 answer
How can I use GetProcAddress() to load functions with unlimited function arguments?
I had browsed internet, but hadn't found an answer.
Previously we used static linking using def file.
Currently this approach is not suitable, because there are cases when dll is not accessible.
So now we need to load dynamically function with…

SunFlower
- 53
- 5
1
vote
0 answers
Using a VCL dll in a firemonkey application
Is it possible to use VCL dll in a firemonkey application?
I am trying to dynamically link a VCL dll to my firemonkey app.
The GetProcAddress returns NULL;
Could this be due to incompatability btw the two frameworks?
Is there any particular code i…

user3460812
- 19
- 3
1
vote
1 answer
Does hooking GetProcAddress lead to stack corruption?
I am reverse engineering this program. Before I start, I would like to make it clear I own the program legally and do not plan to "crack" it for the purpose of redistribution.
Said program makes use quite a lot of antidebug techniques "from the…

farmdve
- 786
- 3
- 13
- 26
1
vote
1 answer
Not finding function using GetProcAddress() C++ VBexpress 13
Okay so I'm coming dangerously close to a repost here but my situation is a little bit different than the numerous other posters about this function. I am interfacing with a DLL that was written way back in the day and all I have is the file. I…

m25
- 1,473
- 2
- 13
- 14
1
vote
1 answer
Access violation reading location when accessing a dll method
I am using the following code to access a method in the dll file and I am getting an Access violation reading location 0x41100000 when calling the method from the dll method.
The method that I am trying to access is of the following prototype
int…

MistyD
- 16,373
- 40
- 138
- 240
1
vote
0 answers
Need an unmanaged C++ function which can generically invoke many unmanaged DLLs and their functions on behalf of the caller
In unmanaged C++ code on a 32-bit or 64-bit platform, suppose I want to provide an API function called CallDLLFunction which will invoke a DLL function on behalf of its caller. This API function will have these parameters to work…

Darrin
- 317
- 1
- 4
- 10
1
vote
3 answers
Calling WinSock functions using LoadLibrary and GetProcAddress
Basically I have a header file like this:
#if WIN32
typedef DWORD (WSAAPI *SocketStartup) (WORD wVersionRequested, LPWSADATA lpWSAData);
typedef SOCKET (WINAPI *MakeSocket)(IN int af, IN int type, IN int protocol, IN LPWSAPROTOCOL_INFOW…

Christopher Tarquini
- 11,176
- 16
- 55
- 73
1
vote
1 answer
similar function of getprocaddress to use a struct?
I have a DLL from a game I'm importing into a windows32 application, I've successfully loaded it and have called quite a few functions. However I'm facing a problem with a certain function I need to use needs a structure passed to it.
It seems when…

TrueAlias
- 11
- 1
1
vote
4 answers
Quick one: GetProcAddress of Struct member?
Let's say I have the following definition of a struct in a DLL:
typedef struct {
double varOne;
double varTwo;
} structOne;
structOne myStruct;
It is then possible to do the following from the main application which loads the…

Stonegoat
- 73
- 5
0
votes
2 answers
getprocaddress acting different from a dll and an exe
I'm trying get the address of GetProcAddress with GetProcAddress (yes. calling it on itself).
When I'm doing it from an empty exe project I get a valid address (between the allocated address of kernel32).
When I'm calling it from a dll, I'm getting…

Eran Shorer
- 21
- 5
0
votes
4 answers
Regarding GetProcAddress
I have got MyDll.dll and its function defined as below
void pascal Myfunction(BOOL);
when I'm trying to use the function in another project i am unable get the address of the function with GetProcAddress(). Here is my code:
void callMyDll()
{
…

srinivasporam
- 1
- 1
- 7
0
votes
0 answers
Couldn't get the address of internal CRT functions exported from the msvcrt.dll
I am currently working on a personal project: a 32 bits PE loader.
I did a lot of research and followed some very interesting tutorials such as…

Antoine Hazebrouck
- 41
- 2
- 8