private System.String GetConnectionString() { System.String Value = ""; try { System.String String__Value = ""; System.Int32 Length__Value = 0; if (! LibInvoke.ProjectGetIProjectConnectionString(FItemHandle, System.IntPtr.Zero, ref Length__Value) ) { throw new System.Exception("ProjectGetIProjectConnectionString"); } System.IntPtr Array__Value = System.Runtime.InteropServices.Marshal.AllocHGlobal(Length__Value + 1); if (! LibInvoke.ProjectGetIProjectConnectionString(FItemHandle, Array__Value, ref Length__Value) ) { throw new System.Exception("ProjectGetIProjectConnectionString"); } String__Value = LibInvoke.StringFromNativeUtf8(Array__Value, Length__Value); System.Runtime.InteropServices.Marshal.FreeHGlobal(Array__Value); if (Length__Value > 0) { Value = String__Value; } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Value); }
private static System.Boolean ProjectGroupIProjectGroupEventsOnProgress(IProjectGroupEvents ItemHandle, TProgressEvent EventCode, System.Int32 ProgressValue, System.IntPtr EventText) { System.Boolean Result = false; try { System.Object cls = ((System.Runtime.InteropServices.GCHandle)(System.IntPtr) ItemHandle).Target; if ((cls is ProjectGroup) && (((ProjectGroup)cls).OnProgress != null)) { ((ProjectGroup)cls).OnProgress(EventCode, ProgressValue, LibInvoke.StringFromNativeUtf8(EventText)); } Result = true; } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Result); }