dll_function
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dll_function [2018/07/02 03:43] – created wolfgangriedmann | dll_function [2018/09/03 18:51] (current) – wolfgangriedmann | ||
---|---|---|---|
Line 6: | Line 6: | ||
There are two possibilities in X#. The first is the VO compatible syntax: | There are two possibilities in X#. The first is the VO compatible syntax: | ||
- | [code]_dll function ShowWindow(hWnd as IntPTR, nCmdShow as int) as logic pascal: | + | <code>_dll function ShowWindow(hWnd as IntPTR, nCmdShow as int) as logic pascal: |
and the other the C# compatible syntax: | and the other the C# compatible syntax: | ||
- | [code][DllImport(" | + | <code>[DllImport(" |
For the C# syntax you need to include also | For the C# syntax you need to include also | ||
- | [code]using System.Runtime.InteropServices[/code] | + | <code>using System.Runtime.InteropServices</code> |
Of course you can also declare these functions as methods of a class: | Of course you can also declare these functions as methods of a class: | ||
- | [code]using System.Runtime.InteropServices | + | <code>using System.Runtime.InteropServices |
using System.Text | using System.Text | ||
Line 32: | Line 32: | ||
static method GetSection(lpAppName as string, lpszReturnBuffer as byte[], nSize as int, lpFileName as string) as logic pascal | static method GetSection(lpAppName as string, lpszReturnBuffer as byte[], nSize as int, lpFileName as string) as logic pascal | ||
- | end class[/code] | + | end class</code> |
+ | Please note that in the _dll statement the calling convention must be specified (in VO this is not necessary). Please see here: [[dll_function_changes|_dll function changes]] |
dll_function.txt · Last modified: 2018/09/03 18:51 by wolfgangriedmann