# Calling dll funtions

**URL:** <https://discourse.julialang.org/t/calling-dll-funtions/25301>\
**Category:** General Usage\
**Created:** [June 14, 2019, 10:39am UTC](https://discourse.julialang.org/t/calling-dll-funtions/25301 "2019-06-14T10:39:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gabrielfreire](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gabrielfreire/32/8799_2.png) [@gabrielfreire](https://discourse.julialang.org/u/gabrielfreire)\
**Post date:** [June 14, 2019, 1:00pm UTC](https://discourse.julialang.org/t/calling-dll-funtions/25301/2 "2019-06-14T13:00:35Z")

</div>

Hi,

Since you are returning an array, try this

```julia
const CONNECT_SIZE = 2
connect = ccall((:function_name, "libfile"), stdcall, Ptr{NTuple{CONNECT_SIZE,Int32}}, ())
connect_ = unsafe_load(connect)
# then you will have to convert the NTuple to Array
connect_arr = collect(connect_)

```

Try to write your code between ``` like this

````nohighlight
```julia
some julia code
`` `< remove the space
or c++
```cpp
some c++ code
`` `< remove the space

````

---

_[View the full topic](https://discourse.julialang.org/t/calling-dll-funtions/25301)._
