IonicWind Software

IWBasic => Object Oriented Programming => Topic started by: danbaron on April 29, 2009, 04:46:49 AM

Title: Class in a DLL?
Post by: danbaron on April 29, 2009, 04:46:49 AM
This question is for either E or Aurora.

QUESTION:
Can a class be put into a DLL?

ANSWER (choose one):
a. Yes.
b. No.
c. No comment.
Title: Re: Class in a DLL?
Post by: LarryMc on April 29, 2009, 05:47:39 AM
a.

Larry
Title: Re: Class in a DLL?
Post by: aurelCB on April 29, 2009, 10:14:48 AM
What a question ???
Title: Re: Class in a DLL?
Post by: LarryMc on April 29, 2009, 10:20:46 AM
Zlatko

He asked a very specific question and desired a specific answer. ;)

He doesn't appear to be interested in any details right now; which is fine.

Larry
Title: Re: Class in a DLL?
Post by: aurelCB on April 29, 2009, 10:36:39 AM
Yes I agree with you Larry :)
Title: Re: Class in a DLL?
Post by: danbaron on April 29, 2009, 03:16:39 PM
Hi Gang!

The reason I asked the question that way, was because I thought the answer would be "b.".

It seems to me, that being able to put one or more classes in a DLL, gives the environment a lot of flexibility, like the separate compilation of modules available in C, C++, and Fortran.

I tried approximately a million ways to do it in Aurora.

Each time the response was, paraphrasing, "ARE YOU SERIOUS?".

I would appreciate seeing how to do it in either E or Aurora.

Best wishes,
Dan.

QUESTION:
Will you show me how to put a class in a DLL?

ANSWER (choose one):
a. Yes.
b. No.
c. Undecided.
d. No opinion.
Title: Re: Class in a DLL?
Post by: LarryMc on April 29, 2009, 03:28:49 PM
Quote from: danbaron on April 29, 2009, 03:16:39 PM
I tried approximately a million ways to do it in Aurora.

Each time the response was, paraphrasing, "ARE YOU SERIOUS?".
Since this is only your 2nd post here I don't understand that comment.

Larry
Title: Re: Class in a DLL?
Post by: LarryMc on April 29, 2009, 03:39:32 PM

QUESTION 1:
Have you read the "Writing DLL's" section of the EBasic help manual?

ANSWER (choose one):
a. Yes.
b. No.

QUESTION 2:
Have you read the "Object Oriented Programming" section of the EBasic help manual?

ANSWER (choose one):
a. Yes.
b. No.

Larry
Title: Re: Class in a DLL?
Post by: aurelCB on April 29, 2009, 05:43:18 PM
Let me gues !

Select Answer
  Case 1
  b=true

  Case 2
  b=true

Endselect
::)
Title: Re: Class in a DLL?
Post by: LarryMc on April 29, 2009, 05:50:52 PM
Zlatko

Be nice. ;)

Larry
Title: Re: Class in a DLL?
Post by: fasecero on April 29, 2009, 11:16:27 PM
Quote
I tried approximately a million ways to do it in Aurora.

Each time the response was, paraphrasing, "ARE YOU SERIOUS?".

You must be talking about another forum, here I just found people ready to help:), here go a small example...



/*
Compile as a DLL target
*/

' export function
export Hello

' class declaration
CLASS MyClass
   DECLARE SayHello()
END CLASS

' class implementation
SUB MyClass::SayHello()
    PRINT "Hello World from the dll"
ENDSUB

' the export fuction
SUB Hello()
' we create an instance
MyClass mc
' and we use it
mc.SayHello()
ENDSUB





'console window example
'Compile for a CONSOLE target

$USE "YourDllName.lib"

DECLARE IMPORT, Hello()

OPENCONSOLE
' here we use the export function of the dll
PRINT Hello()

DO:UNTIL INKEY$ <> ""
CLOSECONSOLE

END