visual-c++-2008

How to call VB.NET DLL from C++ (Call the functions also - not DLL file only)

↘锁芯ラ 提交于 2019-11-30 20:37:38
问题 I want to ask question about how to call VB.NET DLL from C++ program I have tried many times to call VB.NET DLL file from C++ and it is working fine but the problem is I can't call the function of VB.NET DLL file ( I can only load the VB.NET DLL file) in VB.NET DLL I have the following code: Public Function example_function1(ByVal i As Integer) As Integer Return 3 End Function Public Function example_function2(ByVal i As Integer) As Integer Return 3 End Function ============================

View Compiler Mangled Names in C++

穿精又带淫゛_ 提交于 2019-11-30 20:00:55
How do I view the compiler-generated mangled names for overloaded functions in C++? I'm using VC9 but answers for other compilers are welcome too. Edit: I find all the answers useful here. Accepting the one I liked best. You could look in the map file. Assuming you have map file generation turned on. You can see the decorated function names by using Dependency Walker . Open any DLL\EXE in dependency walker and in right pane you can see a list of decorated function names. Since you also ask about other compilers. There is a tool called nm on the gnu toolchain. You will get it on linux and

How do I make VC++'s debugger break on exceptions?

一世执手 提交于 2019-11-30 14:46:22
问题 I'm trying to debug a problem in a DLL written in C that keeps causing access violations. I'm using Visual C++ 2008, but the code is straight C. I'm used to Delphi, where if an exception occurs while running under the debugger, the program will immediately break to the debugger and it will give you a chance to examine the program state. In Visual C++, though, all I get is a message in the Output tab: First-chance exception at blah blah blah: Access violation reading location 0x04410000. No

How do I make VC++'s debugger break on exceptions?

本秂侑毒 提交于 2019-11-30 11:58:09
I'm trying to debug a problem in a DLL written in C that keeps causing access violations. I'm using Visual C++ 2008, but the code is straight C. I'm used to Delphi, where if an exception occurs while running under the debugger, the program will immediately break to the debugger and it will give you a chance to examine the program state. In Visual C++, though, all I get is a message in the Output tab: First-chance exception at blah blah blah: Access violation reading location 0x04410000. No breaks, nothing. It just goes and unwinds the stack until it's back in my Delphi EXE, which recognizes

Using C++ DLLs with different compiler versions

て烟熏妆下的殇ゞ 提交于 2019-11-29 04:40:34
This question is related to "How to make consistent dll binaries across VS versions ?" We have applications and DLLs built with VC6 and a new application built with VC9. The VC9-app has to use DLLs compiled with VC6, most of which are written in C and one in C++. The C++ lib is problematic due to name decoration/mangling issues. Compiling everything with VC9 is currently not an option as there appear to be some side effects. Resolving these would be quite time consuming. I can modify the C++ library, however it must be compiled with VC6. The C++ lib is essentially an OO-wrapper for another C

VC++ allows to use const types for STL containers. Why?

 ̄綄美尐妖づ 提交于 2019-11-28 11:01:13
STL containers require the stored values to be copy constructible and assignable. const T is obviously not an assignable type for any T, but I tried to use it (just being curious) and found out that it compiles and, moreover, behaves as an assignable type. vector<const int> v(1); v[0] = 17; This successfully runs in Visual Studio 2008 and assigns v[0] to 17. This is not a bug in the implementation as others have suggested. Violating the requirements of a C++ Standard Library facility does not render your program ill-formed, it yields undefined behavior. You have violated the requirement that

Using C++ DLLs with different compiler versions

风格不统一 提交于 2019-11-27 18:30:48
问题 This question is related to "How to make consistent dll binaries across VS versions ?" We have applications and DLLs built with VC6 and a new application built with VC9. The VC9-app has to use DLLs compiled with VC6, most of which are written in C and one in C++. The C++ lib is problematic due to name decoration/mangling issues. Compiling everything with VC9 is currently not an option as there appear to be some side effects. Resolving these would be quite time consuming. I can modify the C++

VC++ allows to use const types for STL containers. Why?

丶灬走出姿态 提交于 2019-11-27 03:55:51
问题 STL containers require the stored values to be copy constructible and assignable. const T is obviously not an assignable type for any T, but I tried to use it (just being curious) and found out that it compiles and, moreover, behaves as an assignable type. vector<const int> v(1); v[0] = 17; This successfully runs in Visual Studio 2008 and assigns v[0] to 17. 回答1: This is not a bug in the implementation as others have suggested. Violating the requirements of a C++ Standard Library facility

fatal error LNK1112: module machine type &#39;x64&#39; conflicts with target machine type &#39;X86&#39;

让人想犯罪 __ 提交于 2019-11-26 01:44:02
问题 I\'m using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it, I get the error message \"fatal error LNK1112: module machine type \'x64\' conflicts with target machine type \'X86\'\". I have tried to convert the platform to x64, but it didn\'t work. Please tell me: what is \"module machine type\" and what is \"target

fatal error LNK1112: module machine type &#39;x64&#39; conflicts with target machine type &#39;X86&#39;

耗尽温柔 提交于 2019-11-25 20:19:24
I'm using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it, I get the error message "fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'". I have tried to convert the platform to x64, but it didn't work. Please tell me: what is "module machine type" and what is "target machine type"? How can I overcome it? C Johnson I wrote a blog entry about this, as I encountered this maddening