marlersoft / win32json Goto Github PK
View Code? Open in Web Editor NEWA JSON representation of win32metadata. These files are generated by https://github.com/marlersoft/win32jsongen
License: MIT License
A JSON representation of win32metadata. These files are generated by https://github.com/marlersoft/win32jsongen
License: MIT License
Some functions use cdecl calling convention such as those in Win32.Networking.Ldap
so this would be good to include ๐
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"
}
]
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
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":[
]
}
]
}
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[]
}
So some things were not parsed, or transferred.
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
XInputGetKeystroke
set the VirtualKey
value to 0
if no key is pressed.
As the "no key pressed" value do not exists in Xinput.h and XINPUT_VIRTUAL_KEY is not set as a flag, zig panics when XInputGetKeystroke
is used.
win32json/api/UI.Input.XboxController.json
Line 369 in d7c046e
It would be nice if this could be set as a flag in a future update
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.