How to get a variant returned from a c++ function in vb.net?
- From: "Thomas W" <twtemp@xxxxxx>
- Date: 17 Nov 2005 01:39:40 -0800
Hello,
I'm trying to call a function from a C++ dll which returns a variant:
VARIANT DLLEXPORT ExecuteFunction (LPCSTR);
This function (which I can't change) executes a SQL query and returns a
single value - whatever the query asks for: integer, string, double
etc.
My declaration for that in VB.NET 2003 is
Private Declare Auto Function ExecuteFunction Lib "database.dll" ( _
ByVal sSQL As Char) As Object
When I call that function, I'm getting the "PInvoke restriction: can
not return variants"-error.
How can I fix that? (sorry for cross posting in
microsoft.public.dotnet.languages.vb - no answers there, seems better
here)
Thanks Thomas
.
- Follow-Ups:
- Prev by Date: Marshal array in structure
- Next by Date: Re: How to get a variant returned from a c++ function in vb.net?
- Previous by thread: Marshal array in structure
- Next by thread: Re: How to get a variant returned from a c++ function in vb.net?
- Index(es):