Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, VoroneTZ, PeroPero), 841 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Request: A more transparent DLL loading mechanism #442075
06/10/14 11:49
06/10/14 11:49
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
I want to share a recent experience and a problem with you:
We did a "publish" on our project recently and we discovered that it didn't work and left us with a black screen. Whereas it works when we run it from the source code. It turns out that when we publish it, it gets exported with acknet.dll. We use cURL in our project and unbeknownst to us, this DLL is also compiled with cURL as a static library. Both our dll and acknet.dll expose similar functions so when the engine searches for a external function, it finds acknet first(because it searches alphabetically) and uses its functions. This didn't work for us probably because versions were different and it failed somewhere. Luckily I found this out during a debugging session but it could pass by many unfortunate souls.

I wish we could choose which DLL we want functions to be loaded because this also poses a vulnerability: any DLL can be added next to the executable with name like ___foo.dll to hijack a function.

Re: Request: A more transparent DLL loading mechanism [Re: Talemon] #442077
06/10/14 12:14
06/10/14 12:14
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
LoadLibraryA
GetProccAddress

Define a typedef and youre done..

Re: Request: A more transparent DLL loading mechanism [Re: Ch40zzC0d3r] #442078
06/10/14 12:45
06/10/14 12:45
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
Originally Posted By: Ch40zzC0d3r
LoadLibraryA
GetProccAddress

Define a typedef and youre done..

You know what, you're right, I should have sticked with the classic method instead of leaving it to the engine. Thanks!

Re: Request: A more transparent DLL loading mechanism [Re: Talemon] #442295
06/17/14 11:44
06/17/14 11:44
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
as far as i know, Lite-C supports widestrings and wideliterals, so you might consider working with LoadLibraryW


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: Request: A more transparent DLL loading mechanism [Re: Rackscha] #442302
06/17/14 15:05
06/17/14 15:05
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Engine DLLs have the advantange that you can use all engine variables and functions in the DLL. Otherwise the standard C method with LoadLibrary is fine.


Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1