-
- Mixed mode application. "The string binding is invalid" in VS2005
by Gustavo Carrazoni
- 9 Replies
- Last post
by Gustavo Carrazoni
- Hi, I have this error " The string binding is invalid" when exiting a mixed mode application (/clr). Here is my scenario: I'm using c++/cli , vs2005 and no SP1. I have this classes in a mixed mode dll: #pragma managed(push,off) namespace pru { class p2 { public: ~p2() { m_data=0; } int m_data; }; class Pru { public: static const p2 GetIntStatic(
-
- Adding objects to ArrayList?
by calmal20
- 7 Replies
- Last post
by robben07160
- Hi,
I want to use an ArrayList to store objects (see below)
ArrayList *arrylst = new ArrayList();
MyClass1 *class1 = new MyClass1();
arrylst->Add(class1);
However, it gives me an error saying it canĄ¯t convert class1 to type object.
My question is how can I get it to work
Thanks for your help!
-
- want to choose MULTIPLE FILES and FOLDERS using Win32 API
by PankajGoyal
- 5 Replies
- Last post
by PankajGoyal
- Hi there,
I want to choose MULTIPLE FILES and FOLDERS using Win32 API. Is there any way to open folder using GetOpenFileName() win32 function
I am able to select file and folder using SHBrowseForFolder but I want to select MULTIPLE FILES and FOLDERS.
Any code sample is highly appreciated.
Thanks so much.
Pankaj
-
- How can i link two projects in a single workspace.
by Baba Goud
- 2 Replies
- Last post
by Bite Qiu - MSFT
- i have taken an SDI application, later i added a workspace to this application, this new project contains a dialog based application.
I have added a menu item in the SDI application , through this menu item i have to make a call to the dialog application so that the dialog gets created over there.
Now the problem is how do I link these two projects(SDI and Dialog based ones)
I
-
- Simple DLL Project with a Form
by Tabella
- 6 Replies
- Last post
by Tabella
- It is going to be very easy for you. A week ago I started to work on a DLL project in VS 2005 where I have to create a Form. The thing is I can not compile it. I have a simple function there that suppose to show a Form:
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using
-
- VS2005 3rd Party library woes... and solutions!
by Damian Donnelly
- 3 Replies
- Last post
by Damian Donnelly
- I have been researching forums about the problems of linking to old 3rd party libraries in VS2005. We are migrating to VS2005 at the moment, and are facing all of these issues. It seems to me to be a big oversight on behalf of Microsoft to leave what must be many, many people stranded with this problem. However, I'm interested more in finding solutions. Looking into the forums, people are coming u
-
- Preprocessor help -- what's the difference?
by NekoSan
- 1 Replies
- Last post
by crescens2k
- I'm reading Teach Yourself C++ in 21 Days and they used the Preprocessor in the format of:
#include <iostream.h>
In Visual C++ .Net this generates a "can't find this file" error. I've gotten it to work by removing the ".h" Why does this affect the compiler's ability to find this file and what's the difference between using <> and "" around
-
- Help with non-clr to managed code
by Kevin Emmons
- 5 Replies
- Last post
by Feng Chen - MSFT
- I'm looking for some advice on adding managed forms or controls to an archaic VS 6.0 C++ project. This project has been converted to VS 2005, but because of certain out-sourced dll's we are heavily dependent upon, we cannot comple with clr enabled. I've seen what must be thousands of articles, forums, and sites suggesting various means of achieving this, but it seems that all of them ultimately re
-
- why is there a leading '-' negative sign when outputting zeroes?
by Julian V
- 9 Replies
- Last post
by Julian V
- I have the following snippet of code:
ofstream fout(filename);
for (i=0;i<numElements;i++) {
fout << mAngle(i).elemNum << " " << mAngle(i).axis;
for (j=0;j<mAngle(i).nnpe;j++) fout << " " <<mAngle(i).angle[j];
fout<<endl;
}
and this is the output i get:
1445 1 0 0 0 0 0 0 0 0 2.92381 2.92381 2.92381 2.92381 5.7
-
- C++ code skipping every second line of input file
by freediver
- 4 Replies
- Last post
by freediver
- I am reading lines of data from an input file. The number of variables on each line can change, so I read in the first X variables then skip to the next line. The problem is that if there are exactly X variables, it skips a line. I think this is because it already skips to the next line when it reads in the last number on the line.
I realise I could hack it by adding a dummy variable to the
-
- template maps
by alkatal
- 2 Replies
- Last post
by alkatal
- Hi want to get the key of a value for different map. I tried this template static T getfirst(const map<T, A> &v,const A &a) { std::map<T,A>::iterator iter; iter=v.find(a) if(iter!=v.end()) return iter->first; else throw Exceptions("Not found"); } but i get error C2663: 'std::_Tree<_Traits>::find' : 2 overloads have no legal conversion for 'this' pointer
-
- Don't panic
by Crend King &#40;Old Pr
- 14 Replies
- Last post
by Matt Berry
- When I intend to manually load the user32.dll into memory, after loading the sections and calling its DllMain, an error message appears that the system dll was relocated in memory.
If I load it at its preferred ImageBase and thus do not do relocation, this error occurs. However, if I load it into a system choosed address (pass NULL to VirtualAlloc), no error occurs. I can confirm
-
- using catch (...) vs catch (Exception * error)
by DotNetUser
- 1 Replies
- Last post
by crescens2k
- Why would one use catch (...) over catch (Exception * error) I know (...) catches all exception types but what exceptions would this be that (Exception* error) wouldn't catch In (...), what would I use to display the error message I'm coding in VC++.NET 2003 and .NET 2005.
-
- CDialog (change size)
by amigian
- 4 Replies
- Last post
by scor7910
- Hello out there,
I really need help. IĄ¯m trying to change the size of a CDialog with a fixed aspect ratio. This aspect ratio is set in InitDialog. Every method i tried in the last few days, doenĄ¯t work very well. I hope anybody can help me with that.
Bye
-
- Read a memory location
by mansid
- 2 Replies
- Last post
by Simple Samples
- hi, I want to read a memory location of system Actually i hav one h/w monitor ic acting as a slave to my cpu(master). this ic measures cpu temp,fan speed,voltage etc. i have an address 0x2e at which it is connected. i2c is used for communication. can anyone pls let me know how do i read the data read by this h/w monitor ic. how should i find out which memory location to read Please help. Thanks in
-
- Simple MFC DLL Application
by Tabella
- 5 Replies
- Last post
by Tabella
- It is going to be easy for you. Guys I need your help again.
I have two applications. One is Win32 and another is MFC DLL application. Win32 application depends on MFC DLL. These two projects are in one solution, to be precise. I have a sample function in MFC DLL looking like this
extern "C" __declspec ( dllexport ) double TestFunction( double a, double b)
{
r
-
- error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]'
by Rajith
- 14 Replies
- Last post
by HEBU
- When I try to compile the programe in VC7, I got some errors mensioned below, how to resolve them, suggest me.
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(34) : error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\new.h(100): could be 'void *operator
-
- Converting HEX to String ?
by robben07160
- 3 Replies
- Last post
by robben07160
- Hi,
I have an hexadecimal value stored as an unsigned long (C++ .NET), I use the value to extract data from an XML file therefore the file contains hexadecimal values also.
I use SelectNodes to extract the necessary information and therefore I need to change the Hex value to a string. However, as I convert it to a String the value changes, and as the X
-
- Accessing members of the derived class
by Automate
- 3 Replies
- Last post
by MS Johan Stenberg
- Hello All,
I need to know how to access members of the derived class from a base class object. Here's a code sample
System::Int32 test = 19;
ThreadProc(test);
void ThreadProc(Object^ data)
{ //need to know how and/or what i need to do to access members of Int32 class here
}
Thanks in advance!
-
- visual studio 2005 c++ adding onprint function
by Merlinv
- 3 Replies
- Last post
by Bite Qiu - MSFT
- I would like to add the onprint function to visual studio 2005 c++
code. Class wizard doesn't seem to exist. Suggestions on
how to do this
Thanks.
Merlinv
-
- How to make dynamic 2D arrays?
by EnigMa_AnGeL
- 10 Replies
- Last post
by mingerso
- Is it possible to have a dynamically sized 2D or 3D array For a normal 1D array, I have 2 methods: 1) create a pointer to a variable, then initializing it with a supplied size: int *iTemp; iTemp = new int[100]; 2) use a CList. CList<int,int&>iTemp; But these methods fail when I try to make a 2D array. i.e. iTemp = new int[10][10] \\not possible Is there a way to achieve this instead o
-
- ATL-COM: Failed to return new Code Element...
by UrK
- 4 Replies
- Last post
by UrK
- I have a problem with VS2005 SP1 C++ project. When trying to add new method to IDL interface of ATL project the following error is shown Failed to return new Code Element. Possibly syntax error. New Element Name: abc This worked previously on this machine. I could add new methods using wizard on other machine with the same VS but on some stage it stopped working too. On one of the machines the m
-
- member function already defined or declared while importing type from assembly
by badone
- 5 Replies
- Last post
by badone
- I have created a windows forms application with no special attributes. I have added a reference to a third party library written in C# the reference is from the .Net component section and works as expected. With all objects viewable in the object browser and Intellisense autocompleting member variables, functions, etc. The problem arrises when I try to create an object of a type that resides withi
-
- CArchive: Save on memory(RAM)
by kian_z20
- 2 Replies
- Last post
by kian_z20
- CArchive is very useful and easy to use in saving a document on a file. If it was to be done manually, the programmers would spend many time to save objects and face lots of errors.
I now need to save an object in the memory for copy and paste operation. is it possible to have CArchive to save on memory (RAM) rather than a file or somehow open a place on memory that pretends to be a file p
-
- Accessing Data In An Already Loaded DLL
by Tom Replogle
- 7 Replies
- Last post
by Simple Samples
- I asked a similar question a couple of days ago in the C# forum, but my question is revised now and concerns C++, since I'm pretty sure it can't be done in C#. Here is the scenario that I'm dealing with. I have ProgramA.exe on my computer that loads up LibraryA.dll when it starts. There are some classes and methods in LibraryA that ProgramA uses that I would like access to. For example, there's a