Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<windows.h>
- #include<stdlib.h>
- #include <conio.h>
- using namespace std;
- int main()
- {
- long a = 2, b = 3;
- typedef long (_stdcall *controdiachi) (long, long);
- HINSTANCE thuvien;
- thuvien = LoadLibrary(TEXT("Dll.dll"));
- controdiachi Tich2so;
- if (thuvien == NULL)
- {
- cout<<"loi khong load duoc thu vien";
- getch();
- return 0;
- }
- Tich2so = (controdiachi)GetProcAddress(thuvien, "Tich2so");
- if (Tich2so == NULL)
- {
- cout<<"loi khong goi duoc ham";
- getch();
- return 0;
- }
- cout<<Tich2so(a,b);
- FreeLibrary(thuvien);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement