On Mon, 5 Jun 2000, Bradley Baetz wrote:

> Francois Gouget wrote:
> > 
> > On Sat, 3 Jun 2000, Bradley Baetz wrote:
> 
> > 
> > > Also, is there a reason that you
> > > typedef'd HDRAWDIB in vfw.h, rather than using the macro in windef.h? I
> > > just copied everyone else, so I'm quite sure I've missed something
> > > somewhere. Some of the HANDLE types are typedef'd in windef.h.
> > 
> >     Yes, most of the HANDLE declarations are done in windef.h but I
> > don't really understand why. Since HDRAWDIB is a type specific to vfw it
> > seems to make sense to declare it there.
> 
> How does windows do it? The macro also creates pointer types, which
> aren't used by any of the VFW API calls, but I suppose may be useful.

    For HDRAWDIB they use a typedef which is not how they do it for all
the other handles. Anyway, if they do it this way it means I should
probably leave it as is :-(


> [MCIWndCreate]
> >     I guess they don't. When I say that the DLL had three APIs I checked
> > with windows and saw that they do use the usual macro for MCIWndCreate.
> > So I assume that they create MCIWndCreate first and then realized that
> > it should really have an A and a W version, added those but did not
> > remove the original one to not cause compatibility problems.  So I
> > assume one is not supposed to use the old one anymore.
> >     Of course if one really wants to use the old one all one has to do
> > is to use GetProcAddress.
> > 
> Ah. So one is a compatability call then? I didn't realise that. In that
> case those changes should be OK. The original one takes an LPVOID as the
> last parameter, while the other two take an LPC{,W}STR. The win3.1 docs
> I have list that function as taking an LPSTR as the last parameter,
> though.

    I guess this is what happened. They forgot to split it to A/W when
they switched to Win32. So after they had to keep it with for
compatibility. But what type should they give it: LPCSTR or LPCWSTR. In
fact their doc says it automatically detects which case they are in and
call the proper A/W function. This is why they have put an LPVOID: 
because it can be either LPCSTR or LPCWSTR. 


--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
            Before you criticize someone, walk a mile in his shoes.
       That way, if he gets angry, he'll be a mile away - and barefoot.

Reply via email to