Thanks Bill,

That was it. Works great now. Now I can call the same entry point
from VB.NET or C/C++.

Pat

"Bill McCarthy" <bill_mcc@iprimus.com.au> wrote:
>Hi Patrick,
>
>try CallingConvention:=CallingConvention.Cdecl
>
>
>
>"Patrick Ireland" <ireland@airmail.net> wrote in message
>news:3afdb52b$1@news.devx.com...
>>
>> I'm trying to using the CDecl calling convention option. The error
>> is Cdecl is not defined. I have tried stdcall, CC_CDECL, and

>CallConvCdel.
>> Clearly the shotgun approach is not working so now I need other expertise.
>> Here is the code:
>>
>> Imports System
>> Imports System.Console
>> Imports System.Runtime.InteropServices
>> ' No change if following imports is removed
>> Imports System.Runtime.InteropServices.CallConvCdecl
>> Module modTestCDecl
>> Public Sub _
>> <DllImport("C\Pat\Exe\TestCDecl.dll", CallingConvention:=Cdecl)>

_
>> Test1(ByRef intValue As Integer, _
>> ByVal strValue As String, _
>> ByRef bytByte As Byte)
>> End Sub
>> Sub Main()
>> End Sub
>> End Module
>>

>
>