Modules for win32?
Modules for win32?
Unfortunately, due to circumstances slightly beyond my control(lack of a second box and lack of a nic that's supported in linux), I can't use the linux build of Unreal. Are there any modules developed for the Win32 build of Unreal, and if so, where can I find some? I've tried googling and came up with nothing.
-
- Former UnrealIRCd head coder
- Posts: 811
- Joined: Sat Mar 06, 2004 8:47 pm
- Location: United States
- Contact:
That works great for having the exe call functions in the dll, but not for the other way around. Under *nix, we specify --export-dynamic and it exports all the ircd's symbols so that the .so can read them. MSVC has no such equivilent. Therefore, it means we have to go through and _manually_ set _every_ variable and function in Unreal to __declspec(dllexport) and then build an import library for the .dll to link with. It can be done, yes, but it is a major pain to do.
-- codemastr
don't you use the extern identifier on the vars and functions that you would export?
if so:
Or just make a .DEF file to export them.
if so:
Code: Select all
#define extern __declspec(dllexport) extern
-
- Former UnrealIRCd head coder
- Posts: 811
- Joined: Sat Mar 06, 2004 8:47 pm
- Location: United States
- Contact:
It still has to be added to each and every file along with an accompanying #undef extern at the end of the file to prevent it from spilling into any system headers. Not to mention, not all of them are extern. Again a difference, in *nix they don't have to be.
And making a .def doesn't help at all, in fact it is at least 5x harder! Now I have to go through each file and make a list of every function and variable Unreal uses. Not only that, each time we add a new function we have to be sure to add an entry to the .def file.
And making a .def doesn't help at all, in fact it is at least 5x harder! Now I have to go through each file and make a list of every function and variable Unreal uses. Not only that, each time we add a new function we have to be sure to add an entry to the .def file.
-- codemastr
Can you put __declspec(dllexport) on a namespace?
Something like this?
If that works, all that will happen is the generation of some not-so-nice C++ export names (unless you can extern "C" on or inside a namespace).
Something like this?
Code: Select all
#ifdef __cplusplus
__declspec(dllexport) namespace UnrealIRCd {
#endif
// Contents
#ifdef __cplusplus
};
#endif
Have you ever checked the wIRCd with Dependency Walker? I did, because I have Visual Studio, and I noticed the ircd did have some exports:
Here's a clip from a savefile that had the import/export lists:
Of course, this looks like the stuff that would have come from the commands module... but still, there are some exports. Would this mean that a DLL module could invoke commands directly, for example?
Here's a clip from a savefile that had the import/export lists:
Code: Select all
[ ] WIRCD.EXE
Import Ordinal Hint Function Entry Point
------ ------------ ------------ ------------------- -----------
Export Ordinal Hint Function Entry Point
------ ------------ ------------ ------------------- -----------
[C ] 1 (0x0001) 0 (0x0000) htm_config_run 0x000019D8
[C ] 2 (0x0002) 1 (0x0001) htm_config_test 0x00001230
[C ] 3 (0x0003) 2 (0x0002) htm_stats 0x00001839
[C ] 4 (0x0004) 3 (0x0003) m_adminchat_Init 0x00001131
[C ] 5 (0x0005) 4 (0x0004) m_adminchat_Load 0x0000108C
[C ] 6 (0x0006) 5 (0x0005) m_adminchat_Unload 0x00001DA7
[C ] 7 (0x0007) 6 (0x0006) m_admins 0x00001276