Hi Barbara,
>I was just thinking you might have meant that you were wondering if I was going to finish the DeviceCapabilities checking. Actually, I don't think I am. I'm currently checking that the printer has the paper bin that you're trying to set. Many of the other properties are checked via the BITAND function against the dmFields from the DEVMODE structure (i.e. duplex, orientation). For some, I'm not sure which constant to use for DeviceCapabilities, nor the length of the string for the buffer.
>
Sorry for jumping in. I think your class is great. The sample works fine too! Since you said you're not sure about the length of string, I've looked through your code for the buffer:
lnBuffer = 1024
lcIDBuf = REPLICATE(CHR(0), lnBuffer)
lnDCCnt = DeviceCapabilities(lcPrinterName, lcPort, tnValue, @lcIdBuf, 0)
I think the return value from the first call is correct. Can you tell a bit more why do you think it is not? What printer you use to test it?
Try to compare the return value from the first call with the second call. Both calls should return the same value
Regards
Herman