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
05-01-2014, 11:21 AM #29
GMTPS3
Do a barrel roll!
Was meinst du mit "mingw"?
10-12-2023, 01:26 PM #30
Originally posted by milky4444 View Post

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo