Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1.  
  2. #include<windows.h>
  3. #include<stdio.h>
  4. #include<conio.h>
  5. #include<iostream>
  6.  
  7. #import "ClassLibrary1.tlb" no_namespace
  8.  
  9. int main() {
  10. HRESULT rv;
  11. CoInitializeEx(NULL, COINIT_MULTITHREADED);
  12. printf("starting\n");
  13. IStos *k;
  14.  
  15. rv = CoCreateInstance(__uuidof(Stos), NULL, CLSCTX_INPROC_SERVER, __uuidof(IStos), (void **)&k);
  16.  
  17.  
  18. std::cout << k->Add(1, 2);
  19.  
  20. k->Release();
  21.  
  22. printf("done\n");
  23. CoUninitialize();
  24. return 0;
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement