How to simulate the asynchronous scene of GetDefaultPrinter?

youqiang wu 21 Reputation points
2020-05-11T09:27:41.363+00:00

reference:
https://learn.microsoft.com/en-us/windows/win32/printdocs/getdefaultprinter

This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.

so how should i simulate the asynchronous scene of GetDefaultPrinter?

i try many times in my pc , it always return immediately!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,820 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,986 Reputation points
    2020-05-11T12:03:43.667+00:00

    Hi,

    Q&A currently supports the products listed in right-hand pane (more to be added later on).

    You can reach the experts in the Windows Desktop Development forum over here:
    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home

    (Please don't forget to mark helpful replies as answer).

    Best regards,
    Leon


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.