Depends on how it's done. If people are letting troopers in, then it's most likely a consent situation. They can even tell you that they can get a warrant, provided the probable cause exists.
As far as spot checking for regulated firearms, they're required to be registered in Maryland, so they purportedly know what address the guns, or at least the purchaser on the 77r, should be.
There was absolutely no requirement to register regulated firearms until the FSA2013, which now requires new residents to register them within 90 day of the intent to become a resident.
I'm sure there are quite a few residents that have regulated firearms that MSP has absolutely no clue about.