On 05/02/2013 at 04:47, xxxxxxxx wrote:
- First of all you probably want to load them with the full, absolute path, because that is just the easiest, most stress free way to do it.
You can get the full path to you plugin from C4D (GeGetPluginPath()), just append the libs32/libs64 folder depening on bitness and add the dll name.
(Another way would be to add the dll directory to the search paths (where Windows will look for DLLs). This can be useful if you DLL depends on other DLLs.)
- You probably want to use LoadLibraryW or LoadLibraryExW (W stads for "wide", Windows uses some kind of UTF-16 as platfrom encoding) - otherwise non ASCII characters *will* cause problems at some point in the future.
- When using LoadLibraryW/LoadLibraryExW make sure you *properly* convert the strings to platform encoding. Ask C4D for the UTF-8 String (you can specify the encoding in most String functions) and then use MultiByteToWideChar (Windows API function) to convert it to UTF-16. You should be able to find example code somewhere on the internet.