my next task was to fix this eheh.
i think it would make more sense to just change

if(!params->PathBuffer && !params->PathBufferSize)

to

if(!params->PathBuffer)

as it was talked about in irc, it doesn't make much sense to check for pathbuffersize when pathbuffer is null...
the max_path removal was a mistake from following msdn documentation :\

2009/3/22 James Hawkins <truiken@gmail.com>
---
 dlls/setupapi/dialog.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)