Article View: comp.os.ms-windows.programmer.misc
Article #1682Re: VB calling DLL function returning void*
From: Fyodor Zubanov
Date: Wed, 09 Dec 1992 17:18
Date: Wed, 09 Dec 1992 17:18
29 lines
1539 bytes
1539 bytes
> Okay all you experts! Has anyone done this? I need to know how to
> correctly DECLARE the dll function. Right now we get a protection
> violation on the call. We've tested the dll with a C program, and it
> works just fine.
>
Of course the best thing to me is to have function prototype.
But right now i can say that this error happens as usual
after wrong type declaration. Suppose that the following
table will help you:
type of C VBasic
parameter int integer
uint integer
WORD integer
LONG long
LPSTR string
Be careful and do not use char type in your function. This will
cause an error too. Do not forget to pass parameters by value.
And be careful with function type declaration. If you function
returns void you should declare it as Sub.
Hope this can help you.
Fyodor.
--
=================================================================
Fyodor Zubanov fyodor@msoft.msk.su
Moscow, Russia
=================================================================
Technical Details
Message-ID:
<AAefY9hm-8@msoft.msk.su>Path:
arc1-ca.pugleaf.net!sparky!uunet!demos!news-serverShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!demos!news-server From: Fyodor@msoft.msk.su (Fyodor Zubanov) Subject: Re: VB calling DLL function returning void* Date: Wed, 9 Dec 1992 17:18:32 GMT Reply-To: Fyodor@msoft.msk.su Organization: Microsoft Moscow Sender: news-server@kremvax.hq.demos.su Message-ID: <AAefY9hm-8@msoft.msk.su> Lines: 30