Why not exported base class' member functions in DLL?

Discussion in 'C++' started by Allen, Jun 12, 2007.

  1. Allen

    Allen Guest

    I create a DLL project in VC6, exported some classes.

    class __descspec(export) CByteBuffer {
    public:
    INT8* GetCurrAddr(void);
    };

    class __descspec(export) CReadByteBuffer {
    void Wrap(CHAR *pBuffer, INT32 nLength);
    };

    And write a demo

    #include "ByteBuffer.h"
    #pragma comment(lib, "bytebuffer.lib");

    int main()
    {
    CReadByteBuffer readByteBuffer;
    readByteBuffer.Wrap(buffer, 1024);
    INT8 *pAddr = readByteBuffer.GetCurrAddr();
    }

    Using method in CReadByteBuffer is ok, but GetCurrAddr is unresolved.
    Why? Please help me. Thank you.
    Allen, Jun 12, 2007
    #1
    1. Advertising

  2. Allen

    Allen Guest

    On 6 12 , 2 27 , Allen <> wrote:
    > I create a DLL project in VC6, exported some classes.
    >
    > class __descspec(export) CByteBuffer {
    > public:
    > INT8* GetCurrAddr(void);
    >
    > };
    >
    > class __descspec(export) CReadByteBuffer {
    > void Wrap(CHAR *pBuffer, INT32 nLength);
    >
    > };
    >
    > And write a demo
    >
    > #include "ByteBuffer.h"
    > #pragma comment(lib, "bytebuffer.lib");
    >
    > int main()
    > {
    > CReadByteBuffer readByteBuffer;
    > readByteBuffer.Wrap(buffer, 1024);
    > INT8 *pAddr = readByteBuffer.GetCurrAddr();
    >
    > }
    >
    > Using method in CReadByteBuffer is ok, but GetCurrAddr is unresolved.
    > Why? Please help me. Thank you.


    I am sorry.
    I do implement GetCurrAddr method in ByteBuffer.cpp.
    It is mistaked to overwrite by version control.
    So stupid I am...

    Regards,
    Allen Chen
    Allen, Jun 12, 2007
    #2
    1. Advertising

  3. Allen

    BobR Guest

    Allen <> wrote in message...
    >
    > It is mistaked to overwrite by version control.
    > So stupid I am...


    If you learn from your mistakes, you are NOT stupid!! <G>

    --
    Bob R
    POVrookie
    BobR, Jun 12, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ivan Vecerina
    Replies:
    3
    Views:
    450
    Ivan Vecerina
    Aug 29, 2003
  2. Tony Johansson
    Replies:
    3
    Views:
    2,151
    Jack Klein
    Dec 16, 2004
  3. Siemel Naran
    Replies:
    4
    Views:
    783
    Micah Cowan
    Jan 12, 2005
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,736
    Smokey Grindel
    Dec 2, 2006
  5. NickGB
    Replies:
    0
    Views:
    252
    NickGB
    May 7, 2010
Loading...

Share This Page