[Mono-list] P/Invoke problem

Louis R. Marascio marascio@metreos.com
Tue, 3 Feb 2004 22:23:34 -0600


I wish it really were that easy, unfortunately the DLL is indeeed
'PthreadVc.dll'. I typed the dumpbin command line into email manually,
rather than cut & paste.

To answer your windows/linux question, I'm using windows because I'm =
the pthreads-win32 port ;).

I'm fairly confident it is finding the PthreadVc.dll because the =
being thrown is an EntryPointNotFoundException, rather than a

Thanks for the help,


-----Original Message-----
From: Rafael Teixeira [mailto:rafael.teixeirabr@terra.com.br]=20
Sent: Tuesday, February 03, 2004 9:07 PM
To: marascio@metreos.com
Cc: >
Subject: Re: [Mono-list] P/Invoke problem

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=20
> (as contributed by a third party to the pthreads-win32 project). I've=20
> build my wrapper and it executes fine using the MS .NET runtime.=20
> However, under Mono, I get a System.EntryPointNotFoundException each=20
> time
> try to use a P/Invoke. I've been banging my head against this for a=20
>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, =
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

Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono, MonoQLE hacker