April 19, 2024, 01:03:37 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Class in a DLL?

Started by danbaron, April 29, 2009, 04:46:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

danbaron

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.
"You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump."  -  W.C. Fields

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

aurelCB


LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

aurelCB

Yes I agree with you Larry :)

danbaron

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.
"You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump."  -  W.C. Fields

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc


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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

aurelCB

Let me gues !

Select Answer
  Case 1
  b=true

  Case 2
  b=true

Endselect
::)

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

fasecero

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