Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Runtime Error with Find Free DLL

Author
Message
MayoZebraHat 1979
11
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 20th Mar 2009 20:02
Find Free DLL procs "The System plug-in is not available at line x"

using the simple code:




Also, the animation plug in does the same, or Find Free Animation()
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Mar 2009 20:08
Yes, because you aren't using any DLL (or animation) commands in your code - there's no point in them working if you get a number from one of them and then don't do anything with it.



MayoZebraHat 1979
11
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 20th Mar 2009 20:28 Edited at: 20th Mar 2009 20:30
Ah, I see. I was coding the actual include file for FMod to get the dll number as a constant for use in the main and had not actually loaded any dll. I think I was tring to make the include modular for others. I'll just do that processing in my initialize routine then along with the load dll.

I was guessing intuitively given certain other find free XXX commands work without having the type created rather than the fact that file based resources aren't as dynamic as objects. I was basing my usage off of that fact and probably could have guessed it sooner or later but I opened my big mouth... Thank you though.

Actually, now that I look at it, is there a reason why Find Free Object will work without using the free object id obtained?
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Mar 2009 22:17
Quote: "I'll just do that processing in my initialize routine then along with the load dll."

You don't need to load the DLL before the FIND FREE DLL function is available - you simply need to have a command from that DLL in your code.

I'd guess that you'd have a LOAD DLL in that include file to load FMOD anyway, so the issue is moot really.

Quote: "Actually, now that I look at it, is there a reason why Find Free Object will work without using the free object id obtained?"

The FIND FREE OBJECT is a part of a different plug-in, that when loaded, is tightly tied in to the Basic3D module. That DLL forces the Basic3D module to be loaded. This 'forcing' isn't there because of the FIND FREE OBJECT function, but because of the other functions available in that module - the FIND FREE OBJECT function is just riding along and taking advantage of other functionality, making it the fastest way to find a free object id, with reuse of numbers, that I am currently capable of coding.

I can't force DLL loading with the 'generic' FIND FREE functions (which are mostly in a single DLL) because if I did, you'd effectively end up forcing every DBPro DLL to be included into your compiled program even when it wasn't necessary.

The best I could do is to return a zero if the necessary DLL wasn't available, but that would cost you every time you called it. I instead took the decision that if you aren't loading (for example) a DLL, then you wouldn't need to get an ID for one.

Login to post a reply

Server time is: 2019-06-19 00:57:25
Your offset time is: 2019-06-19 00:57:25