all groups > visual c > july 2004
Filter by week: 1 2 3 4 5
Problems with ArrayList::ToArray
Posted by Dirk at 7/31/2004 10:11:39 PM
Hello
The following code does not work
ArrayList __gc* allControls = new ArrayList();
.....
// put some Controls in allControls
....
Control __gc* arr[] = dynamic_cast<Control
__gc*[]>(allControls->ToArray(__typeof(Control)));
The cast does not succeed and arr is NULL. This is a transl... more >>
managed c++ and c#
Posted by Jason at 7/31/2004 9:35:54 PM
I am porting code from c++ and would like to use managed c++ to turn it into
an assembly for c#. The c++ code uses templates heavily ( via custom STL
containers ) and from what I read so does managed c++. How can I expose a
templated class for use in C#, or is it just an imposibility?
Jason
... more >>
KB article (Q832138) - Slow windows form loading
Posted by mphanke at 7/31/2004 12:45:56 PM
Hi,
I can't find this article in the knowledge base anymore. But it seems it
contains the fix I'm looking for. Can somebody post it here??
The problem is the designer loads my main window form extremly slow -
meaning it can take up to 3 mins until I can continue working. Same
thing happe... more >>
Can't find a way to get the ICeeGen interface
Posted by Nadav at 7/31/2004 5:07:02 AM
Hi,
1. I am writing some kind of a CLI Linker
2. I am using the unmanaged meta-data API.
I wonder browsing "cor.h" I have encountered the 'ICeeGen' this interface is retrieved by the 'ICorModule' interface, I didn't find any API that provide me the means to get an 'ICorModule' interface, how sh... more >>
.NET MFC new class wizard problem
Posted by JD at 7/30/2004 4:25:42 PM
Here's my senerio -- I create a dialog resource -- Then I do an 'Add Class'
specifying an MFC class with a CDialog base class. Now the Wizard goes into
a loop asking me to check out lots of my project files (maybe 50 files). And
it won't let me quit this until it iterates thru this set of unrelat... more >>
Regex library
Posted by Beeeeeeeeeeeeves at 7/30/2004 3:15:01 AM
Hi
I do mostly programming in VB6 and C# although I like to dabble in C++ now and again, I was just wondering what is a good* regular expression library to use for C++, given that I DON'T want to use managed C++.
* I define "good" in this case as conforming to the following priorities, in order:... more >>
C# Dll in a non dot net environment
Posted by Dave52 at 7/30/2004 1:27:02 AM
Is it possible to use a c# dll in an environment where the dot net framework has not been installed ?
For example will a C++ wrapper do the job?
Thanks.
DD... more >>
vc++ service needs to suppress application error dialog
Posted by m11533 at 7/29/2004 4:02:23 PM
I have written an application that runs as a subprocess of a service, where the service is a .NET C# Windows Service that simply starts the subprocess and then periodically checks that the subprocess is still running, restarting it if it have stopped.
The problem is that the application is occasi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
catching unmanaged exceptions in managed code, not working in release build
Posted by Vasco Lohrenscheit at 7/29/2004 3:18:05 PM
Hi,
I have a Problem with unmanaged exception. In the debug build it works
fine to catch unmanaged c++ exceptions from other dlls with
//managed code:
try
{
//the form loads unmanaged dlls out of which unmanaged exception //get
thrown
Application::Run(new Form1());
} catch (std::ex... more >>
Mixed mode managed/unmanaged dll that uses MFC problem
Posted by Olaf.Baeyens NO[at]SPAM skyscan.be at 7/29/2004 1:39:30 PM
I am stuck in a situation and I do believe that this should work, but it
doesn't.
I have a unmanaged dll, that uses MFC. This works great.
Now I recompile the unmanaged dll so it contains mixed mode
managed/unmanaged code, but only use unmanaged code, but this gives a error
the moment I wan... more >>
fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\main.c', line 148)
Posted by PufferFish at 7/29/2004 12:49:10 PM
Hi folks,
I hope that this is the correct group for these things, apologies if not.
I've got a strange compiler error. It appears to be similar to the issue
described in knowledgebase article 320004 except that particular problem was
fixed in .NET 2003, according to the article.
... more >>
HOW: Including native DLL in assembly?
Posted by Julie at 7/29/2004 11:08:30 AM
I'm currently working in a mixed mode project where the exe is C#, there is a
managed C++ (DLL) assembly, that in part, includes some calls into a native
(unmamanged) DLL.
I can build/link/run just fine, the question isn't about that.
What I'm after is, if I have another client that uses the... more >>
large array is not garbage collected
Posted by Howard Weiss at 7/29/2004 9:22:54 AM
I am reading a 160 mB file in my application. I want to access the file as
shorts. FileStream->Read wants to access the file as Byte so I do the
following
1) Read the filesize
2) Create a Byte[] array of the appropriate size
3) Read the file
4) Create a (global) nogc array of the same size ... more >>
Inlined functions in mixed mode C++
Posted by Steve McLellan at 7/28/2004 11:37:54 AM
Hi,
We've found some pretty serious performance hits that we didn't expect in a
mixed mode C++ application. The number crunching bits of our algorithms are
compiled with #pragma unmanaged. They call a number of inline functions
elsewhere, and from the documentation my understanding was that in... more >>
AssemblyInfo.cpp
Posted by mphanke at 7/28/2004 11:20:38 AM
Hi,
is there a possibility to set part of the strings contained in
AssemblyInfo.cpp to a default value which is the same for all project?
Like
[assembly:AssemblyCompanyAttribute("")];
[assembly:AssemblyCopyrightAttribute("")];
[assembly:AssemblyTrademarkAttribute("")];
they are all... more >>
Tooltip when over a specific location over an image
Posted by mphanke at 7/28/2004 11:09:01 AM
Hi,
I would like to place an Icon on an Image. If the mouse is over this
Icon, I want to display the associated text in a tooltip.
How would I do this? Any ideas? My last request wasn't answered so I
give it a second try.
Best regards,
Martin... more >>
Internal Compiler Error
Posted by mphanke at 7/28/2004 10:45:15 AM
Hi,
just in case this is somewhat new:
myfile.h(677): fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
inf... more >>
binary compatibility support for .NET assembly
Posted by someone at 7/27/2004 6:16:38 PM
Suppose that I have a class in an assembly that is delivered to the user,
what can I do to change the class so that it doesn't break the
binary compatibility? That is, user application can run with recompiling
and relinking.
I know that if I define an interface, and only expose the interface ... more >>
tracking file system changes
Posted by Muddassir at 7/27/2004 3:32:57 AM
hi everybody
I am writing an application for tracking files and directory changes
I used
FindFirstChangeNotification
FindNextChangeNotification
FindCloseChangeNotification
ReadDirectoryChangesW
and these are working fine and I can track all changes.
Now I want to interrupt th... more >>
Newbie question.....
Posted by Jim Hubbard at 7/27/2004 12:18:41 AM
Can you create C++ apps that do not require the .Net runtimes using C++
..Net?
... more >>
REPOST: extremely long link times
Posted by Steve McLellan at 7/26/2004 9:12:05 PM
Hi,
Sorry to repost, but this is becoming aggravating, and causing me a lot of
wasted time. I've got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe (or... more >>
Terminating Process
Posted by GTS at 7/26/2004 2:57:35 PM
Hi All,
I am spawning a process from a service. The spawned process hungs for
various reasons, (corrupted data, deadlock). I am expecting the process has
to complete the task with in the expected time limit, if it exceeds the
limit I want to terminate the process (no mercy or graceful, just te... more >>
How to access cells in an Excel Spreadsheet by row and column
Posted by Howard Weiss at 7/26/2004 1:19:39 PM
I would like to set a particular cell in an Excel Spreadsheet to a specific
value
Visual Basic Equivalent would be
Cells(row, column) = x
where row and column locate the cell and x is the value
In C++, I can execute code such as
Excel::Range* range1 = worksheet->get_Range(S"G1"... more >>
Read data from files using fstreams
Posted by José_Manuel_(JMN_CandyBeat) at 7/25/2004 4:52:45 PM
Hello.
I'm moving from Visual C++ 6.0 to Visual C++ .NET 2003 and I saw the
changes to the streams. I'm rewriting my code and finished doing it
yesterday.
All seemed to be right, but the file reading.
My old code has lines like the following function call:
(file is a ifstream, va... more >>
C++/CLI: handle to ref class member of native class
Posted by Slawomir Lisznianski at 7/25/2004 12:23:41 AM
The C++/CLI Language Specification Working Draft 1.5, Jun, 2004 doesn't
mention this scenario: can a handle to a ref class type be a member of a
native class?
Thanks,
Slawomir Lisznianski [ www.rhapsodia.org ]... more >>
C++/CLI: value classes feel crippled
Posted by Slawomir Lisznianski at 7/25/2004 12:16:15 AM
Lack of support for SMFs in value classes limits their use quite a bit.
The C++/CLI Language Specification seem to contradict itself in a few
places regarding this matter too. For example, the code snippet at page
33 of C++/CLI Language Specification Working Draft 1.5, Jun, 2004 has a
point... more >>
deterministic destruction support for managed types in VC++ 2005 beta 1
Posted by Slawomir Lisznianski at 7/25/2004 12:08:58 AM
Do ref classes indeed support instantiation on the stack? Similarly, can
native classes be instantiated on gc heap?
When you try to have a ref class instance on the stack, you'll get:
R : cannot use this type here without a top-level '^'.
When you try to instantiate a native class using g... more >>
I very confused :)
Posted by AAA at 7/24/2004 5:03:25 PM
I want to start programming in MS Visual C++. I understand that .NET is
required? Or do I have to get MSStudio to integrate my work into the NET
frame work? And any idea when VS 2005 is going to come out. Should I buy
MSC++ now and then up-grade? I need some real basic fatherly advice in
very so... more >>
VC++
Posted by Anand at 7/24/2004 3:26:02 AM
How to display text or images on Desttop using vc++ programming.
please help me if anyone known.... more >>
Outlook-like sidebar
Posted by mphanke at 7/23/2004 6:45:07 PM
Hi,
can anybody point me to source code of an Outlook like sidebar (those up
and down going thingies hiding the functions like calendar aso.)?
Or maybe the source for the toolbox control from VS?
Or are they implemented somewhere and I can download the component DLL?
(Please, only free stu... more >>
DDE Client and PFNCALLBACK
Posted by WildHare at 7/23/2004 4:29:37 PM
I am getting an error in a Windows Form which is supposed to be a DDEClient.
Error:
error C2440: 'type cast' : cannot convert from 'overloaded-function' to
'PFNCALLBACK'
Following are the pertinent areas of codes:
First we declare the prototype outside the Form Class:
HDDEDATA CALLBACK d... more >>
enum handling change in VS 2005
Posted by Craig Klementowski at 7/23/2004 1:37:43 PM
All,
I've installed the VS 2005 Beta 1 and was trying to build our current
product. I get a compile error when enum value is specified with
classname::enumname::enumvalue. Seems the compiler does not want the
enumname there anymore. This was not a problem with any previous versions of
VS. I c... more >>
DLL Hell
Posted by bay_bridge_tgv NO[at]SPAM yahoo.com at 7/23/2004 11:45:58 AM
Hello,
I have a .DLL compiled on VC++ 6.0 and is being linked into an
application built using 7.0. For reasons that are too stupid to go
into, migrating the .dll to 7.0 isn't possible for the time being.
On my development PC (Windows XP), the application runs fine; i.e.
the DLL calls work gr... more >>
Garbage Collection - Pointer out of scope, or not?
Posted by Mark Prenter at 7/23/2004 11:16:05 AM
Hi, I've got a question about .NET and pointer scope. Basically I'm trying
to find out how smart .NET is with it's garbage collection and realizing
when a variable is no longer used.
For the sake of this question, regardless of poor programming practices,
lets say I have a custom object which... more >>
Do you choose VS2002 or 2003?
Posted by Vicent at 7/23/2004 9:54:38 AM
Is it a need to upgrade VC 7.0 to VC 7.1? Thanks. Vicent
... more >>
Firt Admin Account
Posted by Coimbras at 7/23/2004 3:21:04 AM
How can I check if a UserGroup has the First Admin Account in it?
Thanks in advance... more >>
DLL and VBScript
Posted by The Truth at 7/22/2004 10:51:32 PM
All,
I would like to write a DLL with a few function that are not available in
WMI. I know how to write a dll but is there anything special that I must
add to it if I want to be able to you the function from with in it.
Example: In the dll there will be a function call GetMountPoint()
in... more >>
Exception thrown in managed C++ not understood in unmanaged C++
Posted by Mark Traudt at 7/22/2004 7:07:02 PM
The following managed C++ function is called from an unmanaged C++ DLL:
double Divide( double num, double denom )
{
if( denom == 0.0 )
throw new std::exception( "divide by zero" );
return num / denom;
}
The caller calls the function within a C++ try-catch block, with the follow... more >>
Ambiguous template function, best way to solve it...
Posted by Mark at 7/22/2004 2:36:29 PM
Hi,
I've got a template function
move_by( rect<T>&, T x, T y) being called as
rect<float> r;
move_by( r, 3.0, 4.0 );
However, i'm getting stupid ambiguities when I use
floating point numbers.
event_handler.cpp(43) : error C2782: 'void ' : template parameter 'T' is
ambiguous
... more >>
Viewing Call Stack?
Posted by Tommy Vercetti at 7/22/2004 11:48:05 AM
I have a complex threading deadlock scenario that I've been able to
reproduce in the debugger. I hit break and look at the call stack which
should tell me what I need. Except I only get the very bottom of the
call stack:
KERNEL32.DLL!7c573b28()
KERNEL32.DLL!7c573b50()
boost_thread-vc7... more >>
Release won't run
Posted by markus at 7/22/2004 10:33:04 AM
(Please excuse me for not really knowing where to post this.
I picked the biggest and best audience I know of.)
I am having trouble running my release build from VC7.
It doesn't. When started, it just shows a message box about failing to
initialize app + hex address + OK button to close it dow... more >>
URGENT Mixing Managed/unmanaged C++
Posted by Pascal Cloup at 7/22/2004 10:17:36 AM
Hello,
I encounter problems during execution of code like the followng that is part
of Dll of managed C++ classes.
When attempting to create the not managed objet (instance of CA) i always
get the exception:
.....System.NullReferenceException....
La référence d'objet n'est pas définie à une... more >>
convert from managed String to unmanaged char
Posted by keith at 7/22/2004 9:55:02 AM
In managed C++, there is variable String *s. The variable got value from a
C# assembly. Then I need to convert it into char *c in order to call
an external function in a dll that accepts parameter func(char c[]).
How to convert from String *s to char *c?
thanks
Keith... more >>
Class Wizard in .NET.
Posted by larsson_rob NO[at]SPAM hotmail-dot-com.no-spam.invalid at 7/22/2004 9:24:51 AM
In VC 6.0 I could easily add a function to handle a system message
e.g. WM_TIMER. But it seems that is not possible in .NET or? Any
ideas on how to do it without manually add the code?
BR /// Rob
... more >>
Property with pure virtual function
Posted by coser NO[at]SPAM altoqi.com.br at 7/22/2004 6:35:58 AM
Hi. I'm declaring a property on a base class that is represented by a
pure virtual function. Something like this:
public:
__declspec( property( get=GetWidth ) ) int Width;
virtual int GetWidth() = 0;
I'm implementing GetWidth in all subclasses, but I got the following
linker error:
... more >>
Image processing
Posted by Antonio Gómez at 7/22/2004 3:04:01 AM
Hi,
I'm working with images in Visual C++ and I need a fast method to access to individual pixels of an image. Actually I'm using the GetPixelAddress method of the Image class, but it's too slow.
Thanks for all.
... more >>
Display 2D Lines for mathematic application
Posted by gourou_gill NO[at]SPAM yahoo.com at 7/22/2004 2:22:58 AM
Hi There,
Does anyone can give me advices to choose a graphical
library/control/ocx/other to developp an application displaying 2d
lines from large data set (around 30 000 points).
I have to developp this app using Visual C++(6 or .NET). These data
are coming
right from an electronic devic... more >>
Does VC++.Net support C99 standard?
Posted by Tommy Shore at 7/21/2004 2:46:35 PM
Does VC++.Net support C99 standard?
... more >>
C++ code called from C#
Posted by Daniel P. at 7/21/2004 9:23:34 AM
I have some legacy code I would like to wrap by some new managed C++
classes, put them all into a DLL and then call the managed classes from a C#
app.
Can anyone recommend me a link with some info about this?
Also, can I statically link my DLL to my C# application or I have to ship
the Mana... more >>
PRJ0019: A tool returned an error code from....
Posted by alina_russ NO[at]SPAM hotmail-dot-com.no-spam.invalid at 7/21/2004 8:08:40 AM
error PRJ0019: A tool returned an error code from "Copying assemblies
to target directory..."
I got this when I added a reference to a project. The reference was to
a dll created in another project. Now if I copy the dll itself over to
the new directory it works fine, but I don't like doing th... more >>
|