[Mono-list] P/Invoke problem
Rafael Teixeira
rafael.teixeirabr@terra.com.br
Wed, 4 Feb 2004 01:07:15 -0200
Louis Marascio wrote:
> I'm trying to build a managed wrapper on top of POSIX message queues. For
> development, I'm working on WinXp using pthreads-win32 + mqueues (as
> contributed by a third party to the pthreads-win32 project).
> I've build my wrapper and it executes fine using the MS .NET runtime.
> However, under Mono, I get a System.EntryPointNotFoundException each time
I
> try to use a P/Invoke. I've been banging my head against this for a while
> now, and really am not sure what else to try.
>...
> I have a PthreadsVc.dll, on which 'dumpbin /exports' gives:
>...
> My DllImport for mq_close looks like:
> // int mq_close(mqd_t);
> [DllImport("PthreadVc")]
> public static extern int mq_close(IntPtr queueHandle);
>...
> Any help would be greatly appreciated. Thanks,
> Louis
First, are you trying to run with mono in Windows or in Linux? In Linux, you
and .so file not a .dll.
Second, In one line you wrote PthreadsVc.dll, and in others and in your
DllImport you wrote PthreadVc, without the 's' in the middle, beware of
mispellings...
Hope it helps,
Rafael Teixeira
Brazilian Polymath
Mono, MonoQLE hacker