I’m trying to use REALLoadObjectMethod to call FolderItem inside of a plugin. I have been referencing the PluginSDK examples to create this. My code is the same as the examples apart from the change to a FolderItem, but this is crashing when calling the plugin in Xojo.
//FilePath is REALString containing file directory (c:/User/Program Files...) static REALclassRef sFolderItem = REALGetClassRef("FolderItem"); typedef void (*FolderItemFuncTy)(REALobject, REALstring path); REALobject FolderItemObj = REALnewInstanceWithClass(sFolderItem); //Have also tried REALnewInstance FolderItemFuncTy FolderItem = (FolderItemFuncTy)REALLoadObjectMethod(FolderItemObj, "FolderItem( path as String )"); FolderItem(FolderItemObj, FilePath); //Plugin crashes here
Very hard to diagnose as it’s a DLL. Everything seems right but I can’t seem to figure out why this is crashing my project?