Click here to Skip to main content
15,896,435 members
Articles / Desktop Programming / Win32

Dynamic Libraries with Delayed Function Loading

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
27 Oct 2011Public Domain4 min read 24.7K   306   5  
This article explains how to create a dynamic library that loads exported functions the first time they are used, opposed to loading them when the library is loaded.
#include <stdio.h>
#include <windows.h>

void generate_proxy(const char *dll_name_sz);

int main(int argc, char *argv[])
{
	printf("Delayed Function Loading Example - PROXY DLL GENERATOR\n");

	generate_proxy("payload_dll.dll");

	return 0;
}

void generate_proxy(const char *dll_name_sz)
{
	printf(" Generating proxy for library %s.\n", dll_name_sz);

	// TODO: Put your own customizable proxy DLL generation code here.
	//       You should generate a list of all payload_dll functions
	//       and put them in exports.def and exports.inl following
	//       the formats of these files.
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Founder
Germany Germany
Software developer since April 2000.
Active in various areas, most notably C/C++ development with Windows platform, web development, scripting.
Coder by heart.
Interested in higher level software development techniques, abstractions, modeling, software factories.
Nuts and bolts guy.

Comments and Discussions