# Windows Xojo 2022 plugin tutorial - video and code

**URL:** <https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281>\
**Category:** Plugins\
**Created:** [July 21, 2022, 9:06pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281 "2022-07-21T21:06:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene\_Dakin](https://forum.xojo.com/user_avatar/forum.xojo.com/eugene_dakin/32/178_2.png) [@Eugene\_Dakin](https://forum.xojo.com/u/Eugene_Dakin)\
**Post date:** [July 21, 2022, 9:06pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/1 "2022-07-21T21:06:34Z")

</div>

This video and github code is in response to being asked for an updated example to create a Windows plugin for Xojo 2022 r1.1 using Visual Studio 2022.

This example shows how to make a plugin with a module that adds two numbers together.

Step-by-step instructions are included in the [Youtube Plugin Video](https://youtu.be/3IFFxURbbTA) and all code can be downloaded at [Eugene’s Github](https://github.com/eugenedakin/2022XojoPlugin)

 ![PluginScreen](https://forum.xojo.com/uploads/default/original/2X/4/4fa6790cf7c10f0a67a96c0837ab5dfd54ae8f6f.png)

---

<div class="post-metadata">

**Author:** ![brian\_franco](https://forum.xojo.com/user_avatar/forum.xojo.com/brian_franco/32/156_2.png) [@brian\_franco](https://forum.xojo.com/u/brian_franco)\
**Post date:** [July 21, 2022, 9:29pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/2 "2022-07-21T21:29:18Z")

</div>

Much Appreciated

Will watch This weekend 😃

---

<div class="post-metadata">

**Author:** ![Gilles\_Plante](https://forum.xojo.com/user_avatar/forum.xojo.com/gilles_plante/32/667_2.png) [@Gilles\_Plante](https://forum.xojo.com/u/Gilles_Plante)\
**Post date:** [July 21, 2022, 9:36pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/3 "2022-07-21T21:36:43Z")

</div>

That looks so simple, but I guess if one tries to create controls, it will be quite complicated 🤔.

---

<div class="post-metadata">

**Author:** ![Eugene\_Dakin](https://forum.xojo.com/user_avatar/forum.xojo.com/eugene_dakin/32/178_2.png) [@Eugene\_Dakin](https://forum.xojo.com/u/Eugene_Dakin)\
**Post date:** [July 21, 2022, 9:44pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/4 "2022-07-21T21:44:24Z")

</div>

When creating the video, there were errors that occurred when compiling the plugin in Visual Studio 2022. I kept the errors in the video and showed work-arounds. This provided a few ‘what-if’ scenarios when troubleshooting a plugin. 🙂

---

<div class="post-metadata">

**Author:** ![brian\_franco](https://forum.xojo.com/user_avatar/forum.xojo.com/brian_franco/32/156_2.png) [@brian\_franco](https://forum.xojo.com/u/brian_franco)\
**Post date:** [July 21, 2022, 9:55pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/5 "2022-07-21T21:55:06Z")

</div>

@Eugene_Dakin

I remember calling into a Windows DLL I created with a plain C compiler.  
I did not try and create a plugin but was able to call the functions in the DLL. That was a few years back but I believe I still have the DLL and info, I will check tonight and if i find it I will post it here for others to give a try

---

<div class="post-metadata">

**Author:** ![Björn\_Eiríksson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/da6949/32.png) [@Björn\_Eiríksson](https://forum.xojo.com/u/Bj%C3%B6rn_Eir%C3%ADksson)\
**Post date:** [July 21, 2022, 11:42pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/6 "2022-07-21T23:42:10Z")

</div>

Your creating memory clobbering issues.

If your declaration is x as Integer then the C method needs to be RBInteger x, not int x.

You will get away with it on some platforms but not all.

---

<div class="post-metadata">

**Author:** ![Eugene\_Dakin](https://forum.xojo.com/user_avatar/forum.xojo.com/eugene_dakin/32/178_2.png) [@Eugene\_Dakin](https://forum.xojo.com/u/Eugene_Dakin)\
**Post date:** [July 21, 2022, 11:56pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/7 "2022-07-21T23:56:32Z")

</div>

Thank you Bjorn. I will update the code and video later.

Much appreciated

---

<div class="post-metadata">

**Author:** ![Eugene\_Dakin](https://forum.xojo.com/user_avatar/forum.xojo.com/eugene_dakin/32/178_2.png) [@Eugene\_Dakin](https://forum.xojo.com/u/Eugene_Dakin)\
**Post date:** [July 22, 2022, 3:30am UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/8 "2022-07-22T03:30:26Z")

</div>

_**Updated code: Changed C++ int to RBInteger (Thanks Bjorn!)**_

This example shows how to make a plugin with a module that adds two numbers together.  
This video and github code is in response to being asked for an updated example to create a Windows plugin for Xojo 2022 r1.1 using Visual Studio 2022.

This example shows how to make a plugin with a module that adds two numbers together.

Step-by-step instructions are included in the [Youtube Plugin Video](https://youtu.be/Ap3Ufre_RXk)and all code can be downloaded at [Eugene’s Github](https://github.com/eugenedakin/2022XojoPlugin)

 ![PluginScreenUpdated](https://forum.xojo.com/uploads/default/original/2X/b/bb19926fe6e889d99797935bf691e8a9a2cc0583.png)

---

<div class="post-metadata">

**Author:** ![Jens\_Knaack1](https://forum.xojo.com/user_avatar/forum.xojo.com/jens_knaack1/32/188_2.png) [@Jens\_Knaack1](https://forum.xojo.com/u/Jens_Knaack1)\
**Post date:** [July 23, 2022, 7:00pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/9 "2022-07-23T19:00:24Z")

</div>

Thank you very much for your work. Absolutely phantastic!!!

---

<div class="post-metadata">

**Author:** ![Eugene\_Dakin](https://forum.xojo.com/user_avatar/forum.xojo.com/eugene_dakin/32/178_2.png) [@Eugene\_Dakin](https://forum.xojo.com/u/Eugene_Dakin)\
**Post date:** [July 25, 2022, 2:54pm UTC](https://forum.xojo.com/t/windows-xojo-2022-plugin-tutorial-video-and-code/71281/10 "2022-07-25T14:54:22Z")

</div>

> [@brian\_franco](#):
>
> I remember calling into a Windows DLL I created with a plain C compiler.  
> I did not try and create a plugin but was able to call the functions in the DLL. That was a few years back but I believe I still have the DLL and info, I will check tonight and if i find it I will post it here for others to give a try

Hello @brian_franco,

That would be nice to share the C code. Similar to your project, I created a C# dll a couple of years ago, and was able to use the functions in Xojo.

Here is a link to the Github site with the code: [C# DLL with Xojo](https://github.com/eugenedakin/CSharpDLLXojo)

Here is a link to the article: [C# DLL Xojo Article](https://scispec.ca/index.php/blog/55-create-a-csharp-dll-for-xojo)
