ermm...this code i took from here >> http://tutplusplus.blogspot.com/2011/04/c-tutorial-create-dll-in-vc-20102008.html

below is the code for the header file..

namespace nmspace
{
 class myclass
 {
 public:
  static __declspec(dllexport) void Crap();
 };
}

my ques is.....if i have a more than one function that need to be call...soo i can i put it like below:-

namespace nmspace
{
 class myclass
 {
 public:
  static __declspec(dllexport) void Crap();
  static __declspec(dllexport) void Crap1();
  static __declspec(dllexport) void Crap2();
  static __declspec(dllexport) void Crap3();
 };
}

above is only my example...i have more than one function that need to be call...soo...is the above is the right way to do it...

Recommended Answers

All 2 Replies

You can export the entire class without specifying individual methods like below code snippet. For more thorough explaination see this link

class __declspec(dllexport) Derived :
    public Base
{
    ...

};

tq ancient dragon...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.