I know that. But It looks simple like that Simple sample
That is why - I really know like this FreeImage for example:
///
/// Returns a string containing the current version of the library.
///
/// The current version of the library.
public static unsafe string GetVersion() { return PtrToStr(GetVersion_()); }
[DllImport(FreeImageLibrary, CharSet = CharSet.Ansi, EntryPoint = "FreeImage_GetVersion")]
private static unsafe extern byte* GetVersion_();
From FreeImage's Documentation / API References: Click here!
I hope you understand.
But I have problem with Rectangle* rectangles why does C/C++ have only "*" not "[]".
Welcome tag moderator AKA Unofficial DEV cheerleader. While most of my friends are found on SnapChat or Tic-Toc, you can find me here. And I OOP, but I’m not a VSCO girl.
Here the PtrToStr method does the conversion from the static pointer to a csharp string type. You need to convert that pointer to Rectangle structs to an array in csharp.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I know that. But It looks simple like that
Simple sample
That is why - I really know like this FreeImage for example:
///
/// Returns a string containing the current version of the library.
///
/// The current version of the library.
public static unsafe string GetVersion() { return PtrToStr(GetVersion_()); }
[DllImport(FreeImageLibrary, CharSet = CharSet.Ansi, EntryPoint = "FreeImage_GetVersion")]
private static unsafe extern byte* GetVersion_();
From FreeImage's Documentation / API References: Click here!
I hope you understand.
But I have problem with Rectangle* rectangles why does C/C++ have only "*" not "[]".
I hope you understand me. Thanks
Here the PtrToStr method does the conversion from the static pointer to a csharp string type. You need to convert that pointer to Rectangle structs to an array in csharp.