| |

VerySource

 Forgot password?
 Register
Search
View: 746|Reply: 4

Ask a programming question about the .dll dynamic link library

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-2 23:40:01
| Show all posts |Read mode
I want a program to dynamically load the dll files I wrote. For example, I have several .dll files that implement the same interface through different methods. They can be replaced with each other. Suppose they are called a1.dll, a2. dll, a3.dll ... I hope that users can select the .dll files they need to use during the use of my program. How to change it?
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-3 10:15:01
| Show all posts
Ask for help
Reply

Use magic Report

0

Threads

57

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-3 11:15:01
| Show all posts
Dynamic loading function pointer
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-9 14:18:01
| Show all posts
Positive solution upstairs using LoadLibrary function
Reply

Use magic Report

0

Threads

10

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-9 18:09:01
| Show all posts
Load all three libraries with loadlibrary,
Then see which library function to execute, and use GetProcAdress to pass in the handles of the three libraries. . .

If you want to achieve complete automation, I am afraid it is impossible, after all, it is not a C ++ virtual function. . .
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list