diff --git a/src/native/get.cc b/src/native/get.cc
index 505c811..c95c337 100644
--- a/src/native/get.cc
+++ b/src/native/get.cc
@@ -126,6 +126,17 @@
}
+ int tn3270_get_cursor_addr(h3270::session *ses) {
+
+ try {
+ return (int) ses->get_cursor_addr();
+ } catch(std::exception &e) {
+ tn3270_lasterror = e.what();
+ }
+ return -1;
+
+ }
+
int tn3270_get_url(h3270::session *ses, char* str, int strlen) {
try {
diff --git a/src/pw3270-sharp/pw3270-sharp.cs b/src/pw3270-sharp/pw3270-sharp.cs
index 618603a..fc55098 100644
--- a/src/pw3270-sharp/pw3270-sharp.cs
+++ b/src/pw3270-sharp/pw3270-sharp.cs
@@ -114,6 +114,9 @@ namespace pw3270 {
extern static int tn3270_set_cursor_addr(IntPtr Session, int addr);
[DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)]
+ extern static int tn3270_get_cursor_addr(IntPtr Session);
+
+ [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)]
extern static int tn3270_enter(IntPtr Session);
[DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)]
@@ -409,6 +412,28 @@ namespace pw3270 {
}
///
+ /// Get cursor address
+ ///
+ ///
+ public int GetCursorPosition() {
+ return tn3270_get_cursor_addr(hSession);
+ }
+
+ ///
+ /// Cursor address
+ ///
+ ///
+ public int CursorPosition {
+ set {
+ tn3270_set_cursor_addr(hSession, value);
+ }
+ get {
+ return tn3270_get_cursor_addr(hSession);
+ }
+ }
+
+
+ ///
/// Send "Enter" key
///
///
--
libgit2 0.21.2