Advertisement
Guest User

Untitled

a guest
Apr 26th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3.  
  4. int main()
  5. {
  6.     std::cout << "Alala!" << std::endl;
  7.  
  8.     try
  9.     {
  10.         throw 1;
  11.     }
  12.     catch(...)
  13.     {
  14.         MessageBox(0,0,0,0);
  15.     }
  16.  
  17.     try
  18.     {
  19.         throw std::runtime_error("Test exception");
  20.     }
  21.     catch(const std::exception& e)
  22.     {
  23.         std::cout << e.what() << std::endl;
  24.     }
  25.  
  26.     HMODULE dll = LoadLibrary(L"dll.dll");
  27.     typedef int (__stdcall* testfunc)(const char* text);
  28.     testfunc testfunc_func;
  29.     testfunc_func = (testfunc)GetProcAddress(dll, "testfunc");
  30.  
  31.     testfunc_func("TEST!!!");
  32.  
  33.     Sleep(5000);
  34.  
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement