Hi to all, I am a very frustrated programmer!! In an attempt to speed up the performance of rendering to a high performance application I am writing I had the great idea of natively calling GDI+ through PInvoke in order to cut out the checking that the framework does.
I can create brushes, pens graphics paths but the PInvoke call to actually draw rectangle, paths etc always results in a weird Access violation. Furthermore if I create a routine to do the painting from a win32 .dll and PInvoke that from my application it works just fine. Same HDC by the way. Infact any valid HDC works from win32, but not when called from a .net app. Have microsoft locked GDI+ from within the framework, if so then how can it be possible to successfully create the brushes etc...
Any explanation would be gratefully recieved, i am an experienced c++ programmer porting to c#. For the life of me I can't understand why this exception occurs.