[quote user="Kari Heinola"]mdlLevel_isValidByCode(LEVEL_LIBRARY_MODELREF, value)[/quote]
I believe that, in V8i, LEVEL_LIBRARY_MODELREF is a macro defined to be mdlLevelLibrary_getModelRef(). That function doesn't exist in CONNECT.
You'll have to refactor your logic. I see that level libraries are represented by a LevelLibraryRef rather than a plain old DgnModelRef. Function mdlLevel_getLibraryRef() may be useful: see header Mstn/MdlApi/LevelTable.fdf.