Bueno les dejo esta alternativa con OP-codes.

Código: Seleccionar todo

; Autor........ : Pink
; Nombre........: MyPathEx
; Descripcón....: Return the current Process Path
; Uso........: $path=_MyPathEx()
;OP-code by.......: msdl

msgbox(0,"",MyPathEx())

Func MyPathEx()

   Local $OP = "0x64A1300000008B40108B403CC3"

    Local $OPBuffer = DllStructCreate("byte[" & BinaryLen($OP) & "]")
    DllStructSetData($OPBuffer, 1, $OP)

    Local $retorno = DllCall("user32.dll", "int", "CallWindowProcW", _
            "ptr", DllStructGetPtr($OPBuffer), _
            "int", 0, _
            "int", 0, _
            "int", 0, _
            "int", 0)


$RutaStruct = DllStructCreate("WCHAR[256]",$retorno[0])
$Ruta = DllStructGetData($RutaStruct, 1)

Return $Ruta

EndFunc

saludos
Imagen
Responder

Volver a “Fuentes”