I have a module function which needs to get the raw results of a view, so I use this bit of code:
$view = views_get_view('sluitingsuren_bakker');
$view->preview();
return $view->result;
The views machine name is sluitingsuren_bakker. I also tried some other views, but it seems the module can't find any of the views.
Also I set my permissions on this view to none, because I thought that was the problem.