Original Post
hi all,
i have an interface class with those functions:
virtual iCamera* getCamera() = 0; virtual iWorldPosition* getWorldPos() = 0; virtual cMaterial* getMaterial() = 0; virtual iLight* getLight() = 0; virtual iVertexBuffer* getVB() = 0; virtual cTexture* getTexture() = 0; virtual iFont* getFont() = 0; virtual iRenderTarget* getRenderWindow(HWND hWnd) = 0; virtual cRenderTexture* getRenderTexture() = 0;i implement them in an dll: .h:
cTexture* getTexture();
iCamera* getCamera();
iWorldPosition* getWorldPos();
iVertexBuffer* getVB();
iLight* getLight();
cMaterial* getMaterial();
iFont* getFont();
iRenderTarget* getRenderWindow(HWND hWnd);
cRenderTexture* getRenderTexture(){return NULL;};
.cpp:
cTexture* cAdapterDX9_0::getTexture()
{return new cTextureDX9_0(this->D3Ddevice);}
iVertexBuffer* cAdapterDX9_0::getVB()
{return new cVertexBufferDX9_0(D3Ddevice);}
cMaterial* cAdapterDX9_0::getMaterial()
{return new cMaterialDX9_0();}
iCamera* cAdapterDX9_0::getCamera()
{return new cCameraDX9_0();}
iWorldPosition* cAdapterDX9_0::getWorldPos()
{return new cWorldPositionDX9_0();}
iFont* cAdapterDX9_0::getFont()
{return new cFontDX9_0(D3Ddevice);}
iLight* cAdapterDX9_0::getLight()
{return new cLightDX9_0();}
when i call this functions in one project it runs fine but in another (MFC)project it gives this debug error:
The value of ESP wa not saved across a function call. This is usually the result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. (module: chkesp.c)
other functions from the dll are working fine
thx in advance
[edited by - freaker13 on April 19, 2004 6:21:05 AM]