Wireshark-dev: Re: [Wireshark-dev] wireshark on 64 bit
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 4 Aug 2011 15:47:12 -0700
On Aug 3, 2011, at 2:39 AM, sagar Guledagudda wrote:

>>> From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of sagar Guledagudda
>>> Sent: den 3 augusti 2011 10:53
>>> 
>>> To: Developer support list for Wireshark
>>> Subject: Re: [Wireshark-dev] wireshark on 64 bit
>>> 
>>> Thanks that worked. i got the dll and tried to link it with wireshark wihch is running on 64bit machine. i am getting a linker error as " the procedure entry point dissector_delete could not be
>>> located in the dynamic link library libwireshark.dll. what may be the problem ?
>> 
>> On Wed, Aug 3, 2011 at 2:34 PM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:
>> Hi,
>> Dissector_delete has been deprecated and should be replaced by one of the following functions:
>> libwireshark.def:dissector_delete_string
>> libwireshark.def:dissector_delete_uint
>> libwireshark.def:heur_dissector_delete
>> libwireshark.def:ssl_dissector_delete
>>  
>> I suggest you run checkapi on your dissector.
>> Regards
>> Anders
> 
> But the signature of the function doesn't matches with the any of the function u have mentioned

The signature of dissector_delete() was

	void dissector_delete(const char *name, const guint32 pattern, dissector_handle_t handle);

The signature of dissector_delete_uint() is

	void dissector_delete_uint(const char *name, const guint32 pattern, dissector_handle_t handle);

which is exactly the same as that of dissector_delete(), so you're mistaken when you say the signature of dissector_delete() doesn't match any of the functions Anders mentioned.

> and if i remove that line it gives same error for dissector_add function.

So use dissector_add_uint() instead.

BTW, in 1.6 and the trunk, dissector_add() and dissector_delete() are macros that wrap dissector_add_uint() and dissector_delete_uint().  If you're not including epan/packet.h, those macros aren't defined, but if you're not including epan/packet.h, a whole bunch of functions aren't declared, so no formal arguments vs. real arguments checks are done, so you should make sure whatever source file that contains the code that is calling dissector_add() and dissector_delete() is including epan/packet.h.