Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 8 - Modern Warfare 3 (MW3) Hacks & Cheats › Call of Duty Modern Warfare 3 Help › Visual Basic "Open" in class is not possible! Help!

ExclamationVisual Basic "Open" in class is not possible! Help!

Posts 1–11 of 11 · Page 1 of 1
NI
NitroSmily
Visual Basic "Open" in class is not possible! Help!
Hello, I'm making a hack now, but I couldn't write this in my class!

Error 1 'Open' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.


__________________________________________________ ____________________


This is My_Class:
Code:
Imports System****
Imports System.Text
Imports System.Runtime.InteropServices

Public Class My_Class
#Region "Basic Stuff"

    Dim ReadProcess As Process

    <DllImport("kernel32.dll")> _
    Private Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("kernel32.dll")> _
    Private Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function GetKeyState(ByVal virtualKeyCode As Keys) As Short
    End Function
    Private pHandel As IntPtr
    Public Function Process_Handle(ByVal ProcessName As String) As Boolean
        Try
            Dim ProcList As Process() = Process.GetProcessesByName(ProcessName)
            If ProcList.Length = 0 Then
                Return False
            Else
                pHandel = ProcList(0).Handle
                Return True
            End If
        Catch ex As Exception
            Console.Beep()
            Console.WriteLine("Process_Handle - " + ex.Message)
            Return False
        End Try
    End Function
    Private Function Read(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Dim Buffer As Byte() = New Byte(Length - 1) {}
        Dim Zero As IntPtr = IntPtr.Zero
        ReadProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        Return Buffer
    End Function
    Private Sub Write(ByVal Address As Integer, ByVal Value As Integer)
        Dim Buffer As Byte() = BitConverter.GetBytes(Value)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
#End Region

    'This is the part you want to edit
#Region "Write Functions (Integer & String)"
    Public Sub WriteInteger(ByVal Address As Integer, ByVal Value As Integer)
        Write(Address, Value)
    End Sub
    Public Sub WriteString(ByVal Address As Integer, ByVal Text As String)
        Dim Buffer As Byte() = New ASCIIEncoding().GetBytes(Text)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
    Public Sub WriteBytes(ByVal Address As Integer, ByVal Bytes As Byte())
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Bytes, CUInt(Bytes.Length), Zero)
    End Sub
    Public Sub WriteNOP(ByVal Address As Integer)
        Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90}
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
Public Function Hack(ByVal Application As String) As Boolean
        Dim pArray As Process() = Process.GetProcessesByName(Application)
        If pArray.Length = 0 Then
            Return True
        End If
        ReadProcess = pArray(0)
        Open()                        <----------------------------- Here is the problem
        Return False
    End Function

#End Region
#Region "Read Functions (Integer & String)"
    Public Function ReadInteger(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As Integer
        Return BitConverter.ToInt32(Read(Address, Length), 0)
    End Function
    Public Function ReadString(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As String
        Return New ASCIIEncoding().GetString(Read(Address, Length))
    End Function
    Public Function ReadBytes(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Return Read(Address, Length)
    End Function
#End Region
#Region "Extra"
    Public Function HotKey(ByVal Key As Keys) As Boolean
        Return Convert.ToBoolean(GetKeyState(Key))
    End Function
    Private Check_res As Boolean = True
    Public Function Check_Value(ByVal Value As String) As Integer
        For Each a As Char In Value
            If Char.IsNumber(a, 0) Then
                Check_res = True
            Else
                Check_res = False
                Return 0
                Exit For
            End If
        Next
        Return Convert.ToInt32(Value)
    End Function
#End Region

    Sub SetByte(ByVal p1 As Integer, ByVal p2 As Integer)
        Throw New NotImplementedException
    End Sub

    Sub SetByte(ByVal p1 As Integer, ByVal Accolades As Byte())
        Throw New NotImplementedException
    End Sub

End Class
__________________________________________________ ___________________________


Please if you can help me, reply
#1 · edited 13y ago · 13y ago
Horror
Horror
You might wanan highlight the error in the code ...
#2 · 13y ago
-InSaNe-[Backup]
-InSaNe-[Backup]
@Nachos This belongs to the Coding Section

Use [code] tags for gods sake... Also, I don't know VB.. but I think the error says that you've to Import Microsoft.VisualBasic to use the Open() Method...
#3 · 13y ago
Horror
Horror
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System****;
using System.Threading;
These are the ones i use (they include starting and stopping a process) so it should work ... Not sure doh
#4 · 13y ago
Jorndel
Jorndel
Well, you maybe want to use this class instead:
http://www.mpgh.net/forum/604-call-d...n-jorndel.html
#5 · 13y ago
NI
NitroSmily
Didn't work
Still can't Open()

---------- Post added at 01:32 PM ---------- Previous post was at 01:31 PM ----------

Quote Originally Posted by Jorndel View Post
Well, you maybe want to use this class instead:
http://www.mpgh.net/forum/604-call-d...n-jorndel.html
That's the one I used
#6 · 13y ago
Jorndel
Jorndel
Quote Originally Posted by NitroSmily View Post
Didn't work
Still can't Open()

---------- Post added at 01:32 PM ---------- Previous post was at 01:31 PM ----------

That's the one I used
How can you?
There is no Open there :S

It's a total different.
Here you use: Process_Handle.

You use: Hack.

So it's NOT the same.
#7 · 13y ago
NI
NitroSmily
Quote Originally Posted by Jorndel View Post


How can you?
There is no Open there :S

It's a total different.
Here you use: Process_Handle.

You use: Hack.

So it's NOT the same.
I changed it, but now no one works or I guess never worked with the Process_Handle (No offence)
When I click the button, it open visual basic and shows a yellow background at the Process_Handle.
Also it comes a message that the object has no Object occurrence
#8 · edited 13y ago · 13y ago
Jorndel
Jorndel
Quote Originally Posted by NitroSmily View Post
I changed it, but now no one works or I guess never worked with the Process_Handle (No offence)
When I click the button, it open visual basic and shows a yellow background at the Process_Handle.
Also it comes a message that the object has no Object occurrence
:|

You just have to re-write all your writing funtions or just re-name the methods in the class for the old you used.

Process_Handle is the same as: Hack("iw5mp")

Means you do:

Process_Handle("iw5mp")


---------- Post added at 09:57 PM ---------- Previous post was at 09:55 PM ----------

Also, why not just add me to skype and I will give you your answers withing 2 min :|
#9 · 13y ago
NI
NitroSmily
Quote Originally Posted by Jorndel View Post


:|

You just have to re-write all your writing funtions or just re-name the methods in the class for the old you used.

Process_Handle is the same as: Hack("iw5mp")

Means you do:

Process_Handle("iw5mp")


---------- Post added at 09:57 PM ---------- Previous post was at 09:55 PM ----------

Also, why not just add me to skype and I will give you your answers withing 2 min :|
Didn't work
#10 · 13y ago
Jorndel
Jorndel
Problem is now solved and this can be closed.
@ @Nachos
#11 · 13y ago
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

  • Error In Visual Basic 2008 Express Edition ( Thanking People Who Help )By Gunner03 in Visual Basic Programming
    4Last post 18y ago
  • Visual Basic [Live] ClassesBy kunal1212 in Visual Basic Programming
    3Last post 15y ago
  • Possible? Visual Basic CA bypassBy CoderNever in Combat Arms Discussions
    13Last post 16y ago
  • [Help] Visual Basic 6 (No im not spamming. i thought I had the awnser)By JuniorD in General Game Hacking
    6Last post 18y ago
  • Packets & Visual BasicBy BadBob in Hack Requests
    5Last post 20y ago

Tags for this Thread

None