Difference between 32/64 bit Unicode-only content plugins

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Difference between 32/64 bit Unicode-only content plugins

Post by *Lefteous »

While converting a plugin to Unicode-only I noticed that it's okay to remove ContentGetValue from the list of exported functions when compiling to 64 bit. For the 32 bit version this will result in very strange errors over and over - especially in the following scenario discovered while testing.

1. Install plugin in the 64 version of TC.
2. Start the 32 bit version of TC using shared ini file (so plugin is already correctly installed).
3. Do something with the plugin -> crash

Not really a big deal but maybe you can remove this inconsistent behavior by eleminating the need for ContentGetValue in 32 bit or at least handle the resulting errors described above.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Since all 64-bit operating systems are Unicode, there is no need for ANSI functions at all. Therefore the 64-bit plugin may be Unicode only (or ANSI only).

However, the 32-bit plugin MUST support the ANSI functions. Only exception: If you create separate ANSI and Unicode versions (with the Unicode version having extension .u*), the the Unicode version does not need the ANSI functions.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
I know the way it works currently. I agree it's really better to support ContentGetValue if a Windows 9x user starts the plugin.
Anyway the current error handling is really 'improvable'.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I agree that it shouldn't crash, it should check if function may be exported from library before calling it.
Post Reply