Coder Social home page Coder Social logo

thiswrap's Introduction

EN

This module allows you to call functions of thiscall Convention without any hassle as creating your own wrappers.

The main function of the module - "__ThisCall", which serves as a universal wrapper for all functions of the convention. The main args:

  • PClass - a pointer to the class where the function is located.
  • PFunc - a pointer to a function which is necessary to be called.

The function has uncertain number of arguments. All minor arguments are the arguments for the function, which is going to be called.

Some classes of functions can return a result. ThisCall function can return the result as a pointer. You can use the type conversion, to get the result of the correct type.

TThisCall type is needed for tricking the compiler, which prohibits the direct use of "varargs" directive. By assigning this type of variable, we can call it using the dynamic number of arguments. This directive works both on "register", and the "stdcall/pascal/cdecl" conventions.

RU

Данный модуль позволяет вызывать функции thiscall конвенции, не прибегая к созданию собственных оберток.

Главная функция модуля - "__ThisCall", которая и служит универсальной оберткой для всех функций данной конвенции. Основные аргументы:

  • PClass - указатель на класс, в котором располагается функция.
  • PFunc - указатель на функцию, которая должна быть вызвана.

Функция имеет переменное количество аргументов. Все побочные аргументы являются аргументами для функции, которая планируется быть вызвана.

Некоторые функции классов могут возвращать результат. ThisCall функция способна вернуть этот результат в виде указателя. Можно использовать преобразование типов, чтобы получить результат нужного типа.

Тип TThisCall необходим для "обмана" компилятора, который запрещает прямое использование директивы "varargs". Присвоив переменной данный тип, мы сможем вызывать ее, используя динамическое количество аргументов. Данная директива работает как на "register", так и на "stdcall/pascal/cdecl" соглашениях.

thiswrap's People

Contributors

2010kohtep avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.