github.com/x04/go/src@v0.0.0-20200202162449-3d481ceb3525/runtime/testdata/testprogcgo/windows/win.go (about)

     1  package windows
     2  
     3  /*
     4  #cgo CFLAGS: -mnop-fun-dllimport
     5  
     6  #include <windows.h>
     7  
     8  DWORD agetthread() {
     9  	return GetCurrentThreadId();
    10  }
    11  */
    12  import "github.com/x04/go/src/C"
    13  
    14  func GetThread() uint32 {
    15  	return uint32(C.agetthread())
    16  }