theKernel 10.0
Loading...
Searching...
No Matches
MkCall.cs
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11/*****************************************************************************/
12/* */
13/* misc */
14/* */
15/*****************************************************************************/
16
17using System;
18using System.Runtime.InteropServices;
19using csmkkernel;
20using Mk = csmkkernel.MkKernel;
21
22namespace csmkkernel {
23
24 public partial class MkObjectC
25 {
26
27 // [MkObjectDeleteSCB]
29 public delegate void MkObjectDeleteSCB(string typeName, int typeHdl, int objHdl);
30 // [MkObjectDeleteSCB]
31
32 internal struct MkCall {
33 public MkObjectDeleteSCB callSCB;
34
35 public MkCall(MkObjectDeleteSCB val) {
36 callSCB = val;
37 }
38 }
39
40 private static MkErrorE ObjectDeleteCall (
41 IntPtr mkrt, IntPtr obj, IntPtr typeName, Int32 typeHdl, Int32 objHdl, IntPtr data
42 ) {
43//printBool(MqS.MqObjCheck(hdl),"check:hdl");
44 if (data == IntPtr.Zero) return MkErrorE.OK;
45 MkCall dataC = (MkCall)GCHandle.FromIntPtr(data).Target;
46 if (!Mk.MkSelfExists(obj)) return MkErrorE.OK;
47
48 // call the function
49 try {
50 if (dataC.callSCB != null) {
51 dataC.callSCB(Marshal.PtrToStringAnsi(typeName), typeHdl, objHdl);
52 }
53 } catch (Exception ex) {
54 MkErrorC.DEFAULT().Catch (ex);
55 }
56
57 // everything is OK
59 }
60
61 private static void ObjectDeleteFree (IntPtr mkrt, ref IntPtr data) {
62 GCHandle.FromIntPtr(data).Free();
63 data = IntPtr.Zero;
64 }
65
66 } // END - class "MkObjectC"
67
68} // END - namespace "csmkkernel"
69
MkErrorC - the class known as err or error is used to create and manage an error message …
Definition MkErrorC.cs:498
MkKernel PACKAGE - The package is the toplevel structure of the Programming-Language-Micro-Kernel (PL...
MkObjectC - class known as obj or object is used as base-class type for a Programming-Language-Micro-...
delegate void MkObjectDeleteSCB(string typeName, int typeHdl, int objHdl)
implements the csmkkernel API object: public version from MkObjectDeleteSCB as method
static unsafe MkErrorE CsRuntimeErrorGetCode(IntPtr mkrt)
MkErrorC Catch(Exception exception=null, [CallerMemberName]string callfunc=null)
C#: MkErrorC err.Catch(Exception exception = null, [CallerMemberName]string callfunc = null) → C-AP...
Definition MkErrorC.cs:264
static MkErrorC DEFAULT()
C#: [static] MkErrorC MkErrorC.DEFAULT() → C-API default-system-error - default-error …
Definition MkErrorC.cs:470
MkErrorE
→ C-API: MkErrorE → C-API: MkErrorE