Post: [TuT] how to use ps3tmapi.dll in C++ [win32/CLR]
01-14-2014, 12:53 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hello ngu, ive noticed alot of people wanting to make ps3 RTE/RTM tools in c++.
so it took a lil to figer out imcsx's C++ connect/attach code( You must login or register to view this content. ) but i did and hese are the steps on how to[IMCSX's method]:

1: add my You must login or register to view this content. to the "header files"

2:make sure you have added imcsx's load lib function
    const WCHAR * dllName = L"ps3tmapi.dll";
HINSTANCE hlib = LoadLibrary(dllName);

also make sure you have
    #include <Windows.h>
in your main source file also add the ps3tmapi.dll into your debug folder

3:add this to the top of your main source file:
    #include "ps3mem.h"


4: add this void to your main source file
    void conect_n_attach()
{
typedef int (__cdecl *InitTargetCommsFunction)(void);
typedef int (__cdecl *ConnectFunction)(int,LPWSTR);
typedef int (__cdecl *ProcessListFunction)(int, UINT32*, UINT32*);
typedef int (__cdecl *ProcessAttachFunction)(int, UINT32 ,UINT32);
typedef int (__cdecl *ProcessContinueFunction) (int, UINT32);
typedef int (__cdecl *ProcessInfoFunction)(int, UINT32 ,UINT32*,SNPS3PROCESSINFO*);
InitTargetCommsFunction InitTargetComms = (InitTargetCommsFunction) GetProcAddress(hlib, "SNPS3InitTargetComms");
ConnectFunction Connect = (ConnectFunction) GetProcAddress(hlib, "SNPS3Connect");
ProcessListFunction ProcessList = (ProcessListFunction) GetProcAddress(hlib, "SNPS3ProcessList");
ProcessInfoFunction ProcessInfo = (ProcessInfoFunction) GetProcAddress(hlib, "SNPS3ProcessInfo");
ProcessAttachFunction ProcessAttach = (ProcessAttachFunction) GetProcAddress(hlib, "SNPS3ProcessAttach");
ProcessContinueFunction ProcessContinue = (ProcessContinueFunction) GetProcAddress(hlib,"SNPS3ProcessContinue");
InitTargetComms();
Connect(target,NULL);
ProcessList(target,&puCount,puProcessID);
ProcessAttach(target, 0,*puProcessID);
ProcessContinue(target, *puProcessID);
ProcessInfo(target,*puProcessID,&puBufferSize,pProcessInfo);
}


that should connect/attatch
step 5: next add
    void connect_n_attach();
to your main header (stdafx.h)
step 6: calling the function
     connect_n_attach(); 

and for CLR users you can download the .DLL i made You must login or register to view this content. or:
CLR Steps:
step 1: download my CLR ps3 header You must login or register to view this content. and put it in your "header files"
also have the ps3tmapi_net.dll in the source folder and debug folder

step 2: add this code to your main source file:
    #include "PS3mem_net.h"

step 3: call any of the functions that are in the class "PS3" in your main source
new method for win32 (thanks to aerosoul94 Smile )
step 1:
download the header i made You must login or register to view this content. and add it to your "header files"
step 2:
add this code to your main source file
    #include "SNPS3.h"


now you can calll the connect function:
    PS3::Connect(0);
Last edited by milky4444 ; 01-15-2014 at 10:52 PM.

The following 12 users say thank you to milky4444 for this useful post:

BaSs_HaXoR, Dan Dactyl, Gabberhard, ItsLollo1000, joni_djESP, Mxtivated, NickBeHaxing, John, Winter, Xx_GANG_xX
01-14-2014, 12:22 PM #2
Mango_Knife
In my man cave
Nice TuT :yes:
01-14-2014, 05:57 PM #3
Originally posted by Knife View Post
Nice TuT :yes:


tanx Smile
01-14-2014, 07:45 PM #4
aerosoul94
smooth like butter
As I had said in IMCSx's thread...:
"lol. You don't need to do all that to use the dll in c++. Use the header files in sdk\include and lib file in sdk\libs. That's what they're for..."

The following 4 users say thank you to aerosoul94 for this useful post:

BaSs_HaXoR, milky4444, MrSpliiffy,
01-14-2014, 09:52 PM #5
Originally posted by aerosoul94 View Post
As I had said in IMCSx's thread...:
"lol. You don't need to do all that to use the dll in c++. Use the header files in sdk\include and lib file in sdk\libs. That's what they're for..."


#using <ps3tmapi_net.dll>
PS3TMAPI^ pInstance = gcnew PS3TMAPI();

thats the code i use for CLR, i dont rly know how to us #using <> in win32
01-15-2014, 08:23 AM #6
Great post. Btw, thanks for your help on this bro Smile
01-15-2014, 08:45 PM #7
aerosoul94
smooth like butter
Originally posted by milky4444 View Post
#using <ps3tmapi_net.dll>
PS3TMAPI^ pInstance = gcnew PS3TMAPI();

thats the code i use for CLR, i dont rly know how to us #using <> in win32


You can either add the .lib to Input>Linker>Additional Dependencies in Project Properties or do:
    #pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")


Then just #include <directory/of/this/lib/PS3TMAPI.h>. After that you can use ALL functions.
01-15-2014, 09:11 PM #8
Originally posted by aerosoul94 View Post
You can either add the .lib to Input>Linker>Additional Dependencies in Project Properties or do:
    #pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")


Then just #include <directory/of/this/lib/PS3TMAPI.h>. After that you can use ALL functions.


o ok thanks il update the thread in a lil with some new code
01-16-2014, 05:24 PM #9
ItsLollo1000
Little One
Originally posted by aerosoul94 View Post
You can either add the .lib to Input>Linker>Additional Dependencies in Project Properties or do:
    #pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")


Then just #include <directory/of/this/lib/PS3TMAPI.h>. After that you can use ALL functions.


aerosoul for me this dosnt work in Qt. Any help?
01-16-2014, 06:00 PM #10
Originally posted by ItsLollo1000 View Post
aerosoul for me this dosnt work in Qt. Any help?

the new method? dnt work?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo