Advertisement
BaSs_HaXoR

How to CONNECT and ATTACH to PS3 VB

Aug 13th, 2014
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.55 KB | None | 0 0
  1. 'This is a tutorial how to connect and attach, and setmemory in VB.
  2. 'IMPORT your libraries needed...
  3.  
  4. 'Make sure you have this in your project
  5. '
  6. 'using System;
  7. 'using System.Collections.Generic;
  8. 'using System.ComponentModel;
  9. 'using System.Data;
  10. 'using System.Drawing;
  11. 'using System.Linq;
  12. 'using System.Text;
  13. 'using System.Threading.Tasks;
  14. 'using System.Windows.Forms;
  15. 'using System.IO;
  16. 'using System.Reflection;
  17. 'using System.Management;
  18. '
  19. '
  20.  
  21. Imports PS3Lib 'Makes PS3Lib available... Also make sure to add it to references!!
  22. Partial Public Class Form1
  23.     Inherits Form
  24.  
  25.         Public Sub New()
  26.             InitializeComponent()
  27.         End Sub
  28.  
  29. Public PS3 As New PS3Lib.PS3API(PS3Lib.SelectAPI.ControlConsole) 'Sets Current API to Control Console
  30.  
  31. 'Make a label, and name it "connectionlabel" (without quotes)
  32. 'Make 2 radiobuttons.
  33.  
  34. 'Your two radio buttons should look like this:
  35.  
  36. Private Sub radioButton1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
  37.             PS3.ChangeAPI(PS3Lib.SelectAPI.ControlConsole)
  38. End Sub
  39.  
  40.         Private Sub radioButton2_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
  41.             PS3.ChangeAPI(PS3Lib.SelectAPI.TargetManager)
  42.         End Sub
  43. 'Put the text on radio button1 as "CEX"
  44. 'Put the text on radio button2 as "DEX"
  45.  
  46.  
  47.  
  48.  Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
  49.             Dim API As String = PS3.GetCurrentAPIName() 'This will get your current API... Whether its Control Console or TMAPI
  50.             If API = "Control Console" Then
  51. 'Make a textbox & name it "ipaddress" (without quotes)
  52.                 If Convert.ToBoolean(PS3.ConnectTarget(ipaddress.Text)) = True Then
  53.                     PS3.AttachProcess()
  54.                     PS3.CCAPI.RingBuzzer(PS3Lib.CCAPI.BuzzerMode.Single)
  55.                     PS3.CCAPI.Notify(PS3Lib.CCAPI.NotifyIcon.FRIEND, "Connected and attached!")
  56.                     connectionlabel.Text = "Connected and Attached."
  57.                     connectionlabel.ForeColor = Color.Black
  58.                 Else
  59.                     connectionlabel.Text = "Failed to Connect and Attach!"
  60.                     connectionlabel.ForeColor = Color.Red
  61.                 End If
  62.             Else
  63.                 If Convert.ToBoolean(PS3.ConnectTarget()) = True Then 'This is for DEX to connect & attach
  64.                     PS3.AttachProcess()
  65.                     connectionlabel.Text = "Connected and Attached."
  66.                     connectionlabel.ForeColor = Color.Black
  67.                 Else
  68.                     connectionlabel.Text = "Failed to Connect and Attach!"
  69.                     connectionlabel.ForeColor = Color.Red
  70.                 End If
  71.             End If
  72.  End Sub
  73.  
  74. Private Sub button5_Click(ByVal sender As Object, ByVal e As EventArgs)
  75.         PS3.SetMemory(&H0, &H0)
  76.         'MW3 name example
  77.         PS3.Extension.WriteString(&H1BBBC2C, "^2BaSs^5_^2HaXoR")
  78. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement