Search code examples
c#dllc#-2.0dependency-walker

C# DLL Missing Public Functions


I am attempting to write a DLL using the C# .NET Framework 2.0. Everything compiles okay, but when I try to access the DLL from my application, it fails when attempting to get the procedure address. So, I oped the DLL in Dependency Walker, and all of my public functions are missing!

My DLL, so far, is fairly straightforward:

namespace MyDll_Namespace
{
    public class MyDllClass
    {
        public static int Func1( /* params */ ) { /* ... */ }

        public static int Func2( /* params */ ) { /* ... */ }

        public static int Func3( /* params */ ) { /* ... */ }

        public static int Func4( /* params */ ) { /* ... */ }
    }
}

There's not much else, just a few constants and delegates defined inside the class, as well as outside the class in the namespace. Any thoughts or suggestions would be much appreciated. Thanks.


Solution

  • I decided to write my DLLs in C++. However, here is a bunch of useful information I found for using managed code from unmanaged code: