I don't think you need separate export to register classes. As a test create your own dll with such export, and see if it's called from test exe when some referenced class name is requested, as far as I remember this was only used in early versions.
On Sonntag, 22. Oktober 2017 01:20:43 CEST Nikolay Sivov wrote:
I don't think you need separate export to register classes. As a test create your own dll with such export, and see if it's called from test exe when some referenced class name is requested, as far as I remember this was only used in early versions.
Well, I don't know if it's currently still used on windows, but according to my tests it still works. You can use that function to make comctl32 register one of its classes, for example "Combobox" as "6.0.7601.17514!Combobox".
The other ways I found to make comctl32 register its classes (all of them at once) is to call GetClassInfoExW or CreateWindowExW with windows class WC_BUTTONW/WC_COMBOBOXW/etc. Don't know that internally works though, just loading the library is not enough for it to register its classes, somehow comctl32 needs to be told when to register its classes. Is it a bad idea to use this function for this purpose? AFAIK it's introduced after XP, and is used to register the redirected classes. Correct me if I'm wrong though.
Honestly, I'm not sure if they want custom dlls to export such a function, but it might be possible it's used in comctl32. I'll try to make an own side-by- side dll to test that.
Regards, Fabian Maurer
On 22.10.2017 2:53, Fabian Maurer wrote:
On Sonntag, 22. Oktober 2017 01:20:43 CEST Nikolay Sivov wrote:
I don't think you need separate export to register classes. As a test create your own dll with such export, and see if it's called from test exe when some referenced class name is requested, as far as I remember this was only used in early versions.
Well, I don't know if it's currently still used on windows, but according to my tests it still works. You can use that function to make comctl32 register one of its classes, for example "Combobox" as "6.0.7601.17514!Combobox".
The other ways I found to make comctl32 register its classes (all of them at once) is to call GetClassInfoExW or CreateWindowExW with windows class WC_BUTTONW/WC_COMBOBOXW/etc. Don't know that internally works though, just loading the library is not enough for it to register its classes, somehow comctl32 needs to be told when to register its classes. Is it a bad idea to use this function for this purpose? AFAIK it's introduced after XP, and is used to register the redirected classes. Correct me if I'm wrong though.
You can probably register them all on load.
Honestly, I'm not sure if they want custom dlls to export such a function, but it might be possible it's used in comctl32. I'll try to make an own side-by- side dll to test that.
Regards, Fabian Maurer
You can probably register them all on load.
I just tested it, it doesn't work like that. You get a ERROR_PROC_NOT_FOUND when calling CreateWindow, because it tries to call RegisterClassNameW.
Finally managed to create an own side-by-side assembly, I attached it. It consists of one executable and one dll, compiled and created with codeblocks under windows 7, also tested in windows 7. I included pre-compiled binaries, but you'll need to run it from the explorer not codeblocks, because the paths must be right.
Do we want this included into wine in some way? I hope this is good enough (and that it compiles on your system).
Regards, Fabian Maurer