[Lcms-user] Multiple methods with similar signatures
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Roger B. <gr...@vi...> - 2016-07-01 14:09:14
|
Edgar,
I am surprised (und pleased!) that the compiler accepts multiple functions
with similar declarations -- only the arguments change.
So the run-time is smart enough to use the 'correct' function call, given
the parameter type?
Wow!
MfG / Roger
---------------------------------
On the one hand you can have several declarations/imports of cmsDoTransform
e.g.:
public static class NativeMethods {
[DllImport("lcms2.dll")]
public static extern void cmsDoTransform(
[In] IntPtr Transform,
[In] byte[] InputBuffer,
[Out] byte[] OutputBuffer,
[In] UInt32 Size);
[DllImport("lcms2.dll")]
public static extern void cmsDoTransform(
[In] IntPtr Transform,
[In] ushort[] InputBuffer,
[Out] ushort[] OutputBuffer,
[In] UInt32 Size);
[DllImport("lcms2.dll")]
public static extern void cmsDoTransform(
[In] IntPtr Transform,
[In] double[] InputBuffer,
[Out] double[] OutputBuffer,
[In] UInt32 Size);
}
|