Hello
- devmode->dmSize = sizeof(DEVMODEW);
- devmode->dmSpecVersion = MAKEWORD(1,4);
- devmode->dmDriverVersion = MAKEWORD(1,4);
- devmode->dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod);
- devmode->dmSpecVersion = DM_SPECVERSION;
- devmode->dmDriverVersion = DM_SPECVERSION;
Wouldn't it be better to write *devmode->dmDeviceName=*dev_name instead of
memcpy(devmode->dmDeviceName, dev_name, sizeof(dev_name));
David