{"action":"created","issue":{"url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/68","repository_url":"https://api.github.com/repos/spazzarama/Direct3DHook","labels_url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/68/comments","events_url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/68/events","html_url":"https://github.com/spazzarama/Direct3DHook/issues/68","id":350796625,"node_id":"MDU6SXNzdWUzNTA3OTY2MjU=","number":68,"title":"Strange exception","user":{"login":"SagSaj","id":15413322,"node_id":"MDQ6VXNlcjE1NDEzMzIy","avatar_url":"https://avatars1.githubusercontent.com/u/15413322?v=4","gravatar_id":"","url":"https://api.github.com/users/SagSaj","html_url":"https://github.com/SagSaj","followers_url":"https://api.github.com/users/SagSaj/followers","following_url":"https://api.github.com/users/SagSaj/following{/other_user}","gists_url":"https://api.github.com/users/SagSaj/gists{/gist_id}","starred_url":"https://api.github.com/users/SagSaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SagSaj/subscriptions","organizations_url":"https://api.github.com/users/SagSaj/orgs","repos_url":"https://api.github.com/users/SagSaj/repos","events_url":"https://api.github.com/users/SagSaj/events{/privacy}","received_events_url":"https://api.github.com/users/SagSaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T12:47:19Z","updated_at":"2018-09-27T22:46:27Z","closed_at":null,"author_association":"NONE","body":"Hi, when i try do smth like\r\n```C#\r\n   string dir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);\r\n            string filename = dir + @\"\\1111.png\";\r\n            var imageElement = new Capture.Hook.Common.ImageElement(filename);\r\n            _captureProcess.CaptureInterface.DrawOverlayInGame(new Capture.Hook.Common.Overlay\r\n            {\r\n                Elements = new List<Capture.Hook.Common.IOverlayElement>\r\n                {\r\n                    imageElement,\r\n                },\r\n                Hidden = !cbDrawOverlay.Checked\r\n            });\r\n```\r\nProgram return that debag:\r\n\r\nDebug: DXHookD3D11: PresentHook: Exeception: System.InvalidOperationException: System.InvalidOperationException: The bitmap area is already locked.\r\n\r\nServer stack trace: \r\n   в System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)\r\n   в System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)\r\n   в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)\r\n   в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)\r\n\r\nException rethrown at [0]: \r\n   в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n   в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n   в System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)\r\n   в Capture.Hook.DX11.DXImage.Initialise(Bitmap bitmap) в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DX11\\DXImage.cs:string 62\r\n   в Capture.Hook.DX11.DXOverlayEngine.GetImageForImageElement(ImageElement element) в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DX11\\DXOverlayEngine.cs:string 199\r\n   в Capture.Hook.DX11.DXOverlayEngine.InitialiseElementResources() в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DX11\\DXOverlayEngine.cs:string 111\r\n   в Capture.Hook.DX11.DXOverlayEngine.Initialise(Device device, Texture2D renderTarget) в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DX11\\DXOverlayEngine.cs:string 85\r\n   в Capture.Hook.DX11.DXOverlayEngine.Initialise(SwapChain swapChain) в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DX11\\DXOverlayEngine.cs:string 47\r\n   в Capture.Hook.DXHookD3D11.PresentHook(IntPtr swapChainPtr, Int32 syncInterval, PresentFlags flags) в C:\\Users\\Stas\\Downloads\\Direct3DHook-master\\Direct3DHook-master\\Capture\\Hook\\DXHookD3D11.cs:string 559"},"comment":{"url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/comments/425266159","html_url":"https://github.com/spazzarama/Direct3DHook/issues/68#issuecomment-425266159","issue_url":"https://api.github.com/repos/spazzarama/Direct3DHook/issues/68","id":425266159,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTI2NjE1OQ==","user":{"login":"oSkrobuk","id":23293111,"node_id":"MDQ6VXNlcjIzMjkzMTEx","avatar_url":"https://avatars2.githubusercontent.com/u/23293111?v=4","gravatar_id":"","url":"https://api.github.com/users/oSkrobuk","html_url":"https://github.com/oSkrobuk","followers_url":"https://api.github.com/users/oSkrobuk/followers","following_url":"https://api.github.com/users/oSkrobuk/following{/other_user}","gists_url":"https://api.github.com/users/oSkrobuk/gists{/gist_id}","starred_url":"https://api.github.com/users/oSkrobuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oSkrobuk/subscriptions","organizations_url":"https://api.github.com/users/oSkrobuk/orgs","repos_url":"https://api.github.com/users/oSkrobuk/repos","events_url":"https://api.github.com/users/oSkrobuk/events{/privacy}","received_events_url":"https://api.github.com/users/oSkrobuk/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T22:46:27Z","updated_at":"2018-09-27T22:46:27Z","author_association":"NONE","body":"`            ImageConverter converter = new ImageConverter();\r\n            byte[] img = (byte[])converter.ConvertTo(Image.FromFile(@\"D:\\1.png\"), typeof(byte[]));\r\n\r\n            _captureProcess.CaptureInterface.DrawOverlayInGame(new Capture.Hook.Common.Overlay\r\n            {\r\n                Elements = {\r\n                    new Capture.Hook.Common.ImageElement()\r\n                    {\r\n                        Location = new System.Drawing.Point(20, 20),\r\n                        Image = img\r\n                    }\r\n                },\r\n                Hidden = false\r\n            });`"}}
{"actor":{"display_login":"oSkrobuk"}}