I have this in a .dll’s header:
DLL int PluginOpenFile(const char* inFilename);
So I :
Dim FileName As CString = “B0032.sm” (this is copied inot the app main on a build script CopyFileStep)
soft Declare Function PluginOpenFile Lib “slvsPlugin.dll” (ByRef FileName As CString) As Integer
result = PluginOpenFile( FileName )
…but this hangs inside the .dll and I have to “EndTask”. If I leave the ByRef out ogf the declare, it runs but returns an error (1)
I know I am bungling the ptr but how?
Thanks Norm, I must have something else wrong. When I try that it runs but gives me back a “1” - no bueno… I wonder if it cant find the file but I CopyFileStep it in there with the .dll and its Init fine.
well said Norm, and thank you all. I am just a hobbyist at this point and I am using a DLL from a team I know but it is not a commercial thing, not well docuemtned but I did ask them to clarify the return values.
@Julian - thanks again, i tried that setup but no cigar.
I have offered a “bounty” for someone who knows this kind of work via the consulting link on xojo.com so if anyone wants to DM me and take some $ for helping me Im not opposed to paying for what i dont know.
Id say its not the declare (everytime you received a response you had it basically right) but the filename. Looks like the file is not at the right location for the dll to find it, or in other words youll have to add the full path information to the string.