const WCHAR * dllName = L"ps3tmapi.dll";
HINSTANCE hlib = LoadLibrary(dllName);
#include <Windows.h>
in your main source file also add the ps3tmapi.dll into your debug folder
#include "ps3mem.h"
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);
}
void connect_n_attach();
to your main header (stdafx.h)
connect_n_attach();
#include "PS3mem_net.h"
#include "SNPS3.h"
PS3::Connect(0);
#pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")
#pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")
#pragma comment(lib, "directory/of/this/lib/PS3TMAPI.lib")
Copyright © 2024, NextGenUpdate.
All Rights Reserved.