{"id":22165261,"url":"https://github.com/hexer10/dllimport_gen","last_synced_at":"2025-07-26T11:31:57.504Z","repository":{"id":56828123,"uuid":"266167298","full_name":"Hexer10/dllimport_gen","owner":"Hexer10","description":"A code generation tool that aims to quickly generate dart code from the windows api documentation emulating the DllImport notation in C#.","archived":false,"fork":false,"pushed_at":"2020-05-24T12:43:26.000Z","size":15,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-15T11:10:47.295Z","etag":null,"topics":["code","codegen","dart","ffi","generator"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hexer10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-22T17:18:37.000Z","updated_at":"2024-03-15T11:10:47.296Z","dependencies_parsed_at":"2022-08-28T21:51:38.648Z","dependency_job_id":null,"html_url":"https://github.com/Hexer10/dllimport_gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hexer10%2Fdllimport_gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hexer10%2Fdllimport_gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hexer10%2Fdllimport_gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hexer10%2Fdllimport_gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hexer10","download_url":"https://codeload.github.com/Hexer10/dllimport_gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227673984,"owners_count":17802303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","codegen","dart","ffi","generator"],"created_at":"2024-12-02T05:14:17.254Z","updated_at":"2024-12-02T05:14:18.059Z","avatar_url":"https://github.com/Hexer10.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"A code generation tool that aims to quickly generate dart code from the windows api documentation emulating the DllImport notation in C#.\n\n\nExample:\n\n```dart\nimport 'package:dllimport_gen/dll_import.dart';\n\nimport 'example.ffi.g.dart';\n\n@DllImport('user32.dll')\nabstract class User32 {\n  /// https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursorpos\n  BOOL SetCursorPos(int X, int Y);\n}\n\n@DllImport('kernel32.dll')\nabstract class Kernel32 {\n  /// https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror\n  DWORD GetLastError();\n}\n\nvoid main() {\n  var user32 = FFIUser32();\n  var kernel = FFIKernel32();\n  var success = user32.SetCursorPos(0, 0) != 0;\n  if (!success) {\n    print('Failed: ${kernel.GetLastError()}');\n  }\n}\n```\n\nRun the code generation:\n`pub run build_runner build`\n\nSee `example/`\n\n\u003chr\u003e\n\nUse `@Import('\u003clibrary\u003e')` to import a custom library in the generated file, if for example you're using your custom structs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexer10%2Fdllimport_gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexer10%2Fdllimport_gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexer10%2Fdllimport_gen/lists"}