Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: Memrory fault with byref ?

Hello Olivier,
in C# I have ProjToPixel(pnt.x ,pnt.y, ref x, ref y)
Greetings Maurits


2014-05-10 12:06 GMT+02:00 olivier57 <[email removed]>:

From: olivier57

Hi

To be able to use strict on option, I did my own PixelToProj function. What I don't understant is that if parameter pnt is "Byref", I get a memory fault.

Thanks for any explanation.

Olivier
e2 is system.drawing.point
e2 = ProjToPixel(AxMap1, shap.Point(0))

...
    Function ProjToPixel(ByRef winmap As AxMapWinGIS.AxMap, __ByVal__ pnt As MapWinGIS.Point) As System.Drawing.Point
        ' this function is equivalent to Axmap.ProjToPixel(shap.Point(0).x, shap.Point(0).y, e2.X, e2.Y)
        Dim x As Double
        Dim y As Double
        Dim p As New System.Drawing.Point

        winmap.ProjToPixel(pnt.x, pnt.y, x, y)
        p.X = CInt(x)
        p.Y = CInt(y)
        Return p
    End Function

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online atcodeplex.com



Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>