[Winpcap-users] While testing Gianlucas winpcap3.1 [prerelease]...
Marc Wetzel
mwse at gmx.de
Tue Aug 2 06:28:19 GMT 2005
Gianluca,
the following code is copied out of the Delphi headerfile defining the
constants
for CoInitializeEx:
const
// flags passed as the coInit parameter to CoInitializeEx.
{$EXTERNALSYM COINIT_MULTITHREADED}
COINIT_MULTITHREADED = 0; // OLE calls objects on any thread.
{$EXTERNALSYM COINIT_APARTMENTTHREADED}
COINIT_APARTMENTTHREADED = 2; // Apartment model
{$EXTERNALSYM COINIT_DISABLE_OLE1DDE}
COINIT_DISABLE_OLE1DDE = 4; // Dont use DDE for Ole1 support.
{$EXTERNALSYM COINIT_SPEED_OVER_MEMORY}
COINIT_SPEED_OVER_MEMORY = 8; // Trade memory for speed.
as you see, 0 has the meaning of COINIT_MULTITHREADED
You said you initialize also to NULL?
Maybe we both are doing the same?
Regards
/Marc
Gianluca Varenni wrote:
>
> ----- Original Message ----- From: "Marc Wetzel" <mwse at gmx.de>
> To: <winpcap-users at winpcap.org>
> Sent: Monday, August 01, 2005 12:43 PM
> Subject: Re: [Winpcap-users] While testing Gianlucas winpcap3.1
> [prerelease]...
>
>
>>
>>>>
>>>> But you might remember, that I had trouble using winpcap3.1.b4/WAN
>>>> devices with Delphi,
>>>> because of some kind of COM initialization problems.
>>>> It only worked if I do a CoInitializeEx(NIL, COINIT_MULTITHREADED)
>>>> at the very start of the code.
>>>
>>>
>>>
>>> I know. This is one of the biggest headaches I had with WinPcap and
>>> NdisWan.
>>>
>> It really really only works if I set it to COINIT_MULTITHREADED (not
>> the other way around).
>
>
> Uhm, are you using Windows XP? If you are using the test dlls on my
> web pages (i.e. the latest build of the dlls, in practice) every
> attempt to open/list the wan adapters fails if COM has been
> initialized as COINIT_MULTITHREADED *on the same thread*.
>
More information about the Winpcap-users
mailing list