I need to get the available supported printer document features for a particular printer through the win32 api.
The options I’m referring to are displayed for a sample printer in the image below. You can get this dialog by right clicking the printer icon and the click preferences, and the clicking the advanced tab in the dialog.
Can anyone tell me the need api i need to call, and in what other?
I am targeting Windows Windows XP+ and using vb6.
What I think you are looking for is
DeviceCapabilitiesfrom winspool.drv. Sample code from Microsoft. Most of the documentation online now days is for .Net, So I typed in the VB6 definition from Dan Appleman’s Visual Basic Programmer’s Guide to the Win32 APIThe declaration for VB6 is:
Based on your Comment you would need to use
DocumentPropertiesit can be used to retreive or modify aDevModeStructure. It may or may not have what you are looking for. Your best bet would be to get the above book, Chapter 12 has wealth of information. Also looking at your picture it looks like you are using somesort of a POS print, you should consult the manufacturers documentation about specific api’s that the printer might support.DevMode Structure