Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Browsing workgroups Pin
Graham Bradshaw19-May-05 2:44
Graham Bradshaw19-May-05 2:44 
GeneralRe: Browsing workgroups Pin
badzio19-May-05 2:52
badzio19-May-05 2:52 
GeneralRe: Browsing workgroups Pin
ThatsAlok16-May-05 18:24
ThatsAlok16-May-05 18:24 
GeneralRe: Browsing workgroups Pin
badzio17-May-05 4:41
badzio17-May-05 4:41 
GeneralUsing DLL built on VC7 on VC6 application Pin
Julia116-May-05 3:17
Julia116-May-05 3:17 
GeneralCant get network printers through PRINTER_INFO_2 Pin
Member 173276816-May-05 2:56
Member 173276816-May-05 2:56 
GeneralRe: Cant get network printers through PRINTER_INFO_2 Pin
David Crow16-May-05 3:35
David Crow16-May-05 3:35 
GeneralRe: Cant get network printers through PRINTER_INFO_2 Pin
Member 173276816-May-05 3:53
Member 173276816-May-05 3:53 
I got it the problem was with the flag

DWORD Level = 2;    // specifies type of printer info structure<br />
	PRINTER_INFO_2 *printerInfo = 0;<br />
<br />
	DWORD numElems = 100;<br />
	DWORD sizeBuff = 0;<br />
<br />
	DWORD Flags = PRINTER_ENUM_CONNECTIONS | PRINTER_ENUM_LOCAL; //PRINTER_ENUM_LOCAL | PRINTER_ENUM_NETWORK;<br />
	LPTSTR Name = NULL;<br />
	<br />
	DWORD sizeNeeded;   // no. of bytes copied (or required)<br />
	DWORD numReturned;  // no. of printer info. structures copied<br />
<br />
printerInfo = new PRINTER_INFO_2[numElems];<br />
		sizeBuff = numElems * sizeof(PRINTER_INFO_2);<br />
		<br />
		BOOL qry = EnumPrinters(<br />
			Flags,          // types of printer objects to enumerate<br />
			Name,           // name of printer object<br />
			Level,          // specifies type of printer info structure<br />
			(unsigned char*)printerInfo, // pointer to buffer to receive printer info structures<br />
			sizeBuff,       // size, in bytes, of the buffer<br />
			&sizeNeeded,    // pointer to variable with no. of bytes copied (or required)<br />
			&numReturned    // pointer to variable with no. of printer info. structures copied<br />
			);

GeneralRe: Cant get network printers through PRINTER_INFO_2 Pin
David Crow16-May-05 4:34
David Crow16-May-05 4:34 
GeneralRe: Cant get network printers through PRINTER_INFO_2 Pin
Member 173276816-May-05 4:51
Member 173276816-May-05 4:51 
GeneralData Structure: Advice required Pin
Imtiaz Murtaza16-May-05 2:33
Imtiaz Murtaza16-May-05 2:33 
GeneralRe: Data Structure: Advice required Pin
Jack Puppy16-May-05 2:43
Jack Puppy16-May-05 2:43 
GeneralRe: Data Structure: Advice required Pin
David Crow16-May-05 2:45
David Crow16-May-05 2:45 
GeneralRe: Data Structure: Advice required Pin
Imtiaz Murtaza16-May-05 3:56
Imtiaz Murtaza16-May-05 3:56 
GeneralRe: Data Structure: Advice required Pin
David Crow16-May-05 4:00
David Crow16-May-05 4:00 
GeneralGetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
IlanTal16-May-05 1:37
IlanTal16-May-05 1:37 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
James R. Twine16-May-05 3:08
James R. Twine16-May-05 3:08 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
IlanTal16-May-05 3:14
IlanTal16-May-05 3:14 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
James R. Twine16-May-05 6:33
James R. Twine16-May-05 6:33 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
IlanTal16-May-05 19:35
IlanTal16-May-05 19:35 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
ucc80116-May-05 20:36
ucc80116-May-05 20:36 
GeneralRe: GetSystemMetrics(SM_CXVIRTUALSCREEN) Pin
ucc80116-May-05 20:37
ucc80116-May-05 20:37 
GeneralQT and Intellisense Pin
Sitaram Sukumar15-May-05 19:40
Sitaram Sukumar15-May-05 19:40 
GeneralRe: QT and Intellisense Pin
David Crow16-May-05 2:35
David Crow16-May-05 2:35 
GeneralRe: QT and Intellisense Pin
ucc80116-May-05 20:42
ucc80116-May-05 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.