Ok, I'm VERY excited now!!

Finally got it to work!!
In the end I got my test code (which just used
make object cube to make a test object) and did this instead:
make object new 1,4,6,274,0
lock vertexdata for limb 1,0
set vertexdata position 0,-1,0,1
set vertexdata position 1,1,0,1
set vertexdata position 2,1,0,-1
set vertexdata position 3,-1,0,-1
set vertexdata normals 0,0,1,0
set vertexdata normals 1,0,1,0
set vertexdata normals 2,0,1,0
set vertexdata normals 3,0,1,0
set vertexdata uv 0,0,0
set vertexdata uv 1,1,0
set vertexdata uv 2,1,1
set vertexdata uv 3,0,1
set indexdata 0,0
set indexdata 1,1
set indexdata 2,3
set indexdata 3,1
set indexdata 4,2
set indexdata 5,3
unlock vertexdata
...because that's basically how I was creating the mesh in my main project (only I wasn't typing out the vertex data by hand

). As I was writing that code I noticed there was an extra parameter in
lock vertexdata for limb that I didn't know about. I ignored it to begin with as I just wanted to see if I could get the simpler test code to act the same was as the main code, and lo and behold when I applied the shader the object disappeared. Yes! That meant it was something to do with how I was creating the object.
So I remembered that extra parameter and tried using it. A value of 1 did nothing, but when I tried 2 it worked! The object appeared again, this time with the shader applied! So, in future, remember that the vertexdata set up in an object created using
make object new from the Matrix1 DLLs isn't properly initialised until you lock the vertexdata with that
lock mode parameter set to 2.
Yes!!

Very happy!
Time to go tidy up my very messy code (it always ends up horribly messy when I have to spend hours debugging something obscure) and then add tri-planar projection to the shader (lets see I get that far without needing help again

).