Below is a literal translation into BlitzMAX code, but I suspect that there is more to it than that. Without knowing the syntax for g_pVB->Lock I'm not entirely sure what (void**)&pVertices does.
Byte Ptr vertices if (Not vertexbuffer.Lock(0,SizeOf(vertexarray),vertices[0],0)) 'Code to handle errors endif MemCopy(vertices,vertexarray,sizeof(vertexarray)) vertexBuffer.Unlock()