SafeHandle sHandle = this.ServiceHandle; // I want to do this but this fails.//some more code ...}
如何将IntPtr (如this.ServiceHandle)转换为"System.Runtime.InteropServices.SafeHandle
(a 'IntPtr' instance) to determine whether it should be replaced with a SafeHandle or CriticalHandle(a 'IntPtr' instance) to determine whether it should be replaced with a SafeHandle or CriticalHandle"有许多SafeHandle子类,它们似乎都没有在包装对象的生命周期结束时调用FreeLocal
pKeyCtx)在System.Security.Cryptography.SafeKeyHandle.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean System.Runtime.InteropServices.SafeHandle.Dispose(Boolean)在System.Runtime.Intero
我的目标是当用户单击ok按钮/按回车键时,将带有条形码和日期戳的标签打印到zebra TLP 2844。我从zebras站点找到了我认为可能是这个的代码,并一直将它集成到我的程序中,但它的一部分已经折旧,我不知道如何更新它。下面是我到目前为止所知道的。打印机是通过USB连接的,程序还会将输入的数字存储在数据库中,但我已经完成了这一部分。任何帮助都将不胜感激。 Public Const GENERIC_WRITE = &H40000000
Public
pKeyCtx)在System.Security.Cryptography.SafeKeyHandle.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalFinalize() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean System.Runtime.InteropServices.SafeHandle.Dispose(Boolean)在System.Runtime.Intero