[advapi32] QueryServiceConfig2 (2nd try)
Stefan Leichter
Stefan.Leichter at camline.com
Thu Jan 10 15:34:56 CST 2008
Am Thursday 10 January 2008 12:09 schrieb Alexandre Julliard:
> Stefan Leichter <Stefan.Leichter at camline.com> writes:
> > +#define MAP_STR(str) \
> > + do { \
> > + if (configW->str) \
> > + { \
> > + DWORD sz = WideCharToMultiByte( CP_ACP, 0, configW->str, -1,
> > p, n, NULL, NULL ); \ + if (!sz) { \
> > + FIXME("WideCharToMultiByte failed for configW->%s\n",
> > #str ); \ + ret = FALSE; \
> > + goto cleanup; \
> > + } \
> > + configA->str = p; \
> > + p += sz; \
> > + n -= sz; \
> > + } \
> > + else configA->str = NULL; \
> > + } while (0)
> > +
> > + switch(dwLevel) {
> > + case SERVICE_CONFIG_DESCRIPTION:
> > + { LPSERVICE_DESCRIPTIONA configA =
> > (LPSERVICE_DESCRIPTIONA) buffer; + LPSERVICE_DESCRIPTIONW
> > configW = (LPSERVICE_DESCRIPTIONW) bufferW; + p =
> > (LPSTR)(configA + 1);
> > + n = size - sizeof(SERVICE_DESCRIPTIONA);
> > + MAP_STR(lpDescription);
> > + }
>
> That's ugly, please get rid of that macro.
I call it "prepaired for the other six levels" ;-)
ChangeLog
---------
partly implemented QueryServiceConfig2A/W
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QueryServiceConfig2.diff
Type: text/x-diff
Size: 12027 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080110/66aead33/attachment-0001.diff
More information about the wine-patches
mailing list