trying to convert the libpng to vb.NET code RRS feed

  • Question

  • as mentioned in the title, i am facing an accessviolation exception if the line:

    png_read_info(png, info)

    i have searched on google, i found that this problem is related to the multi-threaded application and the libpng dll, in c++ app we can use the /md setting but i am in

    Wednesday, April 17, 2019 5:17 PM

All replies

  • Hi,

    I found the following article,it is about C++,I hope you can get heip.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, April 18, 2019 6:07 AM
  • yes the link is about C++ , they are talking about changing the app from single-threaded to multi-threaded, but i am on vb.NET , how can i change to multi-threaded vb.NET app just as the libpng?
    Thursday, April 18, 2019 7:46 AM
  • It works by using a custom function to read data, with png_set_read_fn

    It must be declared with


    (tested on Windows 10/VS 2015 with last LibPng version ("1.6.37") that I have recompiled for testing)

    • Edited by Castorix31 Friday, April 19, 2019 11:18 AM
    Friday, April 19, 2019 11:17 AM