[PATCH] Fix 16 bit StringFromGUID2 to not use wide characters

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Mon May 19 06:12:34 CDT 2008


Am Montag, den 19.05.2008, 19:58 +0900 schrieb Dmitry Timoshkov:
> > +INT WINAPI StringFromGUID2_16(REFGUID id, LPSTR str, INT cmax)
> > +{
> > +  char xguid[80];
> > +  int           len;
> > +
> > +  if (WINE_StringFromCLSID( id, xguid ))
> > +  return 0;
> > +  
> > +  len = strlen( xguid ) + 1; /* The terminating zero counts */
> > +  if (len > cmax)
> > +        return 0;
> > +        
> > +  strcpy( str, xguid );
> > +  return len;
> > +}
> 
> This is not an equivalent of the old implementation, is it really
> supposed to fail if the buffer length is shorter than the guid?

http://msdn.microsoft.com/en-us/library/ms683893(VS.85).aspx
says so. I will test Microsoft's native implementation when I get around
to.

Regards,
  Michael Karcher

PS: is it possible to test 16 bit API function in the wine test suite? I
suppose not, as it should be compilable in a 32 bit Windows environment,
so we don't even have LoadLibrary16.




More information about the wine-devel mailing list