示例#1
0
        static NativeLibMethods()
        {
            LibHandle = NativeMethods.LoadLibrary(LibraryName);

            MultiplyPtr = NativeMethods.GetProcAddress(LibHandle, "Multiply");
            Multiply    = Marshal.GetDelegateForFunctionPointer <MultiplyDelegate>(MultiplyPtr);

            GetFirstCharPtr = NativeMethods.GetProcAddress(LibHandle, "GetFirstChar");
            GetFirstChar    = Marshal.GetDelegateForFunctionPointer <GetFirstCharDelegate>(GetFirstCharPtr);
        }
示例#2
0
 public static extern IntPtr GetProcAddress(NativeLibraryHandle module, string procName);