visual-c++

Problems linking ACE in VC++

Hi, I've built ACE.dll and ACE.lib of the ACE library. But when I link it to my program, I get several errors like Error 2 error LNK2019: unresolved external symbol "void * __cdecl ACE_OS::memcpy(void *,void const *,unsigned int)" (?memcpy@ACE_OS@@YAPAXPAXPBXI@Z) referenced in function "public: void __thiscall ACE_String_B...

.h, .dll and .lib confusion

Hi, I'm new to vc++. I've just built a software and it generated a .dll and a .lib. I need to use functions from this in my code. Do I need to link to both .lib and .dll to build my code? What project properties do I have to alter to do this linking? ...

GlobalInterfacePointer passing using AfxBeginthread

Hi, I am using a worker thread inside a CDialog class. theApp.m_pWorkerThread = AfxBeginThread(Threadproc,this); Now I need to pass a global Inerface poiner to the worker thread so as to access a COM object from outside Can someone tell me the syntax to pass the GIT cookie and access it inside the thread. Thanks ...

tool for getting the stack trace of on a file

Do you know if there is a tool in Windows that is able to start a C++ application and, when there is an exception, is able to automatically save to file the stack trace information? I now that there is the dbghelp.dll and StackWalk64 function but I would like rather to use some tool instead of coding myself. Right now I am also looki...

How to re-engineering design from source code using rational rose

I would like to create class diagram from existing source code using rational rose. I have VC++ 6 MFC project and I installed Rational Rose Enterprise Edition Version 2003.06.16. Now I would like to re-engineering the project to create design(class diagram) from the source code. Pls help me step-by-step process to do this, I couldn't ge...

Change program's working directory in compile-time in Visual C++

Is there a way to define a program's working directory to be different from its current directory at compile-time, on Visual C++? The bosses want the executable to be on the root directory but all DLLs to be in a separate dir. ...

From CodeGear to Visual Studio 2008

I'm inheriting a native C++ application. It was developed with Borland CodeGear. Right now, I already have a copy of Visual Studio 2008 installed on my system. Is there anything that would prevent me from building the system with Visual Studio, even though it was developed in CodeGear? I'm already familiar with Visual Studio, so that...

vc++ debug : the application failed to start because ACE.dll was not found

Hi, I've used ACE.lib in my program and it compiled properly. But when I debug I get this error. The ACE.dll is in the same folder as the lib and I've also tried adding it to the project and PATH. Nothing works Any help is appreciated ...

error C2440: '=' : cannot convert from 'char [5]' to 'char [20]'

This is linked to my previous post Wher I created a Struct : struct buffer { char ProjectName[20]; char ProjectID[20]; }; Now while I am trying to assign values to it: buffer buf; buf.ProjectID = "3174"; buf.ProjectName = "NDS"; I am getting this error: error C2440: '=' : cannot convert from 'char [5]' to 'char [20]' ...

sending struct through socket; server and client on same machine

My server and client are running on the same machine so I dont have endian issues etc. I need something that works on both vc++ and g++ and possibly the simplest way. What can I send the struct with? Edit struct Info { int** fields; char** field_names; }; ...

Setting up references to registration-free (isolated) COM DLLs in VC++

I have two VC++ projects: ProjectB which depends on ProjectA. I would like ProjectB to access ProjectA through ProjectA's COM interface only. I added a reference in ProjectB's "Framework and References" property dialog which creates an Interop DLL. How do I set up this reference to be in isolation mode? Do I need to make any modificatio...

How do I use libcurl in Visual C++ 2010?

Hey guys, I was wondering if you would be able to help me use libcurl within Visual Studio to resolve the errors in the image below: ...

Access Violation Exception

Hello, I am having some strange problem. I have written a small module in VC++ using OpenCV. It works fine. The code aggregates feed from the CCTV camera connected to the USB port. however, I had to write the rest of my application in C#, so I made a DLL of the VC++ code and called the VC++ method from C#. Now, I have ended up getti...

Isolation mode (registration free) COM setting in VC++ 2008

How do I create a reference to an isolation mode (registration free) COM DLL in a VC++ 2008 project? In a C# project it is as easy as toggling an Isolated property on a reference. How do I do the equivalent in a VC++ project? ...

How Callback functions are usefull while building and DLL

Are callback functions equivelent to events in C#(.NET). What I understand about callback function is, it is a function that is called by a reference to that Function. Example Code will be: void cbfunc() { printf("called"); } int main () { void (*callback)(void); callback=(void *)cbfunc; callback(); re...

creating datatypes at runtime

Hi, I have a scenario where I am given data records at runtime. The datatype of the cells of the record are variable and only known at runtime. How wil I store these records? For e.g., At runtime, I get record_Info = "char[]","int16","int32" Then I get records = "abc" "2" "30", "def" "3" "40" how can I store these when I cant initial...

Building POCO (C++ lib) fails due to wrong Visual Studio Version

Hi there. I am trying to build the POCO C++ with Visual Studio 2010. As the developers don't offer a suitable solution for VS 10 yet, I used the conversion manager to convert a VS 9 solution. Unfortunately, building fails with the following error message: Error 2 error : 0x2 trying to open file . C:\Dokumente und Einstellungen\evn...

Returning Struct from VC++ to C#.

Hi, I have written a structure in VC++. I have made a dll of the VC++ code and calling this dll in C# using PInvoke. The VC++ dll looks like this #include <windows.h> #include <stdio.h> #include <conio.h> #include <tchar.h> #include <iostream> #if defined(_MSC_VER) #include <windows.h> #define DLL extern "C" __declspec(dllexport) #els...

Mt.exe doesn't like absolute paths in the -dll option

Is it just me, or does Mt.exe hate absolute paths in the -dll option? I have a Visual C++ project in Visual Studio 2008 with a reference to an isolated (registration free) COM DLL. I copy the COM DLL into the project's output directory using a Pre-Build Event. In the project's properties, on the Configuration Properties > Manifest Tool ...

Monitor RunTime behavior of a DLL

Hi, I am using a self made dll using VC++ in C#. I wanted to ask, is there any way by which I could monitor the run time performance the dll. Like, once the C# code has made a call to the dll and once when it is loaded, can I monitor the behavior of the dll? I am in development phase and the dll code-logic when run independently, ru...