我已设好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;
}