John_M_Gough
November 19th, 2007, 02:55 PM
Hi. I have just learned how to make dll`s, that part was easy. the problem is when i create a header for loading the dll. functions were easy but classes and structures, lets say i had a struct like this for example (How it would look if i just used a header file and not a dll).
struct Times
{
public:
float ConstAmount;
Times(int Constent)
{
ConstAmount=Constent;
}
~Times()
{
Delete [] ConstAmount;
}
Float Go(float TimesBy)
{
return (ConsAmount*TimesBy);
}
Private:
}
How would i make a header file that loads this from the dll so it can be used as normal?.
and the same for this
enum Flags
{
FLAG1=1
FLAG2=10
}
the only other thing is #define SOMEHING 400, Can this be in the dll or can i only define these in the loader header file.
Thank You All For Your Time.
ps im using Dev C++
struct Times
{
public:
float ConstAmount;
Times(int Constent)
{
ConstAmount=Constent;
}
~Times()
{
Delete [] ConstAmount;
}
Float Go(float TimesBy)
{
return (ConsAmount*TimesBy);
}
Private:
}
How would i make a header file that loads this from the dll so it can be used as normal?.
and the same for this
enum Flags
{
FLAG1=1
FLAG2=10
}
the only other thing is #define SOMEHING 400, Can this be in the dll or can i only define these in the loader header file.
Thank You All For Your Time.
ps im using Dev C++