| |

VerySource

 Forgot password?
 Register
Search
View: 877|Reply: 3

Can I call hook functions with C ++?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-1 19:40:01
| Show all posts |Read mode
I wrote a hook function to handle the keyboard, and then packaged it into a dll file

No problem with engineering test with mfc
However, create a c ++ project (nothing, only cpp files and .h files)

Write a main function, add the dll to the project, try to call it, no
Everyone who has used it this way to explain, is it necessary to set the hook function to use the Windows link library? ? ?
Reply

Use magic Report

2

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-3-22 15:45:01
| Show all posts
Change it in the project settings. The default is Not using MFC. It should be fine to use MFC dynamically or statically. Of course, you must add the corresponding header files.
Reply

Use magic Report

2

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-3-22 17:00:01
| Show all posts
Such as <AFX.H>
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-24 21:15:01
| Show all posts
Is your DLL using MFC?
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