BaSs_HaXoR

Native Win32/CLR RTE Programming

Jul 7th, 2014
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.61 KB | None | 0 0
  1. /*Native C++ Win32 RTE programming:
  2. Credits: Milky444
  3.  
  4. 1: add my http://adf.ly/rt6AY ps3mem.h to the "header files"
  5.  
  6. 2:make sure you have added imcsx's load lib function:
  7.  
  8. */const WCHAR * dllName = L"ps3tmapi.dll";
  9. HINSTANCE hlib = LoadLibrary(dllName);
  10. /*also make sure you have #include <Windows.h> in your main source file also add the ps3tmapi.dll into your debug folder
  11.  
  12. 3:add this to the top of your main source file: #include "ps3mem.h"
  13.  
  14. 4: add this void to your main source file*/
  15. void conect_n_attach()
  16. {
  17.     typedef int (__cdecl *InitTargetCommsFunction)(void);
  18.     typedef int (__cdecl *ConnectFunction)(int,LPWSTR);
  19.     typedef int (__cdecl *ProcessListFunction)(int, UINT32*, UINT32*);
  20.     typedef int (__cdecl *ProcessAttachFunction)(int, UINT32 ,UINT32);
  21.     typedef int (__cdecl *ProcessContinueFunction) (int, UINT32);
  22.     typedef int (__cdecl *ProcessInfoFunction)(int, UINT32 ,UINT32*,SNPS3PROCESSINFO*);
  23.     InitTargetCommsFunction InitTargetComms = (InitTargetCommsFunction) GetProcAddress(hlib, "SNPS3InitTargetComms");
  24.     ConnectFunction Connect = (ConnectFunction) GetProcAddress(hlib, "SNPS3Connect");
  25.     ProcessListFunction ProcessList = (ProcessListFunction) GetProcAddress(hlib, "SNPS3ProcessList");
  26.     ProcessInfoFunction ProcessInfo = (ProcessInfoFunction) GetProcAddress(hlib, "SNPS3ProcessInfo");
  27.     ProcessAttachFunction ProcessAttach = (ProcessAttachFunction) GetProcAddress(hlib, "SNPS3ProcessAttach");
  28.     ProcessContinueFunction ProcessContinue = (ProcessContinueFunction) GetProcAddress(hlib,"SNPS3ProcessContinue");
  29.     InitTargetComms();
  30.     Connect(target,NULL);
  31.     ProcessList(target,&puCount,puProcessID);
  32.     ProcessAttach(target, 0,*puProcessID);
  33.     ProcessContinue(target, *puProcessID);
  34.     ProcessInfo(target,*puProcessID,&puBufferSize,pProcessInfo);
  35. }
  36.  
  37. /*that should connect/attach
  38. step 5: next add void connect_n_attach(); to your main header (stdafx.h)
  39. step 6: calling the function  connect_n_attach();
  40. and for CLR users you can download the .DLL i made http://adf.ly/rt6Cg here or:
  41. CLR Steps:
  42. step 1: download my CLR ps3 header http://adf.ly/rt6DG and put it in your "header files"
  43. also have the ps3tmapi_net.dll in the source folder and debug folder
  44.  
  45. step 2: add this code to your main source file:#include "PS3mem_net.h"
  46. step 3: call any of the functions that are in the class "PS3" in your main source
  47. new method for win32 (thanks to aerosoul94 :) )
  48. step 1:
  49. download the header i made http://adf.ly/rt6EC"] and add it to your "header files"
  50. step 2:
  51. add this code to your main source file*/ #include "SNPS3.h"
  52.  
  53. /*now you can call the connect function:*/ PS3::Connect(0);
Add Comment
Please, Sign In to add comment