Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

VS2008 b2 + Mappoint 2006

This is a discussion on VS2008 b2 + Mappoint 2006 within the Development forums, part of the MapPoint Desktop Discussion category; When I was trying our app, witch uses MapPoint, on VS2008 B2 I had some problems with it. Don't remember ...

  1. #11
    Juozas is offline Junior Member White Belt
    Join Date
    Aug 2007
    Posts
    3

    Re: VS2008 b2 + Mappoint 2006

    When I was trying our app, witch uses MapPoint, on VS2008 B2 I had some problems with it. Don't remember what it was exectly, don't have VS2008 right now, but it was becous off Data Execution Prevention enabled on VS process (actualy becous it prevented some MapPoint execution ), when I disabled DEP, all started to work as expected. I tryed it on Vista x64, and couldn't disable DEP on VS process, so I disabled it completly using bcdedit.

  2. #12
    jovo is offline Junior Member White Belt
    Join Date
    Nov 2007
    Location
    Holland MI
    Posts
    5

    Re: VS2008 b2 + Mappoint 2006

    Aha. Finally, some posts regarding the Visual Studio 2008, .NET Framework 3.5 and Mappoint 2006 issue. Where you are getting "Cross-threaded operation not permitted" or other failures when trying to load mappoint on a windows form on a Vista machine.

    I have tried the solutions listed in these links and they work! Hooray, my application winforms which uses mappoint 2006 on the workstation now functions for my users.

    Here are the links for everyone else

    The Blog Entry
    mappoint Re: Visual Studio 2008 And Mappoint problem

    The Fix, due to NCOMPAT bit being set in the excutable
    I'm just sayin' : NXCOMPAT and the C# compiler

    Hope this helps everyone looking around.

    Jovo

  3. #13
    faniemeiring is offline Junior Member White Belt
    Join Date
    Mar 2007
    Posts
    5

    Re: VS2008 b2 + Mappoint 2006

    Quote Originally Posted by jovo View Post
    Aha. Finally, some posts regarding the Visual Studio 2008, .NET Framework 3.5 and Mappoint 2006 issue. Where you are getting "Cross-threaded operation not permitted" or other failures when trying to load mappoint on a windows form on a Vista machine.

    I have tried the solutions listed in these links and they work! Hooray, my application winforms which uses mappoint 2006 on the workstation now functions for my users.

    Here are the links for everyone else

    The Blog Entry
    mappoint Re: Visual Studio 2008 And Mappoint problem

    The Fix, due to NCOMPAT bit being set in the excutable
    I'm just sayin' : NXCOMPAT and the C# compiler

    Hope this helps everyone looking around.

    Jovo
    Thanks! The NXCOMPAT thing worked for us as well....
    The commands to issue in a CMD prompt:
    "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"

    "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\editbin.exe" /NXCOMPAT:NO "C:\development\myproject\bin\Release\*.dll"

    "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\editbin.exe" /NXCOMPAT:NO "C:\development\myproject\bin\Release\*.exe"


    Obviously it would be nice to just set this as an option in the IDE... Any ideas or suggestions from someone out there?

    Thanks

  4. #14
    talish is offline Junior Member White Belt
    Join Date
    Aug 2008
    Posts
    3

    Re: VS2008 b2 + Mappoint 2006



    NX_COMPACT BIT


    The C# compiler in Visual Studio 2008 and the .NET 3.5 Framework (csc.exe) is now generating PE files with the NXCOMPAT bit set. What is that bit and who cares, you ask? You may very well care if your application interops with native binaries or exposes a plugin model to 3rd parties. First, some background...
    DEP is short for Data Execution Prevention. It is a technology that exists in Microsoft operating systems which prevents execution of code from memory pages which are not marked as executable. DEP exists to reduce the attack surface available to malicious software that is trying to hijack a process, and it has been acknowledged to be very helpful in that regard. In Windows Vista, the set of processes and applications to which DEP is applied is configurable by administrators, but there is also a role for application developers.
    In the header of a PE file there is a flag called IMAGE_DLLCHARACTERISTICS_NX_COMPAT. This flag affects whether or not the OS enables DEP for a process. Setting this flag tells the OS that the image is compatible with DEP. For executable images, if this flag is set, the process is run with DEP enabled unless the machine is configured with the DEP policy set to AlwaysOff. If the image is a DLL and the flag is set, the OS skips checking the DLL against a compatibility database which results in a small performance improvement. All of this applies to x86, 32-bit processes only. On a 64-bit OS, DEP is always enabled for 64-bit processes, but 32-bit processes are configured by the PE flag and system policy as described above. So how does one control the flag in the PE header?
    Since the C# compiler emits PE files which are MSIL only and therefore compatible with DEP, the output binaries from the VS 2008 and .NET 3.5 C# compilers have this flag set. Our expectation is that the vast majority of C# executables produced by these compilers will be part of a DEP-compatible application. For that reason we did not surface a compiler switch to configure the NXCOMPAT setting. Of course you can write a C# application that uses a native or mixed binary which is not compatible with DEP. Some ATL types in 7.1 and earlier used to do simple code generation into data pages which is a DEP no-no. If your application is generating IP_ON_HEAP exceptions, then you may need to clear the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag for your executable. To do this you can use EDITBIN.EXE from the VC toolset like so:
    editbin.exe /NXCOMPAT:NO <your binary>
    If you're using Visual Studio, you can add a post build step to your executable's project. You'll need to setup the environment so that EDITBIN's dependencies can be resolved. Since the post build steps you author in Visual Studio's properties page are written into a batch file that is launched by the build process, you can use Visual Studio's VSVARS32.BAT to establish the right environment. My post build step looks like this:
    call $(DevEnvDir)..\tools\vsvars32.bat
    editbin.exe /NXCOMPAT:NO $(TargetPath)

    If you sign the binary in Visual Studio, flipping the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag in the post build step after the binary has been signed will result in an assembly that will fail strong name validation. To work around this you'll need to begin signing your binary as part of the post build steps. To do this, use SN.EXE from the Windows SDK.
    The .NET 2.0 and VS 2005 compilers are also affected

    We like DEP so much that when you install .NET Framework 2.0 SP1 your C# compilers in VS 2005 and .NET Framework 2.0 will also begin to emit binaries with the IMAGE_DLLCHARACTERISTICS_NX_COMPAT bit set. This will undoubtedly surprise a few developers...download a framework service pack, recompile, run your app, and you're now getting IP_ON_HEAP exceptions. Obviously this is not ideal, but aggressively building a computing ecosystem filled with DEP-enabled applications and their accompanying security benefits is very beneficial to Windows users. If you begin to encounter IP_ON_HEAP exceptions after installing .NET Framework 2.0 SP1, you can use the same technique described above to clear the IMAGE_DLLCHARACTERISTICS_NX_COMPAT bit in VS 2005. The only difference I'm aware of is that the SDK (and therefore the location of SN.EXE) has moved.

  5. #15
    jasper7 is offline Junior Member Yellow Belt
    Join Date
    Aug 2009
    Posts
    25

    Re: VS2008 b2 + Mappoint 2006

    Having started to program using VB2005 Express, I could use the Mappoint Control

    Upgraded to 2008 Express and now no map.

    Great found a solution.

    Guess what

    Can I find the Build Events button in the complie tab.?

    NO

    Its not there.

    Hellllllllllllllllpppppppppppppppppp Please

  6. #16
    jovo is offline Junior Member White Belt
    Join Date
    Nov 2007
    Location
    Holland MI
    Posts
    5

    Re: VS2008 b2 + Mappoint 2006

    Should be in the compile tab of the properties of the project. Right-click on the project name in the solution browser window, then look at properties and the build events will be in there.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MapPoint 2006
    By TFB in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 09-30-2008, 02:49 AM
  2. Difference between MapPoint 2006 and MapPoint 2006 Fleet
    By jlewis in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-21-2006, 08:18 AM
  3. Mappoint 2006
    By mhuslig in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-04-2006, 12:22 PM
  4. Mappoint 2006 GPS
    By rt in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-15-2006, 04:07 AM
  5. MapPoint 2006
    By Eric Frost in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-03-2006, 08:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88