refactor proc name.

This commit is contained in:
WAKAYAMA Shirou 2014-04-20 01:54:14 +09:00
parent 4f59129155
commit 2b99d2b7a6
1 changed files with 2 additions and 3 deletions

View File

@ -8,8 +8,7 @@ import (
)
var (
modKernel32 = syscall.NewLazyDLL("kernel32.dll")
globalMemoryStatusEx = modKernel32.NewProc("GlobalMemoryStatusEx")
procGlobalMemoryStatusEx = modKernel32.NewProc("GlobalMemoryStatusEx")
)
type MEMORYSTATUSEX struct {
@ -29,7 +28,7 @@ func (m Mem) Virtual_memory() (Virtual_memory, error) {
var memInfo MEMORYSTATUSEX
memInfo.cbSize = uint32(unsafe.Sizeof(memInfo))
mem, _, _ := globalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo)))
if mem == 0 {
return ret, syscall.GetLastError()
}