That is a bug in your DLL you are calling. Somewhere the DLL calls the function fgets() with a NULL pointer for the string value, the function is supposed to write data into. The C runtime library has build in various parameter checks to verify that function parameters do not contain invalid values such as a NULL pointer and then generates an assert(). This assert causes the error dialog. If you continue, the code after the assert tries to access the invalid parameter and of course crashes then.
So you really will need access to the source code for the DLL and determine why it tries to call fgets() with a null pointer as first parameter.