User Tools

Site Tools


dll_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
dll_function [2018/07/02 03:43] – created wolfgangriedmanndll_function [2018/09/03 18:51] 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:user32.ShowWindow ANSI[/code]+<code>_dll function ShowWindow(hWnd as IntPTR, nCmdShow as int) as logic pascal:user32.ShowWindow ANSI</code>
 and the other the C# compatible syntax: and the other the C# compatible syntax:
-[code][DllImport("user32.dll")] function ShowWindow(hWnd as IntPTR, nCmdShow as int) as logic pascal[/code]+<code>[DllImport("user32.dll")] function ShowWindow(hWnd as IntPTR, nCmdShow as int) as logic pascal</code>
 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):
 +
 +[[dll_function_changes|_dll function changes]]
dll_function.txt · Last modified: 2018/09/03 18:51 by wolfgangriedmann