我已设好WINSPOOL.h的路径和引入winspool.lib包,在VC.net下编译没问题,在VC6下会出现上面的出错信息。我也已在stdafx.h中去掉#define WIN32_LEAN_AND_MEAN
程序如下:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
char *name=new char [255];
DWORD size=255;
GetDefaultPrinter(name,&size);
return 0;
}
程序如下:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
char *name=new char [255];
DWORD size=255;
GetDefaultPrinter(name,&size);
return 0;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货