2 Star 0 Fork 0

程序员锡哥/winapi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
winapi.go 2.71 KB
一键复制 编辑 原始数据 按行查看 历史
// +build windows
package winapi
import (
"syscall"
)
var (
dll_gdi = syscall.NewLazyDLL("gdi32.dll")
procBitBlt = dll_gdi.NewProc("BitBlt")
procDeleteObject = dll_gdi.NewProc("DeleteObject")
procGetObject = dll_gdi.NewProc("GetObject")
procCreateCompatibleDC = dll_gdi.NewProc("CreateCompatibleDC")
procSelectObject = dll_gdi.NewProc("SelectObject")
procDeleteDC = dll_gdi.NewProc("DeleteDC")
)
var (
dll_kernel = syscall.NewLazyDLL("kernel32.dll")
procGetLastError = dll_kernel.NewProc("GetLastError")
procExitProcess = dll_kernel.NewProc("ExitProcess")
procCreateFile = dll_kernel.NewProc("CreateFileW")
procReadFile = dll_kernel.NewProc("ReadFile")
procWriteFile = dll_kernel.NewProc("WriteFile")
procSetFilePointer = dll_kernel.NewProc("SetFilePointerEx")
procGetModuleHandle = dll_kernel.NewProc("GetModuleHandleW")
procCloseHandle = dll_kernel.NewProc("CloseHandle")
procFormatMessage = dll_kernel.NewProc("FormatMessageW")
)
var (
dll_user = syscall.NewLazyDLL("user32.dll")
procDefWindowProc = dll_user.NewProc("DefWindowProcW")
procGetMessage = dll_user.NewProc("GetMessageW")
procRegisterClass = dll_user.NewProc("RegisterClassExW")
procMessageBox = dll_user.NewProc("MessageBoxW")
procCreateWindow = dll_user.NewProc("CreateWindowExW")
procShowWindow = dll_user.NewProc("ShowWindow")
procUpdateWindow = dll_user.NewProc("UpdateWindow")
procTranslateMessage = dll_user.NewProc("TranslateMessage")
procDispatchMessage = dll_user.NewProc("DispatchMessageW")
procPostQuitMessage = dll_user.NewProc("PostQuitMessage")
procDestroyWindow = dll_user.NewProc("DestroyWindow")
procLoadString = dll_user.NewProc("LoadStringW")
procLoadIcon = dll_user.NewProc("LoadIconW")
procLoadCursor = dll_user.NewProc("LoadCursorW")
procLoadBitmap = dll_user.NewProc("LoadBitmapW")
procLoadImage = dll_user.NewProc("LoadImageW")
procBeginPaint = dll_user.NewProc("BeginPaint")
procEndPaint = dll_user.NewProc("EndPaint")
procRegisterWindowMessage = dll_user.NewProc("RegisterWindowMessageW")
// 菜单
procAppendMenu = dll_user.NewProc("AppendMenuW")
procCreateMenu = dll_user.NewProc("CreateMenu")
procCreatePopupMenu = dll_user.NewProc("CreatePopupMenu")
procDestroyMenu = dll_user.NewProc("DestroyMenu")
)
var (
dll_comdlg = syscall.NewLazyDLL("comdlg32.dll")
procGetSaveFileName = dll_comdlg.NewProc("GetSaveFileNameW")
procGetOpenFileName = dll_comdlg.NewProc("GetOpenFileNameW")
procCommDlgExtendedError = dll_comdlg.NewProc("CommDlgExtendedError")
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/msgy/winapi.git
git@gitee.com:msgy/winapi.git
msgy
winapi
winapi
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385