[Gdal-dev] RE: RE: Any tips for VB .NET?

Holywhippet amills at frogtech.com.au
Wed Mar 22 20:04:03 EST 2006


 Thanks again. I actually found a simpler way of making it work. If I declare
the function like this:

    <DllImport("gdal_fw.dll")> _
    Friend Shared Function GDALRasterIO(ByVal hBand As IntPtr, ByVal _
    flag As Integer, ByVal xOff As Integer, ByVal yOff As Integer, ByVal
xSize As _
    Integer, ByVal ySize As Integer, ByVal data As Single(), ByVal bufXSize
As _
    Integer, ByVal bufYSize As Integer, ByVal type As Integer, ByVal _
    pixelStride As Integer, ByVal lineStride As Integer) As IntPtr

    End Function

 And just pass in an array of singles for the data field it works ok.

 This might not work for rasters with a different pixel value type though
but it's a start. 

 Thanks again.
--
View this message in context: http://www.nabble.com/Any-tips-for-VB-.NET--t1315468.html#a3544547
Sent from the GDAL - Dev forum at Nabble.com.




More information about the Gdal-dev mailing list