Opened 5 years ago

Last modified 4 years ago

#5265 new defect

Missing typemaps for c#

Reported by: tamas Owned by: tamas
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:


Add missing typemaps for VSILFILE, RasterizeLayer?, GetDefaultHistogram?, SetDefaultHistogram?

Change History (4)

comment:1 Changed 5 years ago by tamas

Fixed in r26526 and r26527

comment:2 Changed 5 years ago by tamas

Typemap for RegenerateOverviews? is still missing

comment:3 Changed 5 years ago by dengo

I have noticed that the C# mapping for the GetDefaultHistogram? does not seem to work.

The generated GdalPINVOKE code is:

[DllImport?("gdal_wrap", EntryPoint? = "CSharp_Band_GetDefaultHistogram")] public static extern int Band_GetDefaultHistogram(HandleRef? jarg1, out double jarg2, out double jarg3, out int jarg4, out int[] jarg5, int jarg6, Gdal.GDALProgressFuncDelegate jarg7, string jarg8);

The problem probably is that the Marshaller can not know the size of "out int[]". Probably better to pass this Parameter as a pointer and then read from it using the value of the previous Parameter as the length (and then calling VSIFree on the pointer).

comment:4 Changed 4 years ago by Even Rouault

Milestone: 1.10.2
Note: See TracTickets for help on using tickets.