在看一个设备驱动自带的例子时,需要两个dll文件,winport.dll和winplb.dll。我把它们放在C:\Winnt\下面。运行的时候,出现access violation 错误。
需要使用winplb这个dll中的函数,其中有一个是这样定义的:
int B_CreatePrn(int selection,LPCTSTR filename,int showdlg);
在程序中是这样的:typedef int (_stdcall *pfnB_CreatePrn)(int selection, LPCTSTR filename);使用时:B_CreatePrn(0, NULL);
我对dll调用没有概念,所以也不知道怎么改这个错误,请大家帮忙。出错是在winport.dll中,程序中也没有LoadLibaray它。