[Winpcap-users] While testing Gianlucas winpcap3.1 [prerelease]...
Gianluca Varenni
gianluca.varenni at gmail.com
Tue Aug 2 18:06:52 GMT 2005
----- Original Message -----
From: "Marc Wetzel" <mwse at gmx.de>
To: <winpcap-users at winpcap.org>
Sent: Monday, August 01, 2005 11:28 PM
Subject: Re: [Winpcap-users] While testing Gianlucas winpcap3.1
[prerelease]...
> 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?
No. I said that WinPcap uses CoInitialize(NULL) (note the lack of the
trailing "Ex" in the function name), which corresponds to
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED).
Have a nice day
GV
> 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*.
>>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
More information about the Winpcap-users
mailing list