question

youqiangwu-6561 avatar image
0 Votes"
youqiangwu-6561 asked saldana-msft edited

How to simulate the asynchronous scene of GetDefaultPrinter?

reference:
https://docs.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-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLaude avatar image
0 Votes"
LeonLaude answered youqiangwu-6561 commented

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


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.