2 registered members (BrainSailor, AndrewAMD),
671
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: DLL is not loaded
[Re: MasterQ32]
#448514
02/08/15 20:21
02/08/15 20:21
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
whoa masterq32 I just realised I used kartoffel's nick to refer to you in my previous reply , waaay sorry I fixed it lol
Compulsive compiler
|
|
|
Re: DLL is not loaded
[Re: MasterQ32]
#448519
02/09/15 08:16
02/09/15 08:16
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
I don't think LoadLIbrary will work if the library has already loaded before.
you can load a library as often as you want, you just need to unload it by the same amount of calls. It's reference counted. If the dll was loaded before, LoadLibrary does not load anything, it just returns the already existing handle and increases ReferenceCounting by 1. Same goes for FreeLibrary. It first Decrements the referencecount by 1, and if it reaches 0, it unloads the library. So if you "load" a library 3 times, you have to "Unload" it 3 times. Otherwhise it's keept until your process exits.
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: DLL is not loaded
[Re: Rackscha]
#448521
02/09/15 09:26
02/09/15 09:26
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
^this thanks was actually too lazy to type that since its stated on msdn
Last edited by Ch40zzC0d3r; 02/09/15 09:26.
|
|
|
Re: DLL is not loaded
[Re: Ch40zzC0d3r]
#448524
02/09/15 10:01
02/09/15 10:01
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
^ & ^
you misunderstood the point , if the engine couldn't load the dll after gamestudio was freshly reinstalled (it used to be able to load it at startup) ,then loadlibrary would also not be able to load the library because obviously there's an issue with the library and not gamestudio , thats what we meant .
Compulsive compiler
|
|
|
Re: DLL is not loaded
[Re: MasterQ32]
#448557
02/10/15 12:30
02/10/15 12:30
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@Rakscha: I know how LoadLibrary works, pretty good actually The point is, what Wjbender said above. Then i mssunderstood you. Because, if a library loaded before LoadLibrary will work! but you stated the opposite^^
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
|