GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HW140701/DynamicModuleLoader: Load dynamic libraries on Windows and Linux platforms(Windows/Linux加载动态库封装类)

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
DynamicModuleLoader.cpp
DynamicModuleLoader.cpp
 
 
DynamicModuleLoader.h
DynamicModuleLoader.h
 
 
README.md
README.md
 
 

Repository files navigation

1 DynamicModuleLoader

DynamicModuleLoader is a C++ class that can load dynamic libraries on Windows and Linux platforms.

2 How to Use

#include<iostream>

#include "DynamicModuleLoder.h"
typedef int(*Func_Add)(int,int);

int main()
{
	DynamicModuleLoder dllLoader;
	if (dllLoader.LoadDynamicModule("add.dll"))
	{
		void* voidTest = dllLoader.GetFunction("Add");
		if (voidTest != NULL)
		{
			Func_Add f_add = (Func_Add )(voidTest );
			int ret = f_add(1,2);
			std::cout << ret << std::endl;
		}
		else
		{
			std::cout << dllLoader.GetErrorMessage() << std::endl;
		}
	}
	else
	{
		std::cout << dllLoader.GetErrorMessage() << std::endl;
	}
	dllLoader.UnloadDynamicModule();
	getchar();

	return 0;
}

About

Load dynamic libraries on Windows and Linux platforms(Windows/Linux加载动态库封装类)

Topics

dynamic-moduleloader

Resources

Readme
Activity

Stars

6 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.