internal static int LoadProcedure(IntPtr procedure, string programName, string procedureName) { IntPtr hglobalUtf8Encoding = HalconAPI.ToHGlobalUtf8Encoding(programName); int num = EngineAPI.HCenLoadProcedureProgramName(procedure, hglobalUtf8Encoding, procedureName); Marshal.FreeHGlobal(hglobalUtf8Encoding); return(num); }