> This is the line of code I had implemented.
>
> if(!AddPrinterConnection(xxx)) {
> DWORD lastError = GetLastError();
> ...
> ...
Assuming that the code is as wriiten above then that is the correct way to
do it.
> Do you think if I continue on and ignore this error it may work.
I doubt it.
> Any idea if there is a way to check if pending IO is currently
> in progress and when it finishes.
Well, the initiator of the I/O can, but you can't because you don't have the
device handle or the "overlapped" structure or any other useful information
about the operation in progress.
I wish I had something good to tell you but I don't. In fact, there may not
even be I/O in progress. It is possible that the implementation has already
waited on the operation to complete but no subsequent operation has reset
the thread's last error code.
It might be a bug in a driver or something (wild a__ speculation on my
part). You might want to post again in a GDI group and hope for a more
definitive reply.
Regards,
Will
Afterburn - 06 Oct 2004 16:03 GMT
Hi Will,
Thanks for the info below. I think alright it's a bit of hit and miss
to try and pinpoint it down to why it could be happing. I did try
ignore the error and continue on anyway and as you say below this
didn't work, long shot I know :)
I'll post the message in one of the GDI groups and will post any
updates to this message if I get any additional info.
Thanks again,
A.B.
>> This is the line of code I had implemented.
>>
[quoted text clipped - 28 lines]
>Regards,
>Will