# How to use functions in DLL files on node red?

**URL:** <https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744>\
**Category:** General\
**Created:** [20 April 2023 13:43 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744 "2023-04-20T13:43:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Li](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mr_li/32/67089_2.png) [@Mr\_Li](https://discourse.nodered.org/u/Mr_Li)\
**Post date:** [20 April 2023 13:43 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/1 "2023-04-20T13:43:36Z")

</div>

How to use functions in DLL files on node red?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 April 2023 14:10 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/2 "2023-04-20T14:10:52Z")

</div>

That's extremely vague, and not a lot to go on.

But:

You cant "call" Node RED, or Node JS for that matter from other languages in a native manner.

What can be done, is setup a HTTP/Websocket Endpoint in Node RED, and use whatever framework you are using to make a connection to that endpoint.

Your flow should be designed to react accordingly.

Example:  
Creating a .NET dll to make a web reqeust to Node RED

```auto
string URI = "http://node-red:1880/api";

using (WebClient wc = new WebClient())
{
     wc.Headers[HttpRequestHeader.ContentType] = "application/json"
     string JSONResult = wc.UploadString(URI, "{key:value}");
}

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 April 2023 14:11 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/3 "2023-04-20T14:11:23Z")

</div>

Please clarify. Your subject says "call the DLL" your question says "How can I call node red when using a function in a DLL"

Which is it?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 April 2023 15:59 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/4 "2023-04-20T15:59:55Z")

</div>

> [@marcus-j-davies](#):
>
> HTTP/Websocket Endpoint

Or a TCP or UDP or even a PIPE.

Or use MQTT.

...

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 April 2023 16:19 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/5 "2023-04-20T16:19:54Z")

</div>

I have used named pipes often in .NET - works well, but needs careful structural work.

Working with .NET since its release ~2003 (I think), one thing I am certain of:  
Evan today its websocket support (or ease of use) lacks somewhat compared to other frameworks

---

<div class="post-metadata">

**Author:** ![Mr\_Li](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mr_li/32/67089_2.png) [@Mr\_Li](https://discourse.nodered.org/u/Mr_Li)\
**Post date:** [21 April 2023 01:06 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/6 "2023-04-21T01:06:50Z")

</div>

Sorry for the inaccurate expression, it has been modified

---

<div class="post-metadata">

**Author:** ![Mr\_Li](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mr_li/32/67089_2.png) [@Mr\_Li](https://discourse.nodered.org/u/Mr_Li)\
**Post date:** [21 April 2023 01:22 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/7 "2023-04-21T01:22:28Z")

</div>

Thank you for your reply

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 June 2023 01:22 UTC](https://discourse.nodered.org/t/how-to-use-functions-in-dll-files-on-node-red/77744/8 "2023-06-20T01:22:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
