Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for loop error #2

Open
httpszhengshu opened this issue May 24, 2023 · 0 comments
Open

for loop error #2

httpszhengshu opened this issue May 24, 2023 · 0 comments

Comments

@httpszhengshu
Copy link

httpszhengshu commented May 24, 2023

// Loop over printers
for (DWORD i = 0; i < pcbReturned; i++)
{
	printerInfo = &pPrinterEnum[i];

	printf("[*] Using printer: %s\n", printerInfo->pPrinterName);

	// Open printer
	res = OpenPrinterA(printerInfo->pPrinterName, &hPrinter, NULL);
	if (!res)
	{
		puts("[-] Failed to open printer");
		continue;
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant