Implemented GlobalChangeLockCount (KERNEL.365).
diff --git a/if1632/thunk.c b/if1632/thunk.c
index 8d583b5..59752b4 100644
--- a/if1632/thunk.c
+++ b/if1632/thunk.c
@@ -1444,16 +1444,3 @@
EAX_reg(context) = CALL32_CBClient( proc, args );
}
-/***********************************************************************
- * KERNEL_365 (KERNEL.365)
- *
- * This is declared as a register function as it has to preserve
- * *all* registers, even AX/DX !
- *
- */
-void WINAPI KERNEL_365( CONTEXT *context )
-{
- LPWORD args = PTR_SEG_OFF_TO_LIN( SS_reg( context ), SP_reg( context ) );
- TRACE( thunk, "(%04X, %d): stub!\n", args[3], (INT16)args[2] );
-}
-
diff --git a/memory/global.c b/memory/global.c
index 5c8666d..d114a02 100644
--- a/memory/global.c
+++ b/memory/global.c
@@ -534,6 +534,26 @@
return pArena->lockCount;
}
+/***********************************************************************
+ * GlobalChangeLockCount (KERNEL.365)
+ *
+ * This is declared as a register function as it has to preserve
+ * *all* registers, even AX/DX !
+ *
+ */
+void WINAPI GlobalChangeLockCount( CONTEXT *context )
+{
+ LPWORD args = PTR_SEG_OFF_TO_LIN( SS_reg( context ), SP_reg( context ) );
+ HGLOBAL16 handle = (HGLOBAL16)args[3];
+ INT16 delta = (INT16) args[2];
+
+ if ( delta == 1 )
+ GlobalLock16( handle );
+ else if ( delta == -1 )
+ GlobalUnlock16( handle );
+ else
+ ERR( global, "(%04X, %d): strange delta value\n", handle, delta );
+}
/***********************************************************************
* GlobalSize16 (KERNEL.20)