"John Harrison" <john_andronicus@hotmail.com> wrote in message
news:2jt2s3F152hj6U1@uni-berlin.de...[color=blue][color=green]
> >
> > ULONG* pnChars = 50; does not compile (int)
> >
> > ULONG* pnChars = 50.0; does not compile (double)
> >
> > ULONG* pnChars = 0; compiles but causes assertion failure when used in:
> >
> > if ( MyCRegKey.QueryStringValue(valName.c_str(), pszValue, pnChars) ==
> > ERROR_SUCCESS )
> >
> > MyCRegKey is an object instantiated from CRegKey -- a microsoft class[/color]
> that[color=green]
> > wraps the registry functions.
> >
> > for this QueryStringValue issue I think I'll just call one or more of[/color][/color]
the[color=blue][color=green]
> > registry functions directly, that should take care
> >
> > of things, it would be good to know how to handle this though.
> >[/color]
>
> Common newbie mistake. Just because a function takes a pointer argument it
> doesn't mean that you have to declare a pointer variable. Just declare a
> ULONG (no pointer) and use the address of operator.
>
> ULONG nChars;
> if ( MyCRegKey.QueryStringValue(valName.c_str(), pszValue, &nChars) ==
> ERROR_SUCCESS )
>
> john
>
>
>[/color]
yeah, that worked, thanks!
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---