-
Re: Error using CallingConvention - TNX Bill
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
>>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks