Hints, tips and tricks for newbies
Moderators: Dorian (MJT support), JRL
-
ocnuybear
- Pro Scripter
- Posts: 100
- Joined: Sun Jul 15, 2018 5:14 pm
Post
by ocnuybear » Thu Jul 26, 2018 9:56 am
I would like to start creating my own DLL in C# or VB.net.
Using example code in Visual Studio:
Code: Select all
Module Module1
Function Test(a As Integer) As Integer
Test = a * 10
End Function
End Module
To be compiled into a DLL, called by MS sending an integer to it and getting the answer integer back into MS.
Can you assist please?
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Thu Jul 26, 2018 5:23 pm
Macro Scheduler requires a Win32 native DLL using the stdcall calling convention.
As far as I was aware C# and VB.Net are managed and therefore not capable of creating native unmanaged DLLs.
However, you might be able to create a COM object which you can instantiate via VBScript code within your macro.
But you'll be better placed asking for help compiling your C# project in a C# forum. C#/VB.Net is way beyond our remit here. We are not going to be able to help you with your C#/VB.Net code here.
-
ocnuybear
- Pro Scripter
- Posts: 100
- Joined: Sun Jul 15, 2018 5:14 pm
Post
by ocnuybear » Thu Jul 26, 2018 6:19 pm
I'm still new to programming, and is learning about the differences between managed & unmanaged DLL's.
What other program languages do you perhaps know of which except Python can also create native unmanaged DLL's?
Thank you Marcus