PDA

View Full Version : What do i need to create a simple DLL for AMS?


Wonderboy
03-10-2006, 07:15 AM
Hello guys
i would like to be able to learn how to create a simple dll and since i dont have Vb i would like to know what i could use to create a simple dll and how a simple dll would be created,
the reson i would like some help with this is so that i can start to make my own dlls for AMS,

Worm
03-10-2006, 07:46 AM
VB would be a bad choice in that it requires runtime files. If you want to be serious about developing for AMS, C++ is the #1 way to do it. The SDK on the forums is geared toward MS Visual C++.

However, I've been creating DLLs for AMS since version 4, and I've used different platforms to do so: PowerBasic (very VB like), and PureBasic are my favorite "fun" platforms. You didn't ask, but I'd stear you toward PureBasic. It's relatively inexpensive, a little quirky in syntax, but fairly powerful. The only thing I would suggest you do is read the license agreement carefully especially when it comes to wrapping PureBasic commands for a DLL.

Mina
03-10-2006, 08:27 AM
Hi worm, do u mind sending me a simple PureBasic (*.pb/*pbi/*.pbv) Project ?
TIA

Mina

Worm
03-10-2006, 08:33 AM
Not at all. I'll dig one up when I get home and post it here.

Wonderboy
03-10-2006, 08:34 AM
Thanks Worm, ive tried out some of your plugins and that is really the reason i got inspired to create my own dlls , i am checking out the suggestions that you provided me with, and PureBasic sounds interesting, fairly good priced,
i allso understand now that Vb dont use standar dlls and but active X dll, so that would make it pretty difficult to create a dll for use with AMS if i understand it correctly,
thanks again! Worm il check and read more about these choices and see what fits me best:yes

Wonderboy
03-10-2006, 08:43 AM
I am dowloading the demo for Purebasic at the moment, great idea to post the sample here Worm,
thanks

Brett
03-10-2006, 08:59 AM
I wrote an article here:

Making a Lua 5.0 Extension DLL with lcc-win32 (http://www.icynorth.com/development/lua50modulelcc.html)

That shows how to make a Lua extension DLL using the free lcc-win32 C/C++ compiler. If you know your C, this is a free and relatively easy way to do it.

I also wrote an article a while back about how to make a simple DLL using Visual C++ 6.0:

How to Create a Simple Win32 DLL (http://www.icynorth.com/development/createdlltutorial.html)

Wonderboy
03-10-2006, 09:05 AM
Thanks for these Brett, Il have a look at them

Intrigued
03-10-2006, 04:22 PM
Worm turned me onto PureBasic and now they about to release (beat 6 is going on now, or it was as of last night) PB 4.0. The syntax is a bit different, so if you are looking to work with PB seriously I would delve right into PB 4.x. Plus, you get free lifetime updates when you buy from their Website.

There are lots of librarys, plugins for such as well. Some are more reliable than others, remember, most are free.

Check out not only PB's Website but http://purearea.net/pb/english/index.htm (amongst others).

I do wish their forums were easy to search. It seems to be a bit tricky to get the right search you need, even if using boolean operatives,etc.

But, there is a good crew there as well of diehards that are willing to share some code.

:yes

ps. I still use AMS for my primary application design environment. When I think R.A.D. (Rapid Application Design), I have always for two years now thought first of AMS!

bobbie
03-10-2006, 04:50 PM
PureBasic is cool .
I made a winamp dll with it one time.

bule
03-11-2006, 05:57 AM
ps. I still use AMS for my primary application design environment. When I think R.A.D. (Rapid Application Design), I have always for two years now thought first of AMS!

I heard Clarion 6 is also good at this.. not as nice as APMS, but it
very good for database related applications, such as accounting...

Worm
03-23-2006, 07:21 PM
Okay, better late than never right? I lost a lot of code in a HD crash a while back and I can't find a thing anymore.

Anyhow. This is as simple as it gets. This DLL accepts 3 parameters: 2 numbers, and a string. This should show you how to pass the variable types that you can pass from AMS.

PureBasic Code

ProcedureDLL.s AddNumbers(Number1.l, Number2.l, UserPrompt.s)
sOut.s = UserPrompt
Sum.l = Number1 + Number2
ProcedureReturn UserPrompt + " " + Str(Sum)
EndProcedure

Corey
03-23-2006, 07:31 PM
I lost a lot of code in a HD crash a while back and I can't find a thing anymore.

YOWCH! :eek:

Worm
03-23-2006, 07:43 PM
yeah, plumbers faucet drips scenario :o

Corey
03-23-2006, 08:18 PM
Man I feel for you. I got lucky. I was playing fast and loose with my data for a few years and got away with it. Now I back up though. This Iomega external firewire drive is the best investment I ever made. Cheap, reliable, and surprisingly fast. Handy too, you can unplug it and take it with you.

Worm
03-23-2006, 09:17 PM
That's my solution too now. That and SyncBack and I'm all set :)

Intrigued
03-24-2006, 03:49 AM
I just purchased Ghost 10 and use my DATASTOR unit for backups.

:yes

bobbie
03-29-2006, 12:02 PM
You use lcc-win32 and it is free.
http://www.cs.virginia.edu/~lcc-win32/