C++ Change Directory

I am fairly new to c++ and am wondering if it is safe to use _wchdir() from inside a c++ plugin? Will this have any negative impacts on Rhino as a running application? I have a set of 3rd Party DLLs for a hardware device I am working with, and they are looking for their location in the directory of the running program (Rhino Install folder). They are in the same directory with my plugin. Changing the directory to the DLL/Plugin directory using _wchdir() seems to fix the problem, but is this ok to do this from inside Rhino? Is Rhino referencing the current directory and am I going to muck things up changing the directory? I am currently testing in a modal form but I plan on having my plugin use a modeless window and I would expect the directory change to stick while the plugin is running if that makes a difference.


Hi Tom,

Calling _wchdir from your plug-in shouldn’t effect Rhino in any way…

– Dale

Good to know - Thanks Dale.