all groups > visual c > october 2005
Filter by week: 1 2 3 4 5
Cannot compile any cpp programs
Posted by Nick Z. at 10/31/2005 9:42:01 PM
Whenever I try to compile a VC++ program using VS .NET 2003 I get an
error saying mspdb71.dll not found.
How can I fix this error?
PS. I ran vsvars32.bat and it did not change a thing.
Thanks,
Nick Z.... more >>
unicode and linking problems
Posted by bobnotbob at 10/31/2005 3:08:43 PM
I have created an application and am trying to call functions from a
previously existing dll. I can call some functions fine, but I get a
link error an when I try to call any function that takes either an
LPCTSTR or wchar_tas a parameter.
I am using C++ and Visual Studio .NET.
Here's two f... more >>
Compiler errors with MSVC 2005
Posted by brckcc at 10/31/2005 11:58:59 AM
I've got a managed extension library that I'm attempting to convert from MSVC
2003 to MSVC 2005.
I've converted the project file and am now attempting to compile the
application.
I get multiple occurrences of the following linker errors:
extern "C" void __clrcall ___CxxCallUnwindDtor(vo... more >>
Newbie question regarding data type casts.
Posted by Anthony Yott at 10/31/2005 10:25:04 AM
Folks,
I've inherited some C++ code that I'm trying to convert from VC++ 6.0 to
VC++ 2005 and was wondering if anyone could help as I haven't done any C++
programming in several years.
The code is basically trying to populate a struct that is defined in the
sspi.h file. The compile error... more >>
VS7.1 to VS 8 : MSVCMRTD.lib(mstartup.obj) : LNK2022 : tagTEXTMETR
Posted by consultutah NO[at]SPAM nospam.nospam at 10/31/2005 10:17:53 AM
I am trying to upgrade from VS7.1 to VS8, but whenever I link any of our MC++
DLL's, I get the following errors:
Creating library \sda\Main\bin\debug\XWRAP70.lib and object
\sda\Main\bin\debug\XWRAP70.exp
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(8013118D) :... more >>
VS2005 Compiler bug
Posted by Staffan Langin at 10/31/2005 12:00:00 AM
Hello,
Is there a workaround for the code-snippet below?
namespace A {
template<class T>
class Foo
{
};
}
template<class T>
class Foo : public A::Foo<T>
{
friend class A::Foo<T>;
};
... more >>
Set RightToLeft to TreeView
Posted by Igor at 10/30/2005 10:57:01 AM
Hi!
Does any one has working example of how to set TreeView to right to left
order. No matter of language.
I checked in Visual C, simple API, C#, nothing works.
Does it works at all ?
Thanks!
Igor.... more >>
ODBC and VC++.net 2005
Posted by Maileen at 10/30/2005 12:00:00 AM
Hi,
I'm writing a VC++.net 2005 application and i would like to use the ODBC
connector.
I would like to allow user to choose the DB he wants to have (MS SQL,
PostgreSQl, MySQL, Oracle,...) by choosing the write ODBC driver.
After that, i want to create a system DSN with information enter ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Write Operating System
Posted by Matt at 10/29/2005 1:57:01 PM
Hello,
How can I write an Operating System in C or C++
--
Mateusz Rajca... more >>
NET and VC6 DLLs
Posted by William GS at 10/29/2005 12:59:01 PM
Hello, I have some VC6 DLLs and I want to use them with NET EXEs (MFC 7.0),
but the linker give me many errors, especially in functios with CStrings
(parameters or return); How can I fix it? or have I to compile the VC6 DLLs
in NET?
Thanks in advance,
William GS... more >>
Weird refresh/paint situation
Posted by Peter Oliphant at 10/28/2005 1:08:20 PM
I'm drawing graphics using the Graphics object one can grab in a Form's
Paint event. But I'm getting a weird thing happening...
These graphic shapes flicker (even if unchanged). UNLESS- I created a timer
and had the timer update a Label on the form with timer interval set to 10.
Now all the... more >>
DataGrid Custom Control Question
Posted by gnassar NO[at]SPAM gmail.com at 10/28/2005 11:29:25 AM
I'm creating a simple custom control by inheriting the DataGrid
Control. The reason I want to do this is because I want to stop the
user from being able to enter the tables inside. Seems contrary to what
the control is supposed to do but this is what I need.
When someone is to click on the tab... more >>
memory options
Posted by ve at 10/28/2005 9:29:07 AM
hi i am developing visual studio c++ application. basically i would like to
give memory usage options for the runtime for running my programe? i know how
to do it in jave but is dont know how to give for a c++ program?
do any one of you know how to set these options?
... more >>
Internet Explorer
Posted by Shaby at 10/28/2005 8:58:02 AM
Hi
I'm having an multithreaded MFC application with win32 interface VC++ 7. I
need to add one more feature in this, so a particular web site can be opened
with in a window of this application. I don't allow users to go out of this
application so want to use an internal window/frame using d... more >>
Performance Breakdown Writing to Memory Location
Posted by Chucker at 10/28/2005 6:52:03 AM
Hi Folks!
For some reasons, this code:
> float tmp = 0.;
> for (int i = 0; i < 2000; i++) {
> for (int j = i; j < 2000; j++) {
> for (int k = 0; k < 9000; k++) {
> tmp += tmp_mat(k,i) * tmp_mat(k,j);
> }
> tmp = 0.... more >>
Porting .NET Encryption to Win32 or ATL
Posted by Sygnosys at 10/28/2005 2:03:52 AM
Hi,
I have a piece of code in .NET that encrypts a string.
The .NET code is quite simple and through the last couple of days I've
been trying to build it's equivalent in ATL playing arround with CCrypt
classes and I just haven't been able to get it right.
So if anyone can help me porting th... more >>
[bug]Vc7\include\yvals.h(18) : fatal error C1017: invalid integer constant expression
Posted by at 10/28/2005 12:00:00 AM
The following code snippet can be build in VC 6.0, but failed in VC 2003.
//////////////save the following code in t.cpp
#define _MT
#define _WIN32_WINNT 0x0500
#include <iostream>
#include <process.h>
#include <windows.h>
#pragma comment(lib,"libcmt.lib")
__int64 Counter=0;
BOOL volatile s... more >>
Create EnterpriseLibrary.Data.Database object from connection stri
Posted by Jake_adl at 10/27/2005 9:08:04 PM
Is there any way to create a
Microsoft.Practices.EnterpriseLibrary.Data.Database object without reading
from a configuration file?
I am writing a utility that manages databases in SQL Server. The utility
queries SQL Server for the database names. So I don't know the names of the
databases... more >>
[C++/CLI] Determine struct layout from header file - reflection?
Posted by Jack Ukleja at 10/27/2005 6:13:04 PM
Hi guys,
I'm trying to figure out a way to do reflection on structs which are in a
legacy c++ header file. Basically I want to write a C++/CLI program that lets
me edit the binary data in the structs, but there are many of these structs
so it has to be automated. Also I do not want to have ... more >>
How do I "export makefile" in Visual Studio 2003?
Posted by Mark A. Hausman at 10/27/2005 5:35:03 PM
In order to make some very large projects available to other developers who
do not use Visual Studio (or even Windows, in some cases), I need to generate
standard-format Make files.
In Visual C++ 6.0, there was an "export makefile" command on the "Project"
menu. Now that I am using Visual ... more >>
Number of elements is an array
Posted by Peter Oliphant at 10/27/2005 3:39:23 PM
Say I have a line in my code something like the following (NOTE: Point is
__value class System::Drawing::Point):
Point point[] = new Point[3] ;
How do I now 'ask' 'point' how many elements it has (in this case the answer
is 3)?
This does NOT work:
int element_count = sizeof(point) ; ... more >>
migrating VC6 to VC8
Posted by Tony Johansson at 10/27/2005 8:28:30 AM
Hello!!
You may correct me if I say something that is not right.
If I want to use the .NET framework for an VC6/MFC application I must
compile the VC6/MFC to VC8 using the /CLI switch after removing all the
errors?
The old MFC will work in the new VS2005(VC8)
My MFC project consist of ... more >>
some more question about VC7.1 and VC8
Posted by Tony Johansson at 10/27/2005 12:00:00 AM
Hello!
I thought I had strategy clear to me that if I want to use .NET in an
VC6/MFC I must use compile in VC8 with the CLR switch.
But now I get another answer it says. I asked this question.
If I want to use the .NET framework for an VC6/MFC application I must
compile the VC6/MFC to VC8 ... more >>
managed code or unmanaged
Posted by Tony Johansson at 10/26/2005 10:11:44 PM
Hello!
Is the statements below correct understood.
If I intend to use C++ in VS2005 I can either use managed code which is
C++/CLI which give me the possibility to mix other language such as C# or VB
or use unmanaged code for example using MFC then I can not mix other
language.
Does VC... more >>
Newbie Question
Posted by S Shulman at 10/26/2005 9:25:53 PM
Hi
I have a not managed code MFC project in VC.NET and I want to convert it to
C# or at least a managed version of VC.NET (if exists)
Thank you
... more >>
Basic .NET question
Posted by Tony Johansson at 10/26/2005 7:17:21 PM
Hello!
I have some questions and I want to be sure about the :NET environment..
Question number 1:
Is this right C++/CLI hasn't existed until in VS++ 2005(VC8)
Question number 2:
When you compile a .NET code the .NET compiler produces Intermediate
Language(IL code) and metadata.
Que... more >>
How to implement 'atoi' when radix=16 and number string is negati
Posted by Tracey at 10/26/2005 6:22:02 PM
I'm learning C++ and was stuck when writing code to convert a negative
decimal number string to a hexdecimal number. For example, suppose the
function interface is defined as:
int atoi( const char*, size_t radix)
One input string is "-1234" and radix is 16.
How to get the correct he... more >>
stdlib errors
Posted by Jim Bish at 10/26/2005 4:58:07 PM
I am porting some code form vs2003 to vs2005 - it is unmanaged CPP. The
solution consists of several library projects and a console project. The
library projects all build fine but when I get to the console appliation, I
get lots of errors in stdlib.h - C2733 and C2059 errors. Does anyone k... more >>
Graphics 102 : regional refresh of form/control
Posted by Peter Oliphant at 10/26/2005 4:57:55 PM
I now have graphics being drawn in the Paint event of my form (yeah, and
it's very cool). Problem was that it only updated any changes to these
graphics when Paint was called.
So, I then made it so the Refresh() method of the form was called for each
graphic object. In this case it drew jus... more >>
Virtual bool bug in VS2005 ?
Posted by Kevin Frey at 10/26/2005 10:32:47 AM
Hello,
Does anyone know if the "virtual bool bug" is still present in VS2005 when
calling between managed and unmanaged code?
Thanks
Kevin
... more >>
MFC Integration/Migration
Posted by daveboyd at 10/26/2005 9:50:02 AM
Hi!
I have an MFC application that is under development in VS2003 and frankly
MFC seems difficult to use and poorly documented -- I frequently find the
only way to get example code is on the Internet, not in the huge, mosly
useless "MSDN Library". For example, I was advised to use CStatic ... more >>
Managed C++ projects always rebuild
Posted by Pinnguy at 10/26/2005 8:36:03 AM
Hello, I have started to use managed C++ in VS 2003. I have several .NET
class libraries written in MC++.
I am finding the rebuild tendencies in VS to be very annoying. If I make a
minor change to a C++ file (not header), it causes all depend projects to
rebuild. I have not changed any cla... more >>
passing naitve function pointers to naitve code
Posted by MrPugh NO[at]SPAM gmx.de at 10/26/2005 5:37:48 AM
Hi!
I have a strange problem:
I need to wrap a C-function in a native DLL into a C#-class. This
function expects one C-function pointer out of a set of some
C-functions defined in the same DLL.
How can I access and pass such a C-function pointer to a C-function out
of C#?
Thank You!
... more >>
BYTE datatype used for an unknown amount of data
Posted by aengus NO[at]SPAM gmail.com at 10/26/2005 1:23:49 AM
Hi,
I am looking to find out how to deal with the BYTE datatype in VC, as
used below:
This struct is part of the API for a Garmin GPS unit:
typedef struct
{
unsigned char mPacketType; // 0 1 byte
unsigned char mReserved1; // 1 1 byte
unsigned short mReserved2; ... more >>
OnPrepareDC
Posted by Tony Johansson at 10/26/2005 12:00:00 AM
Hello!
I have this overridden OnPrepareDC and at the end of this method the base
class OnPrepareDC is called.
If remove the call to the base class this OnPrepareDC work the same. So
calling the base class has not affect in this example.
If you override the OnPrepareDC is it really necessary... more >>
CClientDC
Posted by Tony Johansson at 10/26/2005 12:00:00 AM
Hello!
The CClientDC class is derived from CDC and takes care of calling the
Windows functions GetDC at construction time and ReleaseDC at destruction
time. This means that the device context associated with a CClientDC object
is the client area of a window.
The rows above is from the do... more >>
Threads & WindowsForms(a problem)
Posted by Basel Al-Khateeb at 10/25/2005 8:05:02 PM
Hello there,
I have a problem with windows form that is
Iam trying to create a thread that needs to access my form
I defined a member function called func
void func()
{
//stuff
this->prop = val ;
}
then I created the thread in a button_click event like this
On_Button_Click(.....)
{
... more >>
delegate problem
Posted by karch at 10/25/2005 7:45:29 PM
I can't figure out why this code does not compile - says that 'num' in an
undeclared identifier and that 'delegate':identifier not found. Thoughts?
Help?
void MethodD()
{
List<int>^ data;
BinaryFormatter^ formatter = gcnew BinaryFormatter();
MemoryStream^ stream = gcnew MemoryS... more >>
Conversion C#->CLI (snippets)
Posted by karch at 10/25/2005 6:45:45 PM
Thanks to everyone who has helped with some of my elementary questions about
C++/CLI equivalents to C#. I have a few more items that are giving me
headaches. All help is appreciated. What is the proper way to convert the
following?
1) data.ForEach(delegate(int num)
{ formatter->Ser... more >>
stdafx.h - what's it all about?
Posted by Peter Oliphant at 10/25/2005 3:05:52 PM
I know that 'stdafx.h' has to do with pre-compiled headers. However, it seem
weird that it is a required 'include' in any CPP file, especially since the
file itself has no code in it!
I know that 'stdafx.h' is a good place to put "include files that are used
frequently, but are changed inf... more >>
CComPtr Question
Posted by Rob Schieber at 10/25/2005 11:36:26 AM
Hey guys,
Quick Question. Lets say Im using the XMLHTTPObject to return an
IStream. In General, is it better to return the object as
CComPtr<IStream> spIstream;
QueryInterface.. &spIstream and not worry about Release, or to use
(IStream*)varValue.punkval then use release? I guess the bi... more >>
serialization and deserialization problem
Posted by AnkitAsDeveloper [Ankit] at 10/25/2005 7:10:55 AM
Hi i am serializing a 'ref struct' object as follows :
private: void Seri( String ^path, Object^ obj )
{
FileStream^ fileStrm ;
try
{
//Serialize entire object into Binary stream
fileStrm = File::Open( path , FileMode::Create );
BinaryFormatter^ binFormatter = gcnew Bin... more >>
Is it possible to compile and run c programs in the visual C++ .NE
Posted by Kueishiong Tu at 10/25/2005 3:52:02 AM
I have a bunch of C programs from sun. I would like to port them over to PC.
I am wondering if I can simply recompile and run them in Visual C++ .NET
without
having to making a lot of changes? Specifically how to invoke C run time
library from Visaul C++ .NET?... more >>
Separating Definition and Declaration of a class
Posted by AnkitAsDeveloper [Ankit] at 10/25/2005 3:37:47 AM
As all we know, in order to remove cyclic includes in C++ we seperate
the declarations and definitions of classs and it's member in two files
Header (*.h) and source files (*.cpp). This is not a problem for C# as
there is no concept of include.
I faced problems for seperating declarations and ... more >>
C++/CLI equivalent to as keyword?
Posted by karch at 10/25/2005 2:12:17 AM
How would this C# contruct be represented in C++/CLI? Or is it even
possible?
PolicyLevel level = (enumerator->Current) as PolicyLevel;
Thanks,
Karch
... more >>
Returning a Pointer
Posted by Abubakar at 10/25/2005 12:00:00 AM
Hi,
its a c++ question. If I have the following code:
TCHAR * getsomestring()
{
TCHAR buff[2000];
// here I copy something in the buffer using wcscpy.
return buff;
}
Is this a valid code? I mean I see it as a buff allocated on the stack which
should be destroyed on the retu... more >>
c++/CLI mixed mode dlls and clr initialisation
Posted by bonk at 10/24/2005 10:20:22 PM
I have a plain unmanaged exe (no /CLR) that is supposed to to use classes
from a mixed mode dll (dll that uses .NET internally). That dll only needs
to expose unmanaged interfaces (classes and/or functions). This is of course
no problem and it works fine. However I have the special scenario where... more >>
Conversion Question: C# -> C++ CLI
Posted by karch at 10/24/2005 6:53:08 PM
I am beginning to write my first applications with C++/CLI and was wondering
if someone could demonstrate the proper way to convert a sample piece of
code. I just need some help understanding the new syntax for handles and
iterating, etc. Thanks in advance for the help.
SoapFormatter format... more >>
VS2005 & C++ intellisense
Posted by Lloyd Dupont at 10/24/2005 5:52:41 PM
How to disable the intellisense / file parsing in VS2005 (beta 2)?
As soon as my header get over a few hundreds lines modifying them becames a
pain, VS.NET keeps frozing... (presumably to parse the header).
This is insufferable!
--
There are 10 kinds of people in this world. Those who under... more >>
How to get a LOGFONT from an HFONT
Posted by Lloyd Dupont at 10/24/2005 4:41:41 PM
I am using some COM interface to create some HFONT.
Trouble is, the font created with this COM interface should be release with
this COM intrface.
And I don't see how I could make it work nicely with my ManagedC++ wrapper.
The solution I though of is:
when the COM interface create this refer... more >>
|