想从DLL外部传入一个用于绘图设备的句柄,然后在dll内向该设备绘图,按照原来帖子的说法来做
dll中:
void draw(CDC *pDC)
{
pDC->.......
}
应用程序中
CDC *pDC=GetDC();
draw(pDC);
结束时会产生下面的错误
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
不知道是什么问题?
刚刚入门,希望大家能够指点一下
谢谢
dll中:
void draw(CDC *pDC)
{
pDC->.......
}
应用程序中
CDC *pDC=GetDC();
draw(pDC);
结束时会产生下面的错误
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
不知道是什么问题?
刚刚入门,希望大家能够指点一下
谢谢
改成了typedef void (__stdcall * LPFNDLLFUNC1)(CDC*,COLORREF);就可以了。
谢谢orbit(走了走了)
在这个帖子的留言
http://topic.csdn.net/t/20050201/17/3769168.html