[HELP] How to use & invoke API function "MulDiv"

Iniciado por msdl, 29 Abril 2012, 15:47 PM

0 Miembros y 3 Visitantes están viendo este tema.

SantaMorte

Cita de: msdl en 30 Abril 2012, 21:38 PM
i mean can i call this api with callapibyname function (with out declaration)?

Yes it's possible

x64core

deberían bloquear estos temas donde escriben en ingles, no lo digo por Karcrack sino por
los que inician los temas, aquí se escribe español/castellano, no ingles  >:(
Si quieren ayuda entonces que usen el Put0 traductor de google al menos  ::)

Swellow

Cita de: SantaMorte en  8 Mayo 2012, 17:31 PM
Strptr Can Be Fully Replaced Without Any Problems
KarCrack made some error Try This :D

'KERNEL32
Private Declare Function VarPtr__ Lib "KERNEL32" Alias "MulDiv" (ByRef a As Any, Optional ByVal b As Long = 1, Optional ByVal c As Long = 1) As Long
'MSVBVM60
Private Declare Sub GetMem4 Lib "MSVBVM60" (ByVal lPtr As Long, ByRef ret As Long)
'USER32
Private Declare Function MessageBoxW Lib "USER32" (ByVal hWnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal wType As Long) As Long

Private Sub Form_Load()
   Dim cadena      As String
   Dim ptr1        As Long
   Dim ptr2        As Long

   cadena = "karcrack"

   ptr1 = StrPtr(cadena)
   'StrPtr__
   Call GetMem4(VarPtr__(cadena) + 8, ptr2)

   MsgBox (ptr1 = ptr2)

   Call MessageBoxW(0, ptr2, 0, 0)
   Call MessageBoxW(0, ptr1, 0, 0)
End Sub

STPRT Get the BSTR Address(where the string is stored) so is simple get it

Readmemory(Varptr + 8) = BSTR

enjoy

This won't work on every situation I just tried.