code:
Private Sub cmd_install_Click()
Dim PluginDir As String
PluginDir = QueryValue("SOFTWARE\Patchou\MsgPlus2", "PluginDir", True)
If PluginDir <> "" Then
If FileLen(PluginDir & "\ReversePlugin.dll") > 0 Then
If MsgBox(text("overwrite"), vbYesNo + vbExclamation, text("overwrite_title")) = vbNo Then
rc = MsgBox(text("installation_aborted"), vbInformation, text("installation_aborted_title"))
Exit Sub
End If
End If
If Sendmsg("MessengerPlus_PluginChange") Then
label.Caption = text("copying")
Call WriteFile(PluginDir & "\ReversePlugin.dll", FileString())
Else
rc = MsgBox(text("close_messenger"), vbCritical, text("close_messenger_title"))
End If
Else
rc = MsgBox(text("no_msg_plus"), vbCritical, text("no_msg_plus_title"))
End If
End Sub
code:
Public Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Const HWND_BROADCAST = &HFFFF&
Public nMsg As Long
Public Function Sendmsg(strMessage As String) As Boolean
nMsg = RegisterWindowMessage(strMessage)
Sendmsg = PostMessage(HWND_BROADCAST, nMsg, 0, 0)
End Function
The text() function is a function to display the text. The function is not totally done, after copying there has to be more, but that isn't done yet. And this is where it ends...