(adsbygoogle = window.adsbygoogle || []).push({});
C++ TUT
FIRST : A big thx to -> milky4444 for teaching me the basics
First of all open Visual Studio go on "MFC" and open a new "MFC-Application"
[ATTACH=CONFIG]30687[/ATTACH][ATTACH=CONFIG]30687[/ATTACH]
No do this:
(i know its german but it equals the english design)
[ATTACH=CONFIG]30687[/ATTACH][ATTACH=CONFIG]30687[/ATTACH]
And press Finish
2.)
Now we have to load the libs
Navigate to "stdafx.h" -> its a Header file an write this code
#pragma comment(lib,"C:\\Program Files (x86)\\SN Systems\\PS3\\sdk\\lib\\PS3TMAPI.lib")
#pragma comment(lib,"C:\\Program Files (x86)\\SN Systems\\PS3\\sdk\\lib\\PS3TMAPIx64.lib")
once we loaded the library we have to add the Header files from tmapi..
just drag drop all These Header files into the Project where all the Header files are
C:\Program Files (x86)\SN Systems\PS3\sdk\include\
[ATTACH=CONFIG]30688[/ATTACH]
NOTE: You also have to copy it into your poject
so lets start
move to the resources and double click on "MFCApplication1.rc"
a windo left will open and double click on the "IDC_MAINFORM"
now the designer will shown now we can add contol add to Buttons and chang the text to "Connect and attach"
Property->Caption
once we done that double click on the button ..
FIRST : we have to include the ps3tmapi.h so run the form and then
#include "ps3tmapi.h"
now we can code ..
NOTE: milk said that you Need for every game a processID
you find it in the debuggr when you are attached..
but i think you just cann do
"UINT uProcessID;"
like in c#
anyway in mw3 i found the processID : 0x17236480
and we Need a Default target so we write
#define target SNPS3_DEFAULT_TARGET
now double click on he button and wrie
Connect & Attach :
SNPS3Connect(SNPS3_DEFAULT_TARGET, NULL);
SNPS3ProcessAttach(SNPS3_DEFAULT_TARGET, 0, uProcessID);
SNPS3ProcessContinue(target, uProcessID);
SetMemory:
//Example : Offset = 0x45786
BYTE num[4] = {0xFF,0xC0,0xF5,0x45};
SNPS3ProcessSetMemory(target, 0, uProcessID, 0, 0x45786, 4, (const BYTE*)num);
GetMemory:
//Example : OFsse = 0x458665
BYTE* num;
SNPS3ProcessGetMemory(SNPS3_DEFAULT_TARGET, 0, uProcessID, 0, 0x458665, 4, num);
Some Basics:
MessageBox: CWnd::MessageBox(L"Hello");
or to get a text from a TextBox you have to get the item I
CWnd* pWnd = GetDlgItem(IDC_EDIT2);//IDC_EDIT2 i a textbox
CString _w;
pWnd->GetWindowText(_w);
so i am learning it and if I m wrong please correct me and dont hate
its just for People who want to start with Basics or want to see how c++ is 
Credis:
milky4444