all groups > visual c > december 2005
Filter by week: 1 2 3 4 5
Exception in constructor calls destructor????
Posted by JAL at 12/31/2005 6:55:02 PM
According to MSDN2, if a managed class throws an exception in the
constructor, the destructor will be called. If an exception is thrown in the
constructor the object never existed so how in the world can the destructor
of a object that does not exist get called!
Here is the MSDN2 document:
... more >>
Compile error C3641
Posted by Wayne Allen at 12/31/2005 6:10:32 PM
I am receiving a compile error when attempting to include Directshow in a
managed C++ program using Visual C++ 2005 Express Edition Version 8. The
..NET framework is version 2.0.50727. To recreate the error, do the
following steps in Visual C++ 2005 Express Edition:
1. Create a new Windows ... more >>
nested native class in managed class in VC8 not allowed??
Posted by Lonewolf at 12/30/2005 1:00:27 PM
Hi everyone..
I was trying to implement callback fucntions in native codes in my
VC8 class, and referred to some online codes which use native class
nested within managed class. basically of the form,
__gc class CManagedClass
{
__nogc CNativeClass
{
//blah blah blah... more >>
VS.NET 2K5 editor problems
Posted by mike2036 at 12/30/2005 10:58:02 AM
When I add a new line in my VC++ application, the editor is really slow to
add the new line. Is there a configuration setting I can use to speed up
line add's? Thanks.
-Mike
... more >>
.Net security and mixed assemblies
Posted by Colin Desmond at 12/30/2005 9:46:03 AM
I have a series of assemblies which used to be unmanaged code and have now
had the /clr switch thrown on them to create managed code, but using win32
types etc rather than Safe CLR code.
How much of the .Net security facilities can be applied to this code?
Thanks
Colin... more >>
Help Needed...its urgent plz
Posted by shashank.aka.invi NO[at]SPAM gmail.com at 12/29/2005 12:06:25 PM
Hi someone plz help me. I have made a dll in VC++ .NET using following
specifications
extern "C"
{
__declspec(dllexport) void Probe_Interfaces_Local()
{
//some code
}
}
i compiled it successfully and add the dll formed to another... more >>
can't link after converting VC++6.0 to 2003
Posted by Wanjun Yu at 12/29/2005 11:53:56 AM
I have just loaded my VC++6 projects in Visual Studio 2003. It converted the
project files just fine.
I have a MFC dll that links against a WIN32 dll. In the WIN32 dll, I have
exported some functions (not classes).
But now it won't link any more (Teh projects works file in VC++6). The MFC ... more >>
visual c++ .net 2003 bug in c4090 waring
Posted by Murali Yeddanapudi at 12/29/2005 11:40:03 AM
Hi
The C code (not C++) below (test.c) generates a warning:
#include <stdlib.h>
int main()
{
const char** a = (const char**) malloc(1*sizeof(const char*));
a[0] = "boo";
free(a);
return(0);
}
If I compile above with MSVC 7.1:
I:\tm... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
problem adding reference
Posted by shashank.aka.invi NO[at]SPAM gmail.com at 12/29/2005 9:00:53 AM
Hi someone plz help me. I have made a dll in VC++ .NET using following
specifications
extern "C"
{
__declspec(dllexport) void Probe_Interfaces_Local()
{
//some code
}
}
i compiled it successfully and add the dll formed to another C... more >>
Unable to cast object
Posted by Colin Desmond at 12/29/2005 8:22:02 AM
I have a C++/CLI interface IPlugin in one assembly (a windows service) that
is inherited and implemented in another assembly (dll) by a class CPlugin. I
want to be able to create instance of this class dynamically at runtime, so I
load the dll assembly using
Assembly^ assembly = Assembly::... more >>
runtime error, help
Posted by yuanlinjiang NO[at]SPAM gmail.com at 12/29/2005 4:22:34 AM
I am working on converting a win32 console application from VC6 to VC7.
My version is Microsoft Development Environment 2003 version 7.1.3088.
The code works fine on VC6. it is a console program for scientific
computation, so it has nothing to do with MFC. But it needs some
other libraries s... more >>
Are conversion operators "illegal" in C++/CLI?
Posted by Påhl Melin at 12/29/2005 1:38:57 AM
I have some problems using conversion operators in C++/CLI. In my
project I have two ref class:es Signal and SignalMask and I have an
conversion function in Signal to convert Signal:s to SignalMask:s. The
reason is I have a free function called WaitSignal that accepts av
SignalMask where Signal... more >>
ATL::g_pfnGetThreadACP VS2005
Posted by Thomas Wegener at 12/28/2005 3:45:47 PM
I moved from VS2003 to VS2005
I use the conversion functions from the 'atlconv.h'. Since I use the VS 2005
I get the unresolved linker error ATL::g_pfnGetThreadACP.
Anybody know in which file or library this function are defined?
Thanks Thomas
... more >>
removing msvcp80 dependency
Posted by Abubakar at 12/28/2005 12:01:10 PM
Hi,
I wrote some network n multithreading code in pure c++, my exe compiles with
only 9k. But it requires msvcp80.dll & msvcr80 dlls to run on a different
machine. I want to build my exe such that I dont have to provide these dlls
with my exe. I know that size would increase but thats not a prob... more >>
How to update a Edit Control as fast as possible?
Posted by larry at 12/28/2005 11:52:38 AM
In my program I tried to update a edit control's text very fast, but It
seems there's no time to update it.
Following is my code. IDC_EDIT1 is a edit control;
//***************************
CString strTest;
for(int i=0;i<10;i++)
{
strTest.Format("%d",i);
CWnd* pwnd=GetDlgItem(IDC_ED... more >>
file comparision
Posted by krallabandi NO[at]SPAM gmail.com at 12/28/2005 11:02:55 AM
Hi,
I have a requirement to compare 2 ASCII text files and show the results
in an aspx form.
The comparision algorithnm, out put should be similar to VSS
(differences between 2 files).
I really appreciate if you can tell me the best way of doing this and
what web controls suits this requir... more >>
VS 2005 'Go to definition' (F12) with file references
Posted by Alan at 12/28/2005 6:10:33 AM
We just switched from vs 2003 to vs 2005. We have a large number of
projects in the solution. So to make it easier on everyone we use file
references instead of project references. The biggest issue so far that
I have with 2005 is that if file references are used then the "Go to
definition" comm... more >>
XP Look And Feel in VSC++6 and VSC++.NET
Posted by Joachim at 12/28/2005 1:06:02 AM
How can I get the Windows XP look and feel in Visual Studio C++ 6 and
in Visual Studio C++ .NET?... more >>
CLI C++: Events in Interfaces
Posted by Grafix at 12/27/2005 12:19:38 PM
All -
I am facing couple of problems with events in CLI C++.
If i have an interface that declares few events, and a ref class implements
that interface, should it do anything extra from events perspective?
interface class IMyClass
{
public:
event MyDeleg^ MyEvent;
}
ref class My... more >>
Compilation error ostringstream
Posted by Michael at 12/27/2005 2:22:28 AM
Hello,
I can't use STL class 'ostringsstream' in an VC++.net project, because
compilation produces the following error:
Microsoft Visual Studio .NET 2003\Vc7\include\ostream(243): error
C2039: 'failed': no element of
'std::ostreambuf_iterator<_Elem,_Traits>'
with
[
... more >>
operator= for derived class
Posted by Roger Garrett at 12/26/2005 1:53:02 PM
I'm having a problem with a derived class. When a copy is made of
the object it does indeed copy the additional member variables of
the object but it does not seem to be copying the members of the base class.
I have a class that is derived fom Cwnd, as follows:
#pragma once
#include "Bitm... more >>
VS 2005: Dispose method Reserved
Posted by Grafix at 12/26/2005 9:06:02 AM
All -
As we all know, Dispose method is reserved in C++ 8 and the expected syntax
is to use ~MyClass().
In 1.1, we used to have following structure for Dispose
[Code illustrated in C# for brevity:-)]
class MyClass : IDisposable
{
public void Dispose() { Dispose(true); GC.Supressxxx(th... more >>
Truth or fiction __LINE__ and C1055?
Posted by Scythen at 12/25/2005 9:43:02 PM
This is related to my last post “Should templates be included in pch files?â€.
After searching for more information on C1055 I found several mentions of
__LINE__ causing this to happen more often.
Is there any truth to this?... more >>
Data Link - Can't connect to database
Posted by Alex Hardin at 12/23/2005 10:29:08 PM
Hey,
I'm trying to use the connect to database wizard to connect to a MySQL
database on my web server, 66.235.193.45 (I'm actually not sure if that
points specifically to my part of the server, if not, the domain that
goes right to is is www.freddyswebgraphics.com, which I have tried as
well), ... more >>
why to call LoadLibrary() error?
Posted by Vic.Dong at 12/23/2005 8:24:58 PM
Hi all:
I call windows api LoadLibrary(), it returns error code : ERROR_NOACCESS
0x3E6,
why is it failure to call this api? how to fix this problem?
B.G.
Vic
... more >>
Should templates be included in pch files?
Posted by Scythen at 12/23/2005 6:16:02 PM
I thought that including template headers such as <vector> in the pch is not
useful.
Templates can’t be compiled without the template arguments so there is no
way to pre compile them.
Is this true?
Also, it seems that this could actually be bad since it will significantly
increase the... more >>
Problems displaying output from vc++ program
Posted by royzeb at 12/23/2005 5:01:42 AM
Hi, I've got a simple vc++ program that basically just runs a daemon in
the background and sends update messages to a logfile as it goes along.
What I'd like to do is see these log messages also displayed in a
window - either a dos window or a 'proper' window with a text field
etc...
I can ... more >>
WinNT and Compilation in .Net
Posted by theali at 12/23/2005 4:16:00 AM
Hi to all
I am getting a problem while running my application complied in Visual
Studio .NET on Winnt
Problem:
i got message:
The procedure entry point GetMonitorInfoA could not be located in
Dynamic dll USER32.dll
(GetMonitorinfo (GetMenuinfo, GetMonitorinfoA))
as i run my appl... more >>
Cannot set breakpoint. Decorated name length exceeded?
Posted by Chris Stankevitz at 12/22/2005 2:43:16 PM
Hi all,
I once had a function in which I could not set a breakpoint. VS VC++ .net
2003 7.1 (native c++) would crash. This particular function had about five
arguments. Each argument was an STL container of some sort. The "expanded"
name of the function (with all templates written out) was ... more >>
Debug version of LIB/DLL isn't linking with caller
Posted by mike2036 at 12/22/2005 2:03:02 PM
Forgive me for re-posting this...in the first post, I replied to myself, and
the self-reply may having sounded like I found the problem, but it was
actually a correction.
-----------------
I have a very strange problem trying to link the debug version of my caller
application with one of... more >>
Migrating to VC 8 from VC 7: link errors
Posted by PDHB at 12/22/2005 10:57:03 AM
Hi.
I'm trying to migrate a small library to VC8 via the wizard, but when I try
to compile I get the following errors:
Error 1 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 2 error LNK2001: unresolved external symbol "?.cctor@@$$... more >>
Debug version of LIB/DLL isn't linking with caller
Posted by mike2036 at 12/22/2005 10:47:01 AM
I have a very strange problem trying to link the debug version of my caller
application with one of my DLL's using .NET 2K5. The linker declares the
following error (one of many):
error LNK2001: unresolved external symbol
__imp_?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z
When I pe... more >>
Template class and __nogc
Posted by Stormy at 12/22/2005 7:58:20 AM
Can I define a template class as following
#pragma unmanaged
#include "mybaseclass.h"
#pragma managed
namespace mymanaged1
{
namespace mymanaged2
{
namespace myunmanaged
{
template<class T>
... more >>
Linking Errors .....any one plz help
Posted by omermadni NO[at]SPAM gmail.com at 12/22/2005 5:19:27 AM
Its a COM dll that i generated and tested using debug configuration
.....but now its about to be dilevered and as i try to convert it into
release config. removing DEBUG flags , its really doing me a lot lot
trouble ,...the link errors
ExportDevices error LNK2019: unresolved external symbol... more >>
How can I set my application in the status area?
Posted by Kun Niu at 12/21/2005 8:57:02 PM
Dear all,
I've got a problem to set my application in the status area so that I can
receive application message while the window is minimized.
Just put my icon beside my input method in the right corner of windows.
Is it possible to do it with win32 api?
If so, which one shall I call?
Loo... more >>
running class method as a thread proc
Posted by Abubakar at 12/21/2005 6:33:20 PM
Hi,
Lets say I have a method called "listen_proc" inside "class1". There is
another method called "start" in the same class that has to start the
"listen_proc" inside a new thread. I am using CreateThread but I cannot
manage to pass the right function pointer, the compiler keeps on giving
error... more >>
Firefox and Updates
Posted by Peter Oliphant at 12/21/2005 3:31:52 PM
I use Firefox as my browser. As a result, I'm banned from getting Windows
Updates. This seems a bit monopolistic on MS's part, and it means if there
is a security problem or a VS C++.NET 2005 patch needed, I'm out of luck.
This seems wrong to me...
BTW, I do have IE on my system, but it wo... more >>
Does anybody write down AssemblyInfo attributes?
Posted by Hovsep Mkrtchyan at 12/21/2005 1:07:26 PM
That is:
In AssembyInfo.cpp I've wrote
[assembly:AssemblyVersionAttribute("1.5.3.0")]
But after compile in dll properties window there is no Version tag.
Does anybody solved this issue? Maybe there must be something mentioned in
compiller tags or so on?
Thanks,
Me.
... more >>
Project Custom Build Setup, associated file?
Posted by Peter Ritchie at 12/21/2005 9:00:02 AM
In VS/VC 2003:
Simple question: for the Custom Build Step for the project (right click the
project in the Solution Explorer, select "Properties", select the "Custom
Build Step" in the "Configuration Properties" tree at the left, then select
"General" under "Custom Build Step"), what is the ... more >>
MFC group box question
Posted by Bruno van Dooren at 12/20/2005 10:14:59 PM
Hi,
i am working on a small MFC dialog based application.
a number of controls belongs together and i want to enable / disable them
together.
i thought i'd use a group box, just as you'd do in a C# application, but i
just can't find any way
to use the group box as anything other than a d... more >>
Remote object call from COM component
Posted by Dave at 12/20/2005 5:09:50 PM
I have an existing COM component written in C++ that does some Windows
account management stuff. We're moving to Active Directory and rather
than change the whole application, the only changes required are to the
COM component. I want to move the functionality of the COM component to
a remoted C... more >>
VS 2005 Win 32 Console Project Behavior
Posted by pvdg42 at 12/20/2005 3:52:01 PM
When we use Visual Studio in beginning C++ classes, we routinely follow the
scenario below.
Create a Win 32 Console Project (empty).
Add a C++ source code file to the project.
Enter code (simple example below).
#include <iostream>
#include <string>
using namespace... more >>
IJW C++ / MCC++ interactivity question
Posted by saunderl NO[at]SPAM hotmail.com at 12/20/2005 12:32:10 PM
Hello Everyone,
I am extending a legacy app that will load DLL's dynamically. I've
worked out how to call C# DLL's from a mixed mode DLL.
Now I thought I'd delve farther into IJW and mixed mode by trying to
re-create the C# DLL in MC++.
I added a Win Form to the project. Now I want to c... more >>
How do I implement an interface with VB.Net?
Posted by Jim at 12/20/2005 11:27:13 AM
I am using VB.Net 2.0 and I am completely new to the concept of implementing
interfaces. Can anyone explain "implementing interfaces" to me and perhaps
give me an example of implementing an interface that would help me implement
the IIneternetSecurityManager interface mentioned under "Creatin... more >>
C++ interop help
Posted by Robert Ginsburg at 12/20/2005 10:30:54 AM
I have an ATL DLL that hosts a COM object. Without managed extensions the
object compiles and works fine. Now with some assistance from Will DePalo
(on a different thread in this group) I figured out how to add CLR support
to my object and how to call into managed code. The code and the calls ... more >>
Can't call WriteProfileInt
Posted by MCC at 12/20/2005 10:20:02 AM
Can't call WriteProfileInt -- I get undeclared identifier. If I
#include <afxwin.h> -- and declare it in my .h -- I still get unresolved
external.
-- Need to write to ini, don't want to write to registry --
WriteProfileString works fine though.
???
Thanks.... more >>
Problems with this->CreateGraphics()
Posted by saunderl NO[at]SPAM hotmail.com at 12/20/2005 9:53:41 AM
Hello Everyone,
I'm trying to just play with managed VC++. I just want to draw a box
on the form when it is clicked. Here is my click event handler
System::Void Test_Click(System::Object^ sender, System::EventArgs^ e)
{
// Create a Graphics object for the Control.
Graphics* g = thi... more >>
DLL Hell - gracefull handling/app termination
Posted by Susan Baker at 12/20/2005 2:50:21 AM
Hi,
I am writing a Win32 DLL. I want to be able to handle any SEGVs
(segmentation violations) gracefully, by using an error handler of sorts.
Currently, if a user of my DLL (typically a VB programmer) passes a null
(or invalid) pointer to my library - the entire application crashes,
leav... more >>
How to overload [][] operator in C++.NET
Posted by vcmkrishnan.techie NO[at]SPAM gmail.com at 12/20/2005 2:07:06 AM
Hi all,
In managed C++, can I overload the operator [] to access data members
in the following way
Create object objTime;
seconds = obj["Hour"]["Min"];
or
seconds = obj[12][45];
Thanks
Mohan
... more >>
Compile error C4430 with Visual C++ 2005
Posted by John at 12/20/2005 12:20:10 AM
Hi,
I am working on a legacy code. Following is a line of the code which
complies with Visual C++.NET 2003 but not with Visual C++ 2005:
for ( int i = 0; i < (const)(X.size()); i++ ) {}// X is an object such as a
standard Vector
Compile error with Visual C++ 2005:
error C4430: missing ty... more >>
|