Hi Alexander,
Mixing Excel-DNA and VSTO in one add-in won't work. Globals.ThisAddIn is related to VSTO.
The best starting point for an Excel-DNA add-in is to make a plain "Class Library" project and the install the "Excel-DNA" package from NuGet.
If you need to get to the Excel COM object model from an Excel-DNA add-in, you can call ExcelDnaUtil.Application. This returns an object that is a Microsoft.Office.Interop.Excel.Application. You can reference the Excel interop assembly Microsoft.Office.Interop.Excel, and use it from there.
The context where UDFs run is more restricted than normal macros, so I normally recommend avoiding the COM object model inside UDF functions where possible. I'm, not sure what you were intending to do with the ActiveSheet...
Sadly there's not much more documentation for Excel-DNA beyond the limited documentation on the CodePlex site, and the posts in the Google group. But I'm happy to answer any specific questions you might have.
-Govert