all groups > visual c > september 2004
Filter by week: 1 2 3 4 5
Future of C++ and .NET/WinFX
Posted by Jason Vene at 9/30/2004 6:51:58 PM
I've looked at recent posts and not found material, but I'm new to the
board, so please forgive if this thread has come up before.
I'm facing a conundrum about development of business applications which have
robust user interface requirements (sorry, details must be kept private).
The UI will ... more >>
Writing binary data in managed C++
Posted by Peter Steele at 9/30/2004 4:24:16 PM
I have a managed C++ project that contains a simple structure:
struct
{
<multiple members>
} mydata;
I want to write the contents of this structure out to disk retaining the
exactly binary data without any additional header information, and of course
be able to later read it back in... more >>
Size of int (once again, sorry)
Posted by Agoston Bejo at 9/30/2004 9:52:10 AM
Hi, sorry about the multiple posting, technical difficulties....
-----
What does exactly the size of the int datatype depends in C++?
Recenlty I've heard that it depends on the machine's type, i.e. on 16-bit
machines it's 16 bit, on 32-bit machines it's 32 etc.
Is this true? Is this true ... more >>
Size of int
Posted by Agoston Bejo at 9/30/2004 9:48:33 AM
What does exactly the size of the int datatype depends in C++?
Recenlty I've heard that it depends on the machine's type, i.e. on 16-bit
machines it's 16 bit, on 32-bit machines it's 32 etc.
Is this true? Is this true for _all_ C++ compilers?
... more >>
Debugger Type == Auto isn't smart for DLL projects
Posted by Bill Menees at 9/30/2004 9:11:12 AM
VS.NET 2003 defaults the "Debugger Type" property to "Auto" for Visual C++
projects. Unfortunately, the "Auto" type isn't very smart. "Auto" bases
the debugger type on the launched EXE's type, which may have nothing to do
with the C++ project I'm trying to debug.
I have a .NET EXE that ho... more >>
64-bit & Managed C++ vs. C++/CLI
Posted by Chris Wood at 9/30/2004 5:15:05 AM
I have a complex codebase developed in Managed C++ that I am not particularly
looking forward to porting to C++/CLI :) I'd like to know what the most
compelling arguments for doing so are so I can justify the cost. For
example, will Whidbey generate 64-bit assemblies for Managed C++, or only... more >>
make.exe
Posted by Vanathi at 9/29/2004 11:57:03 PM
I am trying to build an old software. It is written in C.
Has .MAK files to build the code.
A line from .MAK file
\hw42\obj\fbl_fncs.obj : fbl_fncs.c
cl /AM /Os /Gs /Zp /Fo\hw42\obj\fbl_fncs fbl_fncs.c /c
The option /AM for cl.exe is not available for VC++ 6.0
Moreover the .mak files a... more >>
.NET 2003 link-library dependency-checking bug
Posted by James Edwards at 9/29/2004 2:13:04 PM
There seems to be a bug in the link-library dependency checking in VS.NET 2003.
Under the Configuration->Linker->General->Additional Library Directories
property,
if you specify a directory name such as "$(SolutionDir)\..\lib", it will
link properly, but when you try to run in the IDE will com... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Unsatisfied forward declaration?
Posted by Mervin Williams at 9/29/2004 11:30:29 AM
If I BUILD the code below, all works fine. But if I REBUILD the solution
at any time, the following errors are found in the WrapperCOMEXE.idl:
1) error MIDL2337 : unsatisfied forward declaration :
IQBEventCallBack
[Coclass 'MyWrapper' ] --> This error occurs within the
My... more >>
Help me pls
Posted by infinitE at 9/29/2004 10:58:09 AM
I'm a beginning c++ programmer and i need help making a win32 consol
application, that when run, brings up the command promt. How would i g
about maing the code for this
-
infinit
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
... more >>
Ternary Search Trees
Posted by Bonj at 9/29/2004 7:59:02 AM
In making a ternary search tree to identify as fast as possible the type of
word passed in to the algorithm, for instance sp_help -> 1 (procedures),
select -> 2 (keywords), sysobjects -> 3 (system tables), I'm stuck on
deciding what type of comparison happens at each node.
Has anyone got any ... more >>
ReadersWritersLock in an unmanaged C++ program.
Posted by MJS_Jeff at 9/29/2004 7:13:03 AM
Folks, I have posted this message on a different newsgroup but I did not get
a single response. I take it that it must not have been the right forum.
Anyways.
I am seeking the solution to the classic ReadersWritesLock with a slight
twist in My unmanaged C++. I can not import "System" and ... more >>
How to hide unmanaged members in a mixed-mode dll ?
Posted by Thibaut at 9/29/2004 4:21:01 AM
Hi,
I've read it somewhere already but can't find the post anymore.
In a mixed-mode wrapper, there is a special compiler or linker switch to
hide unmanaged symbols and namespaces (such as std etc) from the assembly, so
it's not visible for the end-user nor for through tools like reflector.... more >>
STL: which functions can throw exceptions
Posted by Bruno van Dooren at 9/28/2004 11:25:04 AM
Hi,
i am using some STL containers in a library of mine.
how can i see which exceptions can occur when doing something
with those containers (adding an elemnt for example)
i have looked in the MSDN collection, but class members lists nothing, and
the specific functions also don't mention an... more >>
forcing malloc to use high addresses
Posted by Lynn McGuire at 9/28/2004 9:59:18 AM
Is there a way to force the malloc in VC++ 2003 to use addresses
above 0x12000000 for virtual memory ?
You dont want to know why. It has to do with fortran common
blocks.
Thanks,
Lynn
... more >>
Internal Compiler Error with Offline Files
Posted by pHines NO[at]SPAM Boeing at 9/28/2004 9:59:04 AM
I have my entire source code directory available on my laptop via Offline
Files. The directory structure is housed on my server and made available
offline on the laptop using Windows 2000. When I do a build on the server,
everything is fine. When I do it on the laptop while connected to the... more >>
What is nochkclr.obj?
Posted by Graham at 9/28/2004 8:19:13 AM
Hi everyone,
I've seen the file "nochkclr.obj" mentioned frequently, but
I've never seen an explanation of what it is.
So ... what is it / what's in there?
Thanks
-- graham... more >>
Stack overflow in mixed native/managed DLL
Posted by Graham at 9/28/2004 7:38:28 AM
Hi everyone,
I have a DLL which contains both native and managed C++. To
the best of my knowledge, the native code does not use MFC.
The managed C++ is basically a wrapper around the native
C++ ... so the relevant code would look like this:
public __gc class ManagedWrapper {
private:... more >>
Sort the words in a sentence.
Posted by Tracey at 9/27/2004 3:37:02 PM
I'm trying to write a function to sort the words in a sentence. Suppose there
is only one space between words.
For example, the input string is "They are Jonny and Jone". And ideal result
is
"and are Jone Jonny They".
I know that I can get it done using existing functions. I'm thinking to... more >>
VS.NET Developers poll: Installshield vs Wise
Posted by Grant Rettke at 9/27/2004 2:09:11 PM
Hi folks,
I'm currently evaluating a .NET installer platform.
Basically, it has come down to either Wise or Installshield.
It would be great to hear about your experiences with these
product in deploying .NET apps. If you have experience
deploying MSDE and the .NET runtime along with your a... more >>
How do I: Execute system operation call before compile project?
Posted by Jaime at 9/27/2004 7:17:02 AM
I am using Microsoft Visual C++ and i have some projects configuration.
(Configuration A, Configuration B, ..., Configuration N)
I need to execute some system operation call such as copy, delete, etc
before each
one project configuration compilation.
How do i do it?
Regards,
Jaime.... more >>
error C2143: syntax error : missing ';' before '<class-head>'
Posted by kalyan. at 9/27/2004 5:49:01 AM
how do i overcome this problem ??
Thanku in Advance .... more >>
float to DWORD conversion bug
Posted by Gabest at 9/26/2004 11:07:02 PM
Running this piece of code while having the sse optimization turned on
(vcnet2003), something really strange happens I cannot explain. Without sse
it is giving me the right results.
float f = 0.8;
f *= UINT_MAX;
DWORD dw = (DWORD)f;
Basically the result in dw should be 0xcccccccc (or 0xc... more >>
compiling with only /clr generates error when run from command lin
Posted by Stephen R. G. Fraser at 9/26/2004 4:11:02 AM
What do I have to set to get a VS.NET 2005 executable generated with the /clr
(without :safe) option to run from the command line.
using namespace System;
void main()
{
Console::WriteLine("Hi");
}
Compiled on the command line with:
cl /clr Test.cpp
I always get:
Unhandled... more >>
Images for Menu Items?
Posted by Lynn Morrison at 9/25/2004 2:18:11 AM
I cannot find this feature at all. There is no bitmap property for menu
items nor is there an imagelist property for the menu itself...
How do I put images to the left of menu items?
Thanks,
Lynn
... more >>
pragma pack and bitfields
Posted by Giovanni Bajo at 9/24/2004 6:50:43 PM
Hello,
with Visual Studio .NET 2003:
__declspec(align(1))
struct X {
unsigned int x : 3;
unsigned int y : 13;
};
sizeof(X) is 4, even with /Zp1 and/or pragma pack(1). I would expect it to
be 2.
Is there any way I can get the behaviour I need? It looks like I'm forced to
use s... more >>
supressing runtime security checks in C++
Posted by Nick Hodapp at 9/24/2004 4:59:06 PM
How can I supress runtime security checks in a mixed-mode C++ assembly?
SuppressUnmanagedCodeSecurityAttribute apparently only works for P/Invoke
and COM interop.
I've got a somewhat chatty interface and can clearly see these checks being
made using PerfMon. In this context I can't redu... more >>
System::String to C-Style String
Posted by Jonathan Porter at 9/24/2004 11:31:06 AM
Hello All - Hoping someone might be able to point me in the right direction.
I have a System::String that is part of a managed class. Within a member
function, I need to convert this String to a C-Style null terminated
character array so that it can be passed to a legacy C function. Any ide... more >>
C++ by nmake
Posted by Milos Puchta at 9/24/2004 7:41:11 AM
I have prepared Qt with the .NET 2003 and the "preparation" process failed.
The error points to the missing string.h header file. I have used
csvars32.bat
to prepare the envitronment variable, but found no trace to this file in the
INCLUDE and PATH. (The installation runs from script using nmake... more >>
Command line warning D4025 : overriding '/EHs' with '/EHa'
Posted by bg1bg2bg3 NO[at]SPAM hotmail.com at 9/23/2004 9:56:06 PM
I have recently purchased Visual C++ . Net compiler and i am trying to
compile a project that i had working in Visual C++ 6.0.
When I compile, I am receiving the warning:
cl : Command line warning D4025 : overriding '/EHs' with '/EHa'
I have specifically asked for the /EHsc switch because ... more >>
how to run a c++ program from excel Macro?
Posted by maryam at 9/23/2004 3:59:04 PM
Hi
i have some data in excel....I want to perform a series of operations on
them and output the results to excel again. I know that some stuff could be
used with VBA. however in this special case I don't know how to do it.!
ex:
In c++ you could store an array of characters in char[20]
and th... more >>
StackOverflowException after calling unmanaged ctor
Posted by SteveK at 9/23/2004 3:36:23 PM
**Newbie with managed C++**
I'm trying to wrap an unmanaged C++ class in a managed C++ class library.
When I instantiate the wrapper class it's ctor calls the ctor on the
unmanaged class and at that point I get the exception:
"An unhandled exception of type 'System.StackOverflowException' occu... more >>
Managed exception filter
Posted by szilvaa NO[at]SPAM hotmail.com at 9/23/2004 3:15:10 PM
Hi there,
The .NET Framework developer's guide claims that one can filter
managed exceptions in C++.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusinguser-filteredexceptions.asp
However, I don't see how I get access to the managed exception object.
The... more >>
CPropertySheet problem
Posted by Saran at 9/23/2004 1:37:04 PM
Hi all,
We have a property sheet that is created in one dll, and on that property
sheet, there is a property page that is created in another dll. So, the
property sheet and the property page come from different module states. Now,
in CPropertySheet::OnKickIdle(), it calls GetActivePage(), w... more >>
Newb w/ simple wrapping ?
Posted by SteveK at 9/23/2004 1:32:21 PM
Just trying to work through some examples I have seen on the web.... I'm
getting an unresolved external linker error for operator new and delete.
Here is the code, VERY simple.
#pragma once
using namespace System;
namespace AB_Wrapper
{
// unmanaged class
class CMyOldClass
{
pub... more >>
Referencing a Form(.NET)?
Posted by Lynn Morrison at 9/23/2004 12:46:35 PM
Hi, I created a Form and need a pointer to it so that I can reuse it again
and again instead of recreating it all the time.. something like this...
Form1.h
// .... snipped for brevity
#include "Form2.h"
// class def ... snip
Form2 *Preferences;
Preferences = new Form2();
Preferen... more >>
C++ v1.5 compiler
Posted by jjcarton at 9/23/2004 10:13:03 AM
I am in need of finding Visual C++ 1.5 16 bit compiler to compile an
application for handhelds running DOS. Where can I find this compiler at this
time? Thanks... more >>
Problem with debug IDE displaying value of __int64
Posted by Jesse Hose at 9/23/2004 9:33:06 AM
I get odd behavior in the debugger with the following code. The output of
the program itself is correct, but when I add the g_bad_int64_max and
g_bad_int64_min to the watch window they show values of -1 and 0
repsectively. This only happens when initializing a const __int64 in global
scope... more >>
Please Stop It Rebuilding Everything!
Posted by acapon NO[at]SPAM sgi.com at 9/23/2004 9:00:23 AM
Hi There,
We have a medium size project about 2000 source files and 700,000
lines of code, as you can imagine this takes some time to rebuild all.
Now our problem is that we have a code generator we have developed
that updates some of our classes, as an example lets say I update 50
files. W... more >>
atof really puzzles me
Posted by Neo The One at 9/23/2004 3:45:12 AM
Can anyone explain to me that why the flowling code
printf("%f\n", atof("12345678901234567890"));
produces this result:
12345678901234567000.000000
Is it that printf cannot handle double data correctly or that I am doing
right things?
Great thanks.... more >>
B-Tree advice needed
Posted by Bonj at 9/23/2004 3:17:03 AM
Hello
I am making a syntax highlighter for T-SQL, and I am going to hardcode the
words into it for speed's sake (I will probably have thought up enough new
features for a new version when the next version of SQL comes out).
My main algorithm is going to go through all the words in the RICHEDIT... more >>
Visual Studio 2003 hangs up at start if I closed with a design view active
Posted by Jacobo Rodriguez Villar at 9/22/2004 11:19:00 PM
Hello,
I have two problems with design view in VStudio 2003:
First, if I close a solution with a form in design view, next time that
I want start the vstudio, it hangs up before loading the project.
I must remove the .vcproj file from the solution directory, start the
vstudio, click ok on t... more >>
will a VC 7.1 project build directly without errors in VC 6.0 ??
Posted by kalyan. at 9/22/2004 10:49:07 PM
hello,
i am working on WMA SDK.
i got the SDK from Microsoft under source development agreement .
The SDK has the project of WMA 9.1 built in VC 7.1
As i dont have VC 7 i found a tool to convert the project to VC 6.
now that project has some errors , is it bcoz of building the project in VC 6.... more >>
Visual Studio Problem
Posted by Matt Osborn at 9/22/2004 2:41:37 PM
For a project containing help; set the resource.hm file attributes to
include read only.
Uncheck Tools->Options->Environment->Documents->Edit read only files.
Open Project
Open Resource View
In Resource View, expand project.rc
Expand dialog
Notice that all dialog IDs have been replaced wit... more >>
User defined messages to the Document
Posted by raphtee NO[at]SPAM gmail.com at 9/22/2004 10:22:28 AM
This is probably a simple/stupid question, but...
I have an MDI application which has a socket receiving data. When the
data is received it is displayed in some way. Sometimes the data that
is received is new and sometimes it is just an update. If something
in the document hasn't been updat... more >>
Forward Declarations in Managed C++
Posted by Libertadrian at 9/21/2004 6:15:03 PM
Hi again,
Maybe I missed something, but I cannot do a forward declaration in managed
C++.
By doing:
namespace Namespace
{
public __gc class A; // forward declaration
public __gc class B // B class, that uses A in constructor
{
public: B(A* a) : mA(a) {}
private A* mA;
};
pub... more >>
DataRowVersion
Posted by Murray Foxcroft at 9/21/2004 8:50:29 AM
I'm attempting to retrieve specific versions of a row's
column in C++ (this works fine in C# - apart from the syntax)
// by column number
row->Item[2, DataRowVersion::Original]->ToString();
// or column name
row->Item[S"FirstName", DataRowVersion::Original]->ToString();
However, both of th... more >>
Problem with /clr switch in Whidbey
Posted by rhjrjlbk2002 NO[at]SPAM yahoo.com at 9/21/2004 6:09:28 AM
Hi there,
I'm trying to compile the program with Whidbey but I got the following
problem:
------- cut here -----------
c:\h>cl h.cpp /clr
[many warnings skipped]
h.cpp(152) : error C3396:
'System.Runtime.CompilerServices.IsImplicitlyDereferenced'
: custom attribute not found in 'mscorl... more >>
Which button?
Posted by Lynn Morrison at 9/20/2004 9:41:13 PM
Hi, I cannot get this code to work. All I want to do is to fetch 'which'
toolbar button was clicked, so I can act on it...
private: System::Void toolBar1_Click(System::Object * sender,
System::EventArgs * e)
{
int index = toolBar1->Buttons->IndexOf(dynamic_cast<ToolBarButton
*>(e->Button... more >>
Function Pointers, Delegates, Legacy Code...and some sympathy
Posted by Mark Olbert at 9/20/2004 9:08:49 PM
First off, the sympathy is for all you poor buggers out there who have to figure out how to marry
Managed Extensions for C++ onto your legacy code. My condolences; my brief experience with the
process leads me to believe the Microsoft hates all of its VC++ developers :)
Now, the question. I'm g... more >>
|