Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

sreehari_mysore

@sreehari_mysore
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WiX Toolset Compiler error
    S sreehari_mysore

    I am getting the errors related to WiX Toolset while compiling one of the applications of C++ in VS2005. The error message shows that: "WiX Toolset compiler has encountered a problem and needs to close". I googled for the related information and tried by installing the 2007 version of Toolset compiler wix38.exe. But still not able to resolve the issue. Please let me know how to rectify the error..

    C / C++ / MFC help c++ tutorial announcement

  • dll used in C# application in VS2005 works correctly, but didn't work in VS2012.
    S sreehari_mysore

    I developed this application by referring to the example in codeproject. please refer the below link Using Unmanaged code and assembler in C#[^]

    C# c++ csharp visual-studio debugging help

  • dll used in C# application in VS2005 works correctly, but didn't work in VS2012.
    S sreehari_mysore

    I am using a dll developed in Visual c++ in to the C# application. It works fine with Visual Studio 2005. But when using the same with Visual Studio 2012, it causes the error.

    myDll.h

    #ifndef _MYDLL_H
    #define _MYDLL_H

    extern "C" _declspec(dllexport) char* __stdcall getName();

    #endif

    myDll.cpp

    #include "stdafx.h"

    #include "mydll.h"

    extern "C" __declspec(dllexport) char* __stdcall getName()
    {
    return "Hello !!!";
    }

    the above code produces the mydll.dll. I used to copy the dll into newly created c# windows application into bin/Debug directory. The c# application code is somewhat like

    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;

    namespace sysWinApp
    {
    public partial class Form1 : Form
    {
    [DllImport("myDll.dll")]
    static extern string getName();

        public Form1()
        {
            InitializeComponent();
        }
    
        private void button1\_Click(object sender, EventArgs e)
        {
            label1.Text = getName();
        }
    }
    

    }

    the windows form consists of a label and a button. By clicking the button, it should display the content on the label, which is accessed from the string returned from the dll function. It works fine with VS2005 but the same didn't happen with VS2012. The C# win app of VS2012 prompts the message that it "has stopped working". any ideas to resolve this ?

    C# c++ csharp visual-studio debugging help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups