Code Monkey home page Code Monkey logo

Comments (1)

sancarn avatar sancarn commented on May 18, 2024 1

I'm fairly certain, that with dependency walker (or even walking through a dll in general) you can only get the function names, and not the named parameters and parameter types.

Quote from dependency walker page:

For most functions, this information is simply not present in the module. The Windows' module file format only provides a single text string to identify each function. There is no structured way to list the number of parameters, the parameter types, or the return type. However, some languages do something called function "decoration" or "mangling", which is the process of encoding information into the text string. For example, a function like int Foo(int, int) encoded with simple decoration might be exported as _Foo@8. The 8 refers to the number of bytes used by the parameters. If C++ decoration is used, the function would be exported as:
?Foo@@YGHHH@Z
, which can be directly decoded back to the function's original prototype: 
int Foo(int, int)
. Dependency Walker supports C++ undecoration by using the Undecorate C++ Functions Command.

The Win32 APIs aren't decorated. If one wanted to automate the definition of FFI calls the best way would be data driven via MSDN (though mind even these are sparsely documented) or an open source documentation site like pinvoke.

It could also in theory be built off of source code from windows compatible systems or off of wine entries (which could either be extracted via HTTP request or directly if possible...).


Edit: to be honest, wine source code is probably the best place to start:

User32 Wine Spec. User32 Wine Src

from node-win32-api.

Related Issues (20)

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.