Hi, I'd be happy to help you out with your question. Sorry for the inconvenience caused. In regards to obtaining the print document name in the OEMEndDoc function, Unfortunately, this information is not directly available. However, you can use the information passed to the printer driver via the pwszDocName parameter in the OEMStartDoc function to identify the document name. You can save this value in a global variable or data structure when OEMStartDoc is called and then refer to it in OEMEndDoc to retrieve the print document name. Just keep in mind that OEMStartDoc is called once per print job, while OEMEndDoc is called once per printed page. Therefore, you should save the document name in a location that persists throughout the entire print job, such as a global variable or a shared memory segment. As for your question about handling multiple documents being printed at the same time, OEMStartDoc is called once per print job, and OEMEndDoc is called once per printed page. So, if multiple documents are being printed at the same time, the driver will receive multiple calls to OEMStartDoc and OEMEndDoc. It's up to the driver to manage any necessary state between these function calls. If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.