GetProcAddress is a function in the Windows API for getting addresses of functions in dynamically loaded libraries
Questions tagged [getprocaddress]
106 questions
0
votes
2 answers
How does GetProcAddress work
I've done some googling but haven't really found much. How does GetProcAddress work? What goes on behind the scenes? Do the method names and their corresponding address get stored in meta data somewhere?

daniel
- 45
- 1
- 4
0
votes
0 answers
LoadLibrary and GetProcAddress on C++/CLI DLL - loaded twice
I have a .vcxproj with a C file that does the following:
extern long __stdcall CallCreateTube(long **Data)
{
char DllPath[256];
FARPROC pfn;
long rtn;
long *pData;
pData = *Data;
lstrcpy(DllName, progPath);
…

ryrich
- 2,164
- 16
- 24
0
votes
1 answer
getProcAddressW errors when use visual studio2005 and windows mobile SDK to debug windows CE project
I am using Visual Studio 2005 and Windows Mobile 6 Professional Device SDK to debug a Windows CE project (copied from a Windows project ). I use active sync to connect PC and Win CE device. Then I create a new Windows CE project (copied from Windows…

Heidi
- 161
- 5
- 16
0
votes
3 answers
GetProcAdress vs Linker
After doing some research on linking DLLs I came across two different methods for loading DLLs.
The first method was using the linker. I added the paths to the DLL's header(s) and the libraries and added to the linker options to link them. Then all…

Tracey T. Winton
- 32
- 2
0
votes
1 answer
Importing an Embarcadero C++ Builder XE3 DLL into Embarcadero C++ Builder XE3
I try to create a DLL in Embarcadero C++ Builder XE3, and use it in a test-project in the same environment.
I take example on a tutorial which code does not give a good result for me (!) :…

Arnaud
- 109
- 3
- 15
0
votes
1 answer
GetProcAddress fails for LoadIconWithScaleDown on Windows 7
I'm using the following code to dynamically link to the LoadIconWithScaleDown API, for my code to be able to run on Windows XP:
HRESULT (WINAPI *pfnLoadIconWithScaleDown)(HINSTANCE, PCWSTR, int, int, HICON *);
HMODULE hComCtrl32 =…

c00000fd
- 20,994
- 29
- 177
- 400
0
votes
2 answers
GetProcAddress undefined in minifilter programs
I 'm working on a minifilter project. How can I call GetProcAddress within a minifilter program? My compiler keeps telling me "GetProcAddress undefined assume extern returning int". According to msdn, I might need to include window.h. But if I do…

shoulianyu
- 21
- 2
0
votes
2 answers
GetProcAddress weird return address
Someone explain why the next code returns a pointer inside ntdll.dll?
GetProcAddress(LoadLibraryA("kernel32.dll"), "EncodePointer");
GetProcAddress(LoadLibraryA("kernel32.dll"), "DecodePointer");
PS: If call the function pointed by kernel32's…

greenboxal
- 469
- 3
- 16
-1
votes
2 answers
Failing to GetProcAddress
I'm having trouble with loading a DLL in my assignment project.
Here's the header file:
I have omitted code that works and is irrelevant to the problem. Basically, hinstLib is not NULL but when the line Filter = (FILTPTR) GetProcAddress(hinstLib,…

James
- 69
- 1
- 9
-1
votes
2 answers
Why does GetProcAddress not work with OutputDebugString function
I have been trying to use GetProcAddress with several functions from kernel32.dll. It worked fine, except with "OutputDebugString" function.
My code:
typedef void(WINAPI *LPGETNUMBER)(LPCTSTR);
int main() {
const LPGETNUMBER pAddr =…

ohad
- 7
- 6
-1
votes
1 answer
How to dynamically load every needed function
I'm trying to find a way to dynamically load every Windows API function I need to use. For example, to use a the printf function, I do something like:
#include
typedef int (*printfPtr)(const char *str, ...);
int main(){
HMODULE…

Luca Reccia
- 578
- 3
- 16
-1
votes
1 answer
C# program call C# dll
I want to use a C# exe to dynamically load dll that build by C# or C++, the C++ dll part is done, but C# dll not yet done because exe can not find the method in C# dll.
here is my C# dll code that will build a CSharp.dll:
namespace NamespaceName
{
…

DaveG
- 491
- 1
- 6
- 19
-1
votes
1 answer
Get function address from 64bit kernel32.dll using 32bit app
I have 32bit application that running on 64bit Windows (WOW64).
I need to know addresses of several WinAPI functions from kernel32.dll.
A can easily get address of functions in 32bit kernel32.dll: GetProcAddress works well.
But Windows provide…

Victor Mezrin
- 2,797
- 2
- 32
- 48
-2
votes
1 answer
How can I export a macro function and use it in a project .exe?
I have a dll project (Server.dll) containing a Server.cpp
Server.cpp
#include "pch.h"
#include "Server.hpp"
extern "C" {
_declspec(dllexport) int Server::Add(int a, int b)
{
return a + b;
}
}
#define Function( Y ) \
\
extern…

SADL
- 37
- 5
-3
votes
2 answers
Pass uint8_t* as parameter to raw function pointer
I have the problem where I want to pass a uint8_t[] array as a parameter to a function pointer defined as `typedef void (dangerousC)(void); Also, I'm using Windows API headers.
Assume the variable raw is a function pointer returned by…

block103
- 19
- 4