Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- int main()
- {
- std::cout << "Alala!" << std::endl;
- try
- {
- throw 1;
- }
- catch(...)
- {
- MessageBox(0,0,0,0);
- }
- try
- {
- throw std::runtime_error("Test exception");
- }
- catch(const std::exception& e)
- {
- std::cout << e.what() << std::endl;
- }
- HMODULE dll = LoadLibrary(L"dll.dll");
- typedef int (__stdcall* testfunc)(const char* text);
- testfunc testfunc_func;
- testfunc_func = (testfunc)GetProcAddress(dll, "testfunc");
- testfunc_func("TEST!!!");
- Sleep(5000);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement