Giter Club home page Giter Club logo

win32json's Introduction

win32json's People

Contributors

marler8997 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

win32json's Issues

Here is the typescript interface for the Function

May this used to create the JSON schema?

export interface ApiInformation {
    Index: number
    Platform: string
    Name: string
    DllImport: string
    ReturnType: TypeInfo
    Params: TypeInfo[]
}
export interface TypeInfo {
    Kind: string
    Name: string
    TargetKind: string
    Api: string
    Parents: any []
}
export interface ParamInfo {
    Name: string
    Type: TypeInfo
    Attrs: string[]
}
export interface FunctionInfo {
    Name: string
    SetLastError: boolean
    DllImport: string
    ReturnType: TypeInfo
    ReturnAttrs: string[]
    Architectures: string[]
    Platform: string | null
    // Attrs: string[] /* There is no function Attrs */
    Params: ParamInfo[]
}

Missing calling convention

Some functions use cdecl calling convention such as those in Win32.Networking.Ldap so this would be good to include ๐Ÿ™‚

Suggestion normalize all Platform,

And also generate the detail kernel version number from Platform by reference to
https://en.wikipedia.org/wiki/Comparison_of_Microsoft_Windows_versions

The normlize typescript function

function normalizePlatform(platform: string | null) {
    if (platform === null) {
        return platform
    }
    platform = platform.toLowerCase()
    platform = platform.replace(/\s+/g, '');
    return platform
}
[
  {
    "Platform": "windows5.0",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windows2000",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windowsserver2000",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windows5.1.2600",
    "Version": "5.1.2600"
  },
  {
    "Platform": "windowsserver2003",
    "Version": "5.2.3790"
  },
  {
    "Platform": "windows6.0.6000",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windowsvista",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windowsserver2008",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windows6.1",
    "Version": "6.1.7600"
  },
  {
    "Platform": "windows8",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windows8.0",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windowsserver2012",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windows8.1",
    "Version": "6.2.9600"
  },
  {
    "Platform": "windows10.0.10240",
    "Version": "10.0.10240"
  },
  {
    "Platform": "windows10.0.10586",
    "Version": "10.0.10586"
  },
  {
    "Platform": "windows10.0.14393",
    "Version": "10.0.14393"
  },
  {
    "Platform": "windowsserver2016",
    "Version": "10.0.14393"
  },
  {
    "Platform": "windows10.0.15063",
    "Version": "10.0.15063"
  },
  {
    "Platform": "windows10.0.16299",
    "Version": "10.0.16299"
  },
  {
    "Platform": "windows10.0.17134",
    "Version": "10.0.17134"
  },
  {
    "Platform": "windows10.0.17763",
    "Version": "10.0.17763"
  },
  {
    "Platform": "windows10.0.19041",
    "Version": "10.0.19041"
  }
]

Some datasets are missing?

This might be a known issue already, but I think WinUser is missing. I also couldn't find functions from Kernel32 (although i don't know what this file would be called either). E.G. I can't find functions like SendMessageA and SetWindowHookEx

memory layout of NC_ADDRESS is not match to msdn

https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-nc_address
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/ns-iphlpapi-net_address_info

	,{
		"Name":"NC_ADDRESS"
		,"Architectures":[]
		,"Platform":null
		,"Kind":"Struct"
		,"Size":0
		,"PackingSize":0
		,"Fields":[
			{"Name":"pAddrInfo","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"NET_ADDRESS_INFO","TargetKind":"Default","Api":"UI.Shell","Parents":[]}},"Attrs":[]}
			,{"Name":"PortNumber","Type":{"Kind":"Native","Name":"UInt16"},"Attrs":[]}
			,{"Name":"PrefixLength","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]}
		]
		,"NestedTypes":[
			{
				"Name":"NET_ADDRESS_INFO"
				,"Architectures":[]
				,"Platform":null
				,"Kind":"Struct"
				,"Size":0
				,"PackingSize":0
				,"Fields":[
				]
				,"NestedTypes":[
				]
			}
		]
	}

Plans on how to keep this repo up to date

Hi there,

Thanks @marler8997 for creating this project, it is very beneficial for those who (like me) don't know much about winmd and don't want to mess with it.

What are the plans to keep this up to date? Do you plan to update it manually? Do you expect people to PR with the new version?

Ideally it would be great to automatically keep in sync with the upstream. This maybe could be done with a CI/CD pipeline. Another option would be to convince the upstream project to distribute the json file together with winmd and hence take care of the generation for every release.

Cheers

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.