Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <Windows.h>
  3. extern "C" void hello(); //THIS IS OK
  4. class vector4
  5. {
  6. public:
  7. vector4(){hello();}
  8. extern "C" void asm_proc(); //HERE IT THROWS AN ERROR
  9. };
  10.  
  11. int _tmain(int argc, _TCHAR* argv[])
  12. {
  13. hello();
  14. char buffer[256];
  15. vector4 vv;
  16. vv.asm_proc();
  17. int x=10+2;
  18. return 0;
  19. }
  20.  
  21. .code
  22. hello proc
  23. mov rax,234
  24. add rax,10
  25. ret
  26. hello endp
  27. asm_proc proc
  28. mov rax,0
  29. ret
  30. asm_proc endp
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement