Hello Peter,
I think OxygenBasic DLL's have nothing to do with this error.
MakeCriticalSectionGlobal() is an undocumented kernel function not commented on by Microsoft but Google shows that this error happens most often in conjunction with DirectX and very rarely, with OpenGL too.
There are no comments on behalf of Microsoft either as to how this error should be properly cured. But people say the best way is to try and re-install your respective DirectX or OpenGL drivers. This usually helps but it may still fail in some rare cases.