Stefan Leichter Stefan.Leichter@camLine.com writes:
GetDefaultPrinterW breaks directly when namesize is a NULL pointer and GetDefaultPrinterA jumps to the end without. Where do is this pointer accessed when it is not vaild?
You are right, I missed the fact that the W function would fail which would cause the A one to bail too. Still it is very confusing, because in the A function you compute the size and allocate a buffer even though it's not going to be used. You should restructure this to make it clear what is happening.