...

Source file src/runtime/testdata/testprogcgo/dll_windows.go

Documentation: runtime/testdata/testprogcgo

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  /*
     8  #include <windows.h>
     9  
    10  DWORD getthread() {
    11  	return GetCurrentThreadId();
    12  }
    13  */
    14  import "C"
    15  import "runtime/testdata/testprogcgo/windows"
    16  
    17  func init() {
    18  	register("CgoDLLImportsMain", CgoDLLImportsMain)
    19  }
    20  
    21  func CgoDLLImportsMain() {
    22  	C.getthread()
    23  	windows.GetThread()
    24  	println("OK")
    25  }
    26  

View as plain text