So, I created a PE32+ DLL, in an attempt to load it into SQL Server,
$ file example_dll.dll example_dll.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
but when I try to compile it as an assembly, with
CREATE ASSEMBLY [ok] AUTHORIZATION [dbo] ... WITH PERMISSION_SET = UNSAFE; I get,
Msg 6544, Level 16, State 1, Server x230, Line 1 CREATE ASSEMBLY for assembly 'ok' failed because assembly 'ok' is malformed or not a pure .NET assembly. Unverifiable PE Header/native stub.
It as come to my attention that what Micrsoft calls CLR "safe" may just mean, .NET's C++. I know that C# is the prefered method of extending SQL Server, but regardless does Microsoft permit loading shared objects or DLL into the server at all? Can you extend SQL Server with "native code"?