[Winpcap-users] While testing Gianlucas winpcap3.1 [prerelease]...

Marc Wetzel mwse at gmx.de
Tue Aug 2 06:28:19 GMT 2005


the following code is copied out of the Delphi headerfile defining the 
for CoInitializeEx:
  // flags passed as the coInit parameter to CoInitializeEx.
  COINIT_MULTITHREADED      = 0;      // OLE calls objects on any thread.
  COINIT_APARTMENTTHREADED  = 2;      // Apartment model
  COINIT_DISABLE_OLE1DDE    = 4;      // Dont use DDE for Ole1 support.
  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?


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