'As Any' is not supported in 'Declare' statements?

Knight Chat X

Member
Joined
Mar 20, 2004
Messages
22
Location
Tulsa, OK
If I use APIViewer 2003 or the built-in VB6 to VB.Net convertor it produces the declare below.

Declare Function GetDIBits Lib "gdi32.dll" ( _
ByVal aHDC As Int32, _
ByVal hBitmap As Int32, _
ByVal nStartScan As Int32, _
ByVal nNumScans As Int32, _
ByRef lpBits As Any, _
ByRef lpBI As BITMAPINFO, _
ByVal wUsage As Int32) As Int32

Giving an error:
As Any is not supported in Declare statements

What needs to be done to properly declare the function?
 
VB.NET is a typesafe language. You cannot have "as any". Instead, replace that with the actual type of whatever you want to pass.
 
I recommand your second option ThePentiumGuy.
Being sure of what you use is really important.

The first thing to do when I create a VB Project is to turn on OPTION STRICT.
This help thing a lot.

so... Option #2
 
Back
Top