-1

I have created a class library to be used in a other project (which is not a .Net project), i have built the solution the dll file was generated, but when i try to explor my dll using dllexp i foud that it's empty.

My class is declared public as you can see bellow:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PCLImportCLin.ServiceReference1;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;

namespace PCLImportCLin
{
    public class ImportCL
    {
        public int geTroupeau()
        {
        // Rest of the code
        }
    }
}
cascadox
  • 893
  • 4
  • 14
  • 32
  • 3
    That's because DllExp is for unmanaged DLLs. Why are you using that? – CodeCaster May 31 '17 at 11:00
  • In other words, are you trying to create a DLL containing managed code, which you want to call from unmanaged code? You'll then need the calling process to host the CLR and load your assembly to run the managed code inside the DLL. If that's what you want, you may be better off registering the assembly as a COM component. If you just want to use it from another managed project, you don't have to do anything but add a reference to the assembly. – CodeCaster May 31 '17 at 11:08
  • i'm not sure i understood what you meant, but what i'm trying to do is to create a dll that can be called from other projects, so i created a class library project . – cascadox May 31 '17 at 11:15
  • I'm asking two things: why are you using DllExp, and what are you trying to do in the first place? Your latest comment only answers half of the second question. What kind of "other projects" do you mean? Are those .NET projects? Then you just add a reference to the assembly (or its project) and you're good to go. Forget about the DllExp tool then, that does not do what you think it does. – CodeCaster May 31 '17 at 11:22
  • I'm trying to call the functions within this DLL from a Windev project, which is not .Net, i'm facing an error telling me that the function was not found, so i tried to use DLLExp to explore the functions that are available on the DLL. – cascadox May 31 '17 at 11:29
  • Expose your managed code as a COM library, or use C++/CLI. You can't use C# to produce assemblies with unmanaged entry points. Unmanaged-to-managed interop is a subject of its own. – Jeroen Mostert May 31 '17 at 11:39

1 Answers1

0

What you are looking for, I guess, is this:

(Assuming you are using Visual Studio) In your project, right-click 'References', go to 'Browse' and then click the 'Browse...' button. Go to your dll path, select it. There you go. Now you can use it like this using Your.Dll.Namespace;

Taysumi
  • 291
  • 2
  • 16