all groups > visual c > september 2004 > threads for september 15 - 21, 2004
Filter by week: 1 2 3 4 5
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 >>
istringstream
Posted by ShipHead at 9/20/2004 8:56:21 PM
I can't seem to get this to compile...
(Perhaps I'm missing a header file)
std::string htmlMsg;
std::istringstream iss(htmlMsg);
error C2065: 'iss' : undeclared identifier
This is a c++ console application.
... more >>
newbie question
Posted by ShipHead at 9/20/2004 8:53:19 PM
#using <mscorlib.dll>
What is this actually doing in my code?
Is this like including mscorlib.h and linking with mscorlib.lib?
... more >>
C++ Questions
Posted by JJ at 9/20/2004 9:57:03 AM
Hi All,
I have VS 2003 and I was wondering is it possible to create pure C++ apps
without the .net being injected into the app?
Are alot of you guys building aps in C++ using .net ? How about web apps?
How do you like using VC++ in .net? What are the pros and cons of VC++ in
..net?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
[.NET managed c++] Calling parent constructor.
Posted by Duncan Aitken via .NET 247 at 9/20/2004 9:35:01 AM
All,
In an inherited managed c++ class, how do you call the contstructor of the parent class? I tried with the usual Parent::Parent(...), but get compiler error C3257. Any ideas?
Thanks,
Duncan.
--------------------------------
From: Duncan Aitken
-----------------------
Posted by a u... more >>
Accessing unmanaged memory from managed code (without unsafe)
Posted by hml at 9/20/2004 5:38:26 AM
Hi,
I have a "legacy" system (namely, vst audio plugins) which calls me through a mixed-mode, managed c++ library with a call similar to :
void process(float *input,int inputLength)
inside this method, I'm trying to find a way to instanciate a managed array (System.Single[]), which would ma... more >>
Compile Erros when Adding an icon in C++.NET using <windows.h>
Posted by zerrifi NO[at]SPAM yahoo.fr at 9/20/2004 2:45:15 AM
hi guys,
i really need your help!! i want to add a toolbar with some push
buttons in which i put some icons. it works without including
<windows.h>. However, i really need this library so i dont know what
to do. HELP ME. i get this error:
d:\Generic Control\SMACT\Form1.h(473): error C2039: 'G... more >>
webservice ASP.net (c++) using unmanaged c++: Link problem
Posted by Kristof Thys via .NET 247 at 9/20/2004 12:34:26 AM
Post a new message to microsoft.public.dotnet.languages.vc
http://www.dotnet247.com/247reference/default.aspx
Hello,
I've been struggling for weeks with this problem, I hope I find some help here...
To start, in our company, we have a large existing c++ project (native code, unmanage... more >>
generic question
Posted by Kapil at 9/19/2004 11:21:02 PM
For the following code
interface class I{};
public ref struct R1 : I
{
R1(R1%){}
R1(){}
};
generic <class T> // if you replace it with template, it works.
void f(T t)
{
I ^hi = t; // error in this line
}
int main()
{
R1 ^obj;
I ^hi = obj;
f(obj);
}
t.cpp
t.cpp(11... more >>
Question about dlls
Posted by Wild Wind at 9/19/2004 4:18:48 PM
Hello,
I am developing a managed c++ library which loads a
regular win32 dll. The library will be used
by .NET consumers.
Am I correct in saying that the win32 dll will
not be unloaded until the garbage collector
destroys the mc++ library that loaded it
in the first place? And does this m... more >>
I bug in the for each loop statement?
Posted by Stephen R. G. Fraser at 9/19/2004 1:19:02 PM
Is this a bug in the for each loop or am I coding something wrong (or is this
how its suppose to function and I don't understand how an array property and
the for each interact [this is always a possibility :)]
The commented out code is the problem area as it generates the error:
->for each... more >>
service -Uninstall?
Posted by Johan Karl Larsen at 9/18/2004 5:24:07 PM
I made a sample service in C++ and installed it with
myservice -Install
Now I want to remove it, tried
myservice -Uninstall
Definitely not working. What is the correct remove option parameter?
--
Johan
... more >>
Header files / CPP files ?
Posted by Tom at 9/18/2004 12:55:06 PM
This has got to be something really simple, but I'm pretty baffled...[VC++
..NET 2003]
In the header file I define the class interfaces, in the CPP file the class
functions, and the
CPP file #includes the header file. Looks like Stroustrup style code.
The only way I can get it to complil... more >>
fatal error C1108: unable to find DLL: 'alink.dll'
Posted by K7211 at 9/18/2004 11:38:53 AM
Hi, I've been trying to use Visual C++.NET, but whenever I try to build a
solution I get this error message,
fatal error C1108: unable to find DLL: 'alink.dll'
Does anyone know what causes this error and how I can fix it?
Thanks in advance.
... more >>
how to set the file short name?
Posted by petitehs at 9/18/2004 10:46:46 AM
Hi,
Does anyone know how to change the file's short (8.3) name?
I cannnot find the way anywhere including MSDN.
I know how to get the long name and the short name of the files.
(using GetLongPathName() and GetShortPathName())
Unfortunately, what I want to do is not to GET the short file n... more >>
_tmain() , _tprintf(), ... --> '_t' ?
Posted by Chris at 9/18/2004 8:25:31 AM
Hi,
why use '_tmain()' as entry point of the program in a console-application ?
why is _tmain() used instead of main() ?
_tprintf() instead of printf() ?
why '_t' ?
thnx
Chris
... more >>
Hiding objects in MC++
Posted by Wild Wind at 9/18/2004 3:40:06 AM
Hi,
I have a mixed dll which exposes some managed classes
which themselves *internally* make use of some
standard c++ library templates (like string and exception).
The problem I'm having is that when I reference the dll
in my VB.NET project, it seems to have brought along
these templates ... more >>
C++ Code in header files
Posted by Mauro Tronto at 9/17/2004 7:47:25 PM
Hello, If you start a new c++ .net project (windows form) the IDE shows
window and generate 2 files (.cpp and .h). If I simple drag and drop button
control into the form and double click the button, the IDE shows me a method
"template" where I can write my code. I wonder why the IDE creates th... more >>
saving a sound file
Posted by Ehsan Sadeghi at 9/17/2004 12:53:59 PM
Hello
can someone tell me how to save sound files and how to use them in a
program.
... more >>
/Fx problem in 2005 beta
Posted by Chris at 9/17/2004 10:56:48 AM
The /Fx option does not seem to produce any mrg file in VC++ 2005 beta.
I created identical projects with 2003 and 2005 and activated the
"Expand Attributed Source" option from the project property page. It
works fine with 2003 but not with 2005.
Can I assume that an event declaration expan... more >>
[VS 7.1] shortcut for matching bracket in VS editor
Posted by dink at 9/17/2004 10:01:25 AM
helo,
I'm new to VS 7.1, searched thru help but no luck. Anyone can tell me a
keyboard shortcut to go to the ending bracket when cursor is under opening
bracket and vice-versa. I think there must be something like this b/c I see
the matching brackets getting bold for a second while writing the... more >>
void* and arrays
Posted by snchandra95 NO[at]SPAM yahoo.com at 9/17/2004 5:09:06 AM
Hi!
I have a newbie question regarding void*. I am reposting this since I
am still not clear.
In native C++ you can have a function that takes a void* and you can
call that function with pointer to array or any other kind for that
matter. Here is an example
Foo(void*);
// You can late... more >>
Overloaded indexed properties
Posted by MichaelGeier at 9/16/2004 11:05:05 PM
Hello,
I have a class with three overloaded indexed poperties.
Declaration in *.h
__gc class ByteArrayN : public FArrayN
{
typedef BYTE T;
typedef ByteArrayN FTArrayN;
.
.
__property T get_At(int ind1);
__property T set_At(int ind1,T value);
__property T get_At(int ... more >>
Defining events in interfaces
Posted by Chris at 9/16/2004 6:43:26 PM
Hi,
I'd like to know if it makes sense to define an event in an
interface. Something like:
public interface class MyInterface1
{
event PropertyChangedEventHandler^ PropertyChanged;
} ;
In particular, what will happen if a class derives from two interfaces
defining events having th... more >>
void* equivalent
Posted by snchandra95 NO[at]SPAM yahoo.com at 9/16/2004 12:59:28 PM
Hi!
I am new to Managed C++ and am working on my first project with this.
In native C++, we could have a function that takes void* and call that
function with any type. Is there a way to do that with MC++? If I had
something as follows in native C++,
Foo(void* arBuf, int nSize);
And ... more >>
Detecting the Operating System
Posted by Ioannis Vranos at 9/16/2004 8:43:39 AM
Is there any way to detect the Windows version at run time using .NET?
--
Ioannis Vranos... more >>
VS.NET 7.1 Internal compiler error on inline template method??
Posted by rdilipk NO[at]SPAM gmail.com at 9/16/2004 7:19:23 AM
Hi
I have taken the liberty to cross-post this. It appeared on c.l.c++.m
but the ICE is regarding VS.NET 7.1 C++ compiler.
post follows:
==============================================
John Torjo wrote:
>
> Thus, I suggest you send the smallest example that fails to compile
> (or a ... more >>
Intercepting 'multimedia keys'
Posted by Steve McLellan at 9/15/2004 9:22:44 PM
Hi,
Does anyone know if it's possible (and if so, how) to intercept presses on
'multimedia keys' you find on keyboards? Curiosity more than anything. Only
manufacturers seem to put their own random gubbins onto their keyboards, so
presumably there isn't any kind of standard. Obviously their ap... more >>
How to code text file IO in DLL, unmanaged
Posted by progster NO[at]SPAM hotmail.com at 9/15/2004 7:30:53 PM
I'd like to write a DLL in C++ which does text file IO. I plan to be
using the VS .Net Dev environment, but I want the DLL to work without
..Net runtime on the machine.
If I understand this right, that means I want my DLL to be compiled as
"unmanaged" code.
I would really appreciate a simp... more >>
Decimal or String Covert to Hex Value
Posted by Michael Chong at 9/15/2004 5:07:08 PM
Any idea that I can convert a value of type Decimal or String into Hex value
in MFC VC++.NET?
I know there is a function hex(std::ios_base&), but I don't know how to
ultilise it in MFC as I only know in console mode.
TQ
Michael.
... more >>
LPSTR -> String : Type Incompatibility Issue
Posted by Michael Chong at 9/15/2004 1:11:50 PM
Another same issue on "NullReferenceException" :-
I have an (exe) executable program created in VB.NET 2003 that calls to a
MFC DLL written in VC++.NET 2003. I always get an error msg
"NullReferenceException: Object Reference Not Set to an Instance of an
Object" when my exe calls the following c... more >>
Improving performance C++/C#
Posted by Olaf Baeyens at 9/15/2004 11:56:59 AM
Because of historical reasons, I have both C# and C++ managed/unmanaged code
mixed together in my class library.
But I prefer to port code to C# since it compiles faster and the syntax is
much more readable so I can do more in less time.
The big question now, will I gain/lose performance, giv... more >>
doubt in .net
Posted by selvi ss via .NET 247 at 9/15/2004 11:44:46 AM
(Type your message here)
How do i dynamically retrieve path for a particuler file name in vb.net.is there any namespaces to be include?.kindly tell me what is the procedure?.--------------------------------
From: selvi ss
-----------------------
Posted by a user from .NET 247 (http://www.dotne... more >>
C#.net inner classes
Posted by raja sekar via .NET 247 at 9/15/2004 11:42:02 AM
Hai one and all..I have a doubt about inner classes in C#.net..Here by I need a full description about that.plz sent it to me..
--------------------------------
From: raja sekar
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>i9U20+cBqkend17NigJrJg==... more >>
COM - java interop
Posted by Andrea at 9/15/2004 9:13:50 AM
Hi evrybody !
Does anybody know how to call a java class from a COM component ?
Any suggestion ?
Thanks
Andrea
... more >>
gc[] to gc* conversion
Posted by snchandra95 NO[at]SPAM yahoo.com at 9/15/2004 6:56:56 AM
Hi!
I am new to managed c++. I have a byte gc array and I want to pass it
to a function that takes a __gc* to unsigned char. How would I convert
my byte array to this?
Byte arBuf[] = __gc new Byte[nSize];
// I have code here to read from a file to this buffer.
// Now I need to pass this ... more >>
|