[comp.windows.ms.programmer] PLEASE HELP - EXTDEVICEMODE FAILING ON SECOND CALL !!!

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

Someone,

	I have been trudging around with ExtDeviceMode for a while,
	and I am finally getting some results.  However, I have
	run into another wall.

	The problem is this,

	I want to be able to change the device specific settings
	of a printer connected to a given port on-demand.  To
	do this, I use the ExtDeviceMode function in the appropriate
	driver.

	I have got this to work, following the sometimes error-ridden
	and ambiguous instructions of the SDK Manuals.

	I load the driver, get the procedure instance of ExtDeviceMode,
	get the required size of the structure, etc. etc.

	It works the first time!!!

	I fill the DEVMODE structure with the needed info and it
	sets the WIN.INI appropriately.

	However, the second time I call it, it does not change the
	settings.  In fact, it only changes "feed1=0" and that's it!

	I check the contents of the structure each time, and they
	remain exactly the same.  Everything remains the same - it
	just does not work after the first try.  If I reboot or
	quit Windows, it will again work on the first try.

	Does anybody have a clue why the driver is failing to
	change the settings the second time around???

	OR HAS MS "STRATEGICALLY" LEFT SOMETHING OUT OF THE
	MANUALS AGAIN (or maybe it there is just a mistake)!

	Any help would be appreciated.

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