Launching multiple instances of a program (Polygamy)

Everything else that doesn't fall into one of the other PB categories.
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

Launching multiple instances of a program (Polygamy)

Post by jrw »

Some programs stop you from running them multiple times (for example (yahoo, msn). It is possible to launch these programs multiple times using something like yahoo multi-gold, yahoopal or MSN Messenger Polygamy patch.

I posted some code below which allows MSN to launch multiple times. But each application is different. How can I find out what to patch in the free program I want to run multiple times?. I would rather have my program be able to run the other application a number of times, than modifying the executable of the other application, is this possible also?

Code: Select all

'General Declarations
Dim Chunk As String * 1024
Dim Test As String 
'Poly-Polygamy Function - it's pretty confusing;)

Private Sub Crack_Click()
Chunk = "" 'in case they press crack twice...
FileName = LocIn.Text 'specify the filename of msmsgs.exe
If FileName = "" Then End 'If no file name give up
Open FileName For Binary As #1 'Open messenger for editing
Do Until InStr(Chunk, "SHLWAPI.DLL") <> 0 'Look for SHLWAPI.DLL text loop
x = x + 1 
Get #1, x * 1024, Chunk

DoEvents
Loop
'
DLLAddy = "4" + Hex((x * 1024) + InStr(Chunk, "SHLWAPI.DLL") - 2) 'add a 4 to the location (compatability issue)
'
HexAddy = Chr(Int("&H" + Mid(DLLAddy, 5, 2))) + Chr(Int("&H" + Mid(DLLAddy, 3, 2))) + Chr(Int("&H" + Mid(DLLAddy, 1, 2))) 'Convert DLLAddy into what what a reference to it would look like
'
x = 0 'another loop....
Chunk = ""
Do Until InStr(Chunk, HexAddy) <> 0 'Look for that SHLWAPI.DLL reference loop
x = x + 1
Get #1, x * 1024, Chunk
DoEvents
Loop
DLLAddy = (x * 1024) + (InStr(Chunk, HexAddy) - 8) 'The line above the SHLWAPI.DLL reference is the part we want to patch, so we multiply the number of times we looped by the length read in each loop, then add how far into the current text read we are and take away 8 bytes to get to where we want...
On Error GoTo Error
Put #1, DLLAddy, "??????" 'Put 6 nops (ASCII value of 90) in
Close #1
MsgBox "Cracked! Code by Daniel Boland a.k.a Megadeth/ElectroPhreak - SubEx"
End
Error:
  Select Case Err.Number
  Case 75
  Retry = MsgBox("Error: Messenger in use, please exit it and try again...", vbOKOnly, "Messenger in use!") 
  End
  End Select
End Sub 

Code: Select all

Simple Patch C
void Polygamy ()
{

 FILE * pFile;

 pFile = fopen("C:\\Program Files\\MSN Messenger\\msnmsgr.exe","rb+");
 fseek(pFile, 0x4DFFE2 + 1, SEEK_SET);
 fputc(0xB6, pFile);
 fclose (pFile);

}

void UnPolygamy ()
{

 FILE * pFile;

 pFile = fopen("C:\\Program Files\\MSN Messenger\\msnmsgr.exe","rb+");
 fseek(pFile, 0x4DFFE2 + 1, SEEK_SET);
 fputc(0xB7, pFile);
 fclose (pFile);

} 

Code: Select all

Simple patch VB
Public Sub Polygamy()

Open "C:\Program Files\MSN Messenger\msnmsgr.exe" For Binary As #1
Put #1, &HDFFE2, "¶"
Close #1

End Sub

Public Sub UnPolygamy()

Open "C:\Program Files\MSN Messenger\msnmsgr.exe" For Binary As #1
Put #1, &HDFFE2, "·"
Close #1

End Sub