Guest User

Untitled

a guest
Dec 15th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <windows.h>
  2. #include <stdio.h>
  3.  
  4. typedef void (WINAPI *PRUNDLL)(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow);
  5.  
  6. int main()
  7. {
  8. HINSTANCE hinstLib;
  9. PRUNDLL pRunDll;
  10.  
  11. hinstLib = LoadLibrary(TEXT("shell32.dll"));
  12.  
  13. if (NULL != hinstLib)
  14. {
  15. pRunDll = (PRUNDLL)GetProcAddress(hinstLib, "Control_RunDLLW");
  16. if (NULL != pRunDll)
  17. {
  18. pRunDll(0, 0, L"Testing 1 2 3", SW_SHOW);
  19. }
  20. else
  21. {
  22. printf("ERROR: couldn't find function\n");
  23. }
  24. }
  25. else
  26. {
  27. printf("ERROR: couldn't load shell32.dll\n");
  28. }
  29.  
  30. return 0;
  31. }
Add Comment
Please, Sign In to add comment