I am starting to develop application in Visual C++ .Net (Visual C++ 8.0).
I made a little project and now I want to make an executable file which it could be copied in a different computer or folder without install it or without copy any DLL, I want to copy just the executable.
I was trying to configure the project option but I failed.
When I worked with Visual Studio 6.0 (Visual C++) I could set the link option like static so I could copy the exe file in different folders or computers
i mean, you use MFC, Win32 or such libraries which generate natice code (directly for the target microprocessor), or using managed code, which is actually an intermediate language for the .NET framework...
we have an older application that we would like to extend with managed code (written in c#). The extension was planned to be through a dll written in C++ that would call managed part - as proposed in the following article: http://www.codeproject.com/dotnet/bridge.asp
problem is that when I write a simple non-managed app in VC2005, I can call managed part without any problem, but when I try to call it from the same application compiled with VC6, it simply breaks.
here is the C# assembly code:
public class Class1
public static int ShowDialog(string sText, string sCaption)
here is the wrapper C++ dll
using namespace System;
using namespace ClassLibrary1;
using namespace System::Windows::Forms;
This works if it is compiled in VS2005 but breaks when compiled in VC6 (unhandled exception in console2.exe (KERNEL32.DLL): 0xE0434F4D:(no name).)
Unfortunately it is not possible to recompile the old application with VC2005 since it is pretty old application with a lots of code written in cobol.
This may be a newbie question or has been discussed before, but I searched the message boards and could't find anything similar. I am not sure at all that it is possible to connect unmanaged code with managed code this way. Am I on the right track? Tnx in advance
VC6 has no support for the .NET platform (managed code), you must use later compiler.
I know that, but it was my understanding that functions prefixed with extern "C" will be visible (and callable) as simple C functions. I expected to be able to call them as any other dll that exports some functions and structures.
led mike wrote:
And you compile Cobal with VC6?
No, actually the application we have is an old cobol application now largely extended and partly replaced with code written in VC6. Cobol can call VC6 dlls, so I thought it could also call dlls written in VS2005 - as long as the functions are exported with extern "C" prefixes. When I didn't succeed in that, I tried to call a dll from program written with VC6 only to find that is not possible, too.
Can anybody help me to get Icon details like its name, target path, working directory whenever it is double-clicked to run the application. This is be using Windows API or in C#.
I have already used IShellLink Interface but its been hard-coded for icon name. Suppose the user changes desktop icon name then also coding should be able to change its working directory. This can be done if I can check the existence of the icon.
I was using gmtime() on WinCE with Dinkumware libraries. It returned local time instead of UTC. Although I can convert it to UTC by calling GetTimeZoneInformation, still wondering why that is, and if there's any other function can be called?
The compiler outputs an error when i try to allocate a String object as an automatic variable : "C3149: 'System::String' : cannot use this type here without a top-level '^'."
As the problem doesn't appear with my home-made ref class, my actual question is : is there a way to prevent a class from being instantiated as an automatic variable ?