Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libplctag.NativeImport/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ static NativeMethods()
[DllImport(DLL_NAME, EntryPoint = nameof(plc_tag_create_ex), CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
public static extern Int32 plc_tag_create_ex([MarshalAs(UnmanagedType.LPStr)] string lpString, callback_func_ex func, IntPtr userdata, int timeout);

[DllImport(DLL_NAME, EntryPoint = nameof(plc_tag_create_from_tag), CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
public static extern Int32 plc_tag_create_from_tag(Int32 src_tag_id, [MarshalAs(UnmanagedType.LPStr)] string attrib_str, callback_func_ex func, IntPtr userdata, int timeout);

[DllImport(DLL_NAME, EntryPoint = nameof(plc_tag_destroy), CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int plc_tag_destroy(Int32 tag);
Expand Down
5 changes: 5 additions & 0 deletions src/libplctag.NativeImport/plctag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public static Int32 plc_tag_create_ex(string lpString, callback_func_ex func, In
return NativeMethods.plc_tag_create_ex(lpString, func, userdata, timeout);
}

public static Int32 plc_tag_create_from_tag(Int32 src_tag_id, string attrib_str, callback_func_ex func, IntPtr userdata, int timeout)
{
return plc_tag_create_from_tag(src_tag_id, attrib_str, func, userdata, timeout);
}

public static int plc_tag_destroy(Int32 tag)
{
return NativeMethods.plc_tag_destroy(tag);
Expand Down
Loading