[comp.windows.ms.programmer] What's The Deal with EXTDEVICEMODE

rdthomps@vela.acs.oakland.edu (Robert D. Thompson) (06/10/91)

	Has anyone out there worked with ExtDeviceMode() before.

	The usage is pretty unclear from the SDK Manuals, in Vols 1 and 2
	and in the Guide To Programming.

	I want to get the printer device initialization info.  To do this
	I need to load the driver and get the procedure
	address "ExtDeviceMode" in the driver library.  Then I call 
	ExtDeviceMode with wMode set to 0 and get the required # of
	bytes for the buffer that will contain the device info.

	The problem is when I try to call ExtDeviceMode the second time
	with wMode as DM_COPY.  I call it as such,

  (lpfnEDM)(hWnd,hDriver,lpNew,"PostScript Printer","LPT1:",NULL,NULL,DM_COPY);

	But then I get the 'ol UAE-Screw >:(

	Of course, lpNew is where I think the problem is.  But I have tried
	allocating this as LPSTR with the required size, and as DEVMODE*size.

	Maybe someone that has worked with this before can help.

	Thanks in advance.

	Regards |(8>
---
Robert
rdthomps@vela.acs.oakland.edu