Accessing from C# to an vb dll



Hi,

I've a vb dll with a function that i want to access from C#. I'm using
the following:

public class library
{
[DllImport("myDll.dll", CharSet = CharSet.Auto, EntryPoint =
"clsLibrary")]
public static extern void create();
}

and:

library.create();

but i'm getting Sytem.DllNotFoundException. Nothing helped to add the
library to the references of my C# project.

I don't know what can i be doing wrong. I don't know if i have to make
the call in another way, or maybe i've to compile my vb library in a
particular way. Can anybody help me?

Thank you very much for your time!

.



Relevant Pages

  • Re: Pinvoke help
    ... you say you put the dll one directory down from where the .sln ... public static extern int StartCamera; ... MouseButtons button, Int32 clicks) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pinvoke help
    ... Have you tried hard-coding the path to the dll just to see if it works? ... public static extern int StartCamera; ... MouseButtons button, Int32 clicks) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: RAM used goes crazy with Dllimport ?
    ... calls the C++ Dll through DllImport. ... >> It uses quite a lot of RAM to make some math but will never xceed 26MB. ... >> public static extern int main ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Failed to call unmanaged functions in C++ dll compiled in Visual 6.0
    ... public static extern void ResetDriver; ... public static extern bool IsDriverLoaded(ushort uChannel, ... DriverLibrary.dll to the Debug folder of the project DriverTester. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pinvoke help
    ... you say you put the dll one directory down from where the .sln ... public static extern int StartCamera; ... MouseButtons button, Int32 clicks) ...
    (microsoft.public.dotnet.languages.csharp)