Coder Social home page Coder Social logo

winapi's Introduction

winapi

这是用 Go 编写的调用 Windows API 的包。将 Windows API 转换成 Go 的风格,使其易用。

使用方法

本包不依赖任何第三方包、框架或库。
任何安装了 Go 环境的 Windows 系统都可以使用。

已实现的或有所改变的 API

我没有照搬 Windows API,而是在做了一些妥善的改动。例如,不封装CreateWindow而封装 CreateWindowEx,封装之后的Go的函数名为CreateWindow

gdi

BitBlt
DeleteObject
GetObject
CreateCompatibleDC SelectObject
DeleteDC

kernel

GetLastError
ExitProcess
CreateFile
ReadFile
WriteFile
SetFilePointer
GetModuleHandle
CloseHandle
FormatMessage

user

DefWindowProc
GetMessage
RegisterClass
MessageBox
CreateWindow
ShowWindow
UpdateWindow
TranslateMessage
DispatchMessage
PostQuitMessage
DestroyWindow
LoadString
LoadIcon
LoadCursor
LoadBitmap
LoadImage
BeginPaint
EndPaint

comdlg

暂无

增加的函数

ErrorBox
ErrorAssert
WinErrorAssert

不实现的函数

与线程相关的函数,如CreateThreadCreateMutex,因为Go已经有了很好的并发特性。

TODO

实现COM接口的封装,DirectX等。

协议

本项目采用与golang相同的协议。

winapi's People

Contributors

jthmath avatar

Stargazers

sharkopen 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.