> Eh... the sentence did start with *IF*
There's no question of if, this is what the author does. He even
provided a link for it:
https://github.com/LukeMauldin/lodbc/blob/master/odbc/apisys.go
> Does go's syscall package call non system calls (native api or whatever they
> call it) in windows?
The syscall package calls the regular Win32 API. I already said that.
If you don't know how the syscall package works under Windows, why do
you offer advice about it? Your inferences are based on a purely
speculative model (that happens to be false), for the Windows and
syscall package architecture.
System calls on Windows on IA-32(E) are done just like on any other
operating system, either via an interrupt (2E on Nt) or via
SYSENTER/SYSCALL. Unlike many other operating systems, this interface
is undocumented. There is an (almost) bijective mapping between system
calls and the user-level entry points exported in ntdll.dll. This
interface is only partially documented. The Win32 subsystem is
implemented as a user-level process on top of ntdll.dll and exports a
documented interface from the unfortunately named kernel32.dll shared
library.
Since the only documented interface to the system is a shared library,
no wonder the syscall package uses it, and since any user-level,
system provided, shared library is in no way different from an
arbitrary shared library, it shouldn't be a surprise there's a generic
mechanism available in the syscall package that allows you to use any
DLL.
--
Aram Hăvărneanu