Jump to content
DeadlineX

resourcestring declaration works stangely in Delphi DLL

Recommended Posts

Hi, all,

I've created a DLL, where resourcestrings are used. Everything works in Debug target, but it doesn't work when I compile the project for Release target.

I've checked compiler and linker options and can't find anything suspicious. The string is a junk when I run my DLL project (with a host app) in Release target

What is it and is there any solution?

Now I simply changed resourcestring to const declaration, but it looks a bit ugly.

 

Lokks like the probkem is in HINST variable or something like that Yet I could understand it, but why it doesn't work in Release target only?

 

I use XE7 x64 complation.

 

Thank you in advance.

Share this post


Link to post

Welcome to forum!

I am no clairvoyant and I assume nobody here is.

So without showing anything how you do, what you think we can say?

Watch line 123 there at call xyz you did something wrong?!

Best practice would be a small demo zipped that shows us what you do and how you try to achieve that.

  • Like 1

Share this post


Link to post

I'm so sorry. looks like the trouble source was outside of Delphi. It was in a wrong Win10 locale settings.

There is such checkbox "Beta version: Use Unicode (UTF-8) to support language around the world".

(It's my translation, don't know how it looks in English really)

This checkbox was set for some reason, and it changed ALL non-utf8 text files automatically to look like if they had UTF8 prefix at the beginning.

Therefore not only this "resourcestring" definitions unit, but all ANSI encoded files were broken.

Don't know what was the idea, but it's completely wrong.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×