# Exporting Java global function in a Windows DLL

**URL:** https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050
**Category:** Iodine
**Created:** [January 1, 2020, 11:15am UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050 "2020-01-01T11:15:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![EugeneMayevski](https://talk.remobjects.com/user_avatar/talk.remobjects.com/eugenemayevski/32/11554_2.png) [@EugeneMayevski](https://talk.remobjects.com/u/EugeneMayevski)
#### Post date: [January 1, 2020, 11:15am UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050/1 "2020-01-01T11:15:28Z")

</div>

How do I mark the global functions in the Iodine to be exported? I have managed to generate a DLL, it does export a couple of (default Elements) functions, but none of my global functions, declared as public. Do I need some extra directive? I have checked the list of Iodine Keywords in the documentation, but have found none.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 1, 2020, 1:49pm UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050/2 "2020-01-01T13:49:59Z")

</div>

Eugene,

what platform is this, .NET or Island/Windows? And how do you want to access the exported functions – from a different Elements project, or with a different compiler?

On Island/Windows, you will want to use the [@DllExport](https://docs.elementscompiler.com/API/Aspects/DllExport/) aspect to mark globals as exported for see from non-Elements compilers, such as C/C++ or Delphi; From Elements, you should be able to access public globals as they are the referencing the `.fx` file for the `.dll`.

---

<div class="post-metadata">

### Author: ![EugeneMayevski](https://talk.remobjects.com/user_avatar/talk.remobjects.com/eugenemayevski/32/11554_2.png) [@EugeneMayevski](https://talk.remobjects.com/u/EugeneMayevski)
#### Post date: [January 1, 2020, 4:33pm UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050/3 "2020-01-01T16:33:45Z")

</div>

Thank you. It’s Island/Windows and the export is for use by third-parties, of course.

I tried @DllExport and things look better, but not completely: the functions got exported but with mangled names like ms\_t1d\_TestClassLibrary\_d\_\_\_\_\_Global10\_InitializeDriver . Is this the only possible name format?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 1, 2020, 6:44pm UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050/4 "2020-01-01T18:44:30Z")

</div>

I believe `@DllExport` and/or `@SymbolName` let you override the mangling and define your own public names. @ck?

---

<div class="post-metadata">

### Author: ![EugeneMayevski](https://talk.remobjects.com/user_avatar/talk.remobjects.com/eugenemayevski/32/11554_2.png) [@EugeneMayevski](https://talk.remobjects.com/u/EugeneMayevski)
#### Post date: [January 2, 2020, 10:25am UTC](https://talk.remobjects.com/t/exporting-java-global-function-in-a-windows-dll/21050/6 "2020-01-02T10:25:21Z")

</div>

Thank you, both @DllExport(“ProperName”) and @DllExport @SymbolName(“ProperName”) do the job.
