473,499 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why not exported base class' member functions in DLL?

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.

Jun 12 '07 #1
2 1808
On 6 12 , 2 27 , Allen <Allen.Che...@gmail.comwrote:
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

Jun 12 '07 #2

Allen <Al**********@gmail.comwrote 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
Jun 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1974
by: Luca | last post by:
Hi, I have a quite complex question to ask you: I have defined a base class where I would like to have a map holding pointers to member functions defined in derived classes. To be more precise...
23
5135
by: Fabian Müller | last post by:
Hi all, my question is as follows: If have a class X and a class Y derived from X. Constructor of X is X(param1, param2) . Constructor of Y is Y(param1, ..., param4) .
20
2846
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
5
4975
by: Dimitry | last post by:
I am trying to make the following: struct Base { char param; }; class Derived1 : public Base { public:
6
2809
by: noel.hunt | last post by:
I have a base class, PadRcv, with virtual functions. User code will derive from this class and possibly supply it's own functions to override the base class virtual functions. How can I test that...
12
2834
by: bgold | last post by:
Hey. I have a base class (SPRITE), and using this base class I have derived a large number of derived classes (PERSON, BULLET, MISSILE, etc.). Now, at a certain point in my program, I have a pair...
4
2669
by: =?Utf-8?B?SmVzc2ljYQ==?= | last post by:
Hi All, I know that I can use the GetProcAddress to get the proc address of a global exported function from a WIn32 dll. But if I have an exported class in the dll, is there a way to...
6
8132
by: Bhawna | last post by:
I am into c++ code maintenance for last 3-4 years but recently I am put into design phase of a new project. Being a small comapany I dont have enough guidance from seniors. Currently I am into a...
19
1900
by: Juha Nieminen | last post by:
Assume I have a class Base, and then this: struct Derived: public Base { AnotherClass member; }; Also assume that I'm allocating an object of type 'Derived' with a custom allocator and...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.