Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion
Kronus
Wanderer


Joined: 13 Jan 2002
Posts: 76
Location: USA

PostPosted: Wed Oct 27, 2004 5:53 pm   

Creating DLL's
 
I know this isn't really the place to be posting this, but I really don't know where else to ask it and since the Zugg community is the nicest community on the internet, I feel safe asking it here. So here it goes:

I want to be able to create DLL files to work with Zeus, zMUD, other programs, etc. I want to know what languages you can create DLL files in OTHER than C/C++, Visual Basic, Delphi, and .NET. Are there any other languages that can create DLL files, than the ones listed above? Such as Python, Perl, Java, etc.?

Thanks for your help!
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Wed Oct 27, 2004 6:47 pm   
 
Almost any language can create DLLs, because it's primarily a compiler directive. It's just a different target 'platform' you might say. DLLs are just executables without an entry point... there's no 'main()'. Just a bunch of functions. Almost any comprehensive compiler set will allow you to compile to a DLL.

As far as my personal experience and knowledge on the subject... nil. I've never made a DLL, or used many languages or many platforms, so I can't tell you any nitty-gritty details of which languages I *know* that can create DLLs. I can only comment on the general theory of the subject, hehe.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 28, 2004 2:47 am   
 
You need a *compiler*. If you have a compiler that can create a .EXE file, then there is probably an option for a DLL file.

Perl, Python, and Java are *interpreted* languages (or scripting languages) that do not produce an EXE file, so I don't think you can create any DLL file with these languages.

However, just creating a DLL file isn't really enough. It depends upon what you want to do with it. If you are trying to create a COM Object in a DLL file, then you need a compiler that supports this since there is a lot of different routines needed in the DLL to support a COM object, along with registration routines to set up the registry entries properly. Doing this "by hand" without direct support of the compiler is very hard.

If you are trying to create a DLL for a zMUD plugin (API based, not COM based) then you still need to create various entry points so that Windows knows that this is a proper DLL file. This is the type of DLL file that most compilers generate, so just following the instructions for the compiler should be good enough.

Basically, you need a compiler, and the compiler must be set up to specifically create DLL files. For example, older versions of Visual Basic could compile and produce an EXE file, but could not produce a DLL. Even the current version (not the .NET version) only creates ActiveX DLL files I believe, which are compatible with COM Object servers, but not for the DLL-based zMUD plugins.

Anyway, start with a compiled language, rather than a scripting language.
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Thu Oct 28, 2004 4:05 pm   
 
I was under the impression that there were compilers for many interpereted languages, even if those compilers created 'passthrough' executables. For example, I have a standalone .exe that was written in Perl. I know there are standalone executables that were written in Python... such as bittorrent. They both get decrypted and interpereted at runtime, but that doesn't prevent them from being decrypted and used as a DLL, if the compiler supports it.

In theory.

In practicality, you're likely right on all counts. :-)

Raven
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 28, 2004 4:27 pm   
 
No, the "passthrough" executables don't really count. As I mentioned, it's not just a matter of turning on a "DLL Flag" or something like that. The compiler needs to create the entry points into the DLL that would be needed for a COM object or API use. While it's theoretically possible for the compiler to create the API entry points for your functions, I don't know of any interpreted language like that which allows you to make COM object DLLs (ActiveX DLL). And I think the original poster was interested in reality rather than theory.

As an aside, I've looked into trying to allow people to create COM objects from within the Zeus/zApp scripting language and what I have found is that it's not too hard to create objects that could be re-used within Zeus internally, but it's not possible to create DLL files to make "real" COM objects from scripts.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Oct 28, 2004 9:05 pm   
 
Since I was looking for an easy way to do powerfull regular expressions in VB I did manage to come across this dll written in perl

http://jenda.krynicky.cz/VB/JendaRex.html
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 28, 2004 9:08 pm   
 
Cool! If you read towards the bottom of that link, you'll see:
Quote:
It was converted to an ActiveX DLL by PerlCtrl from Perl Dev Kit 4.1 by ActiveState

So it looks like there is a tool for converting Perl scripts into ActiveX DLLs. Thanks for the link, it's good to know that you can do this in Perl.
Reply with quote
Kronus
Wanderer


Joined: 13 Jan 2002
Posts: 76
Location: USA

PostPosted: Fri Oct 29, 2004 3:29 am   
 
You see this is why I post here, because I know I'm going to get expert advice and views (even theoretical ones Wink )

I've been doing alot of searching and I haven't come up with much, which is sort of surprising since Windows based programming, I would THINK, would be a very popular thing. Apparently not so much in the DLL side of it however. It is very interesting that you can create a DLL in Perl.

I like the idea of creating objects like that within Zeus/zAPP Zugg, I think it's a good way to go. Thanks again for all your input, everyone.
Reply with quote
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Fri Oct 29, 2004 3:35 am   
 
If only there was such a tool for java..i'd..i think i'd die of extacy
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net