MATLAB: What would cause matOpen in libmat.dll to return null

libmatMATLABmatopennullopen

I am working directly with MATLAB's libmat.dll in a LabView application to build .MAT files.
I am finding the matOpen function call occasionally fails and returns null, what could be causing this?

Best Answer

The following events can cause matOpen to return null:
General File error (Permissions, corrupted)
Failure to Identify the version of the MAT file
Invalid open mode