473,378 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Pass by reference in C++ cause compiler to GPF

I need to pass a reference of a managed object to a function (bar). I
believe the syntax is correct. When I build the project, a message box with
the title "Microsoft (R) C/C++ Optimizing Compiler" displays indicating that
a GPF has occurred.

Is this a compiler bug?

Sample Code:
class foo
{
....
bool bar(System::Data::DataSet^% ResultSet);
};
Feb 21 '06 #1
2 1321
Benny <bl**@newsgroup.nospam> wrote:
I need to pass a reference of a managed object to a function (bar). I
believe the syntax is correct. When I build the project, a message box with
the title "Microsoft (R) C/C++ Optimizing Compiler" displays indicating that
a GPF has occurred.

Is this a compiler bug?

Sample Code:
class foo
{
...
bool bar(System::Data::DataSet^% ResultSet);
};


Anything which makes the compiler die is a compiler bug, IMO.

I suggest you report it on
http://lab.msdn.microsoft.com/productfeedback/

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 21 '06 #2
Hi,
Welcome to MSDN Newsgroup!

In the current situation, please help us confirm some information on your
side:
1.What's the version of complier, VS2003 or VS2005?
2.Would you provide us a simplified sample to repro this problem? It will
help us get closer to this issue.

Please rest assured that we will do our best to support you. Thanks for
your understanding!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
Thread-Topic: Pass by reference in C++ cause compiler to GPF
thread-index: AcY3KAbb5b+apBOgQqOydCm2pXrkUg==
X-WBNR-Posting-Host: 63.166.226.115
From: "=?Utf-8?B?QmVubnk=?=" <bl**@newsgroup.nospam>
Subject: Pass by reference in C++ cause compiler to GPF
Date: Tue, 21 Feb 2006 12:47:28 -0800
Lines: 13
Message-ID: <22**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:189326
X-Tomcat-NG: microsoft.public.dotnet.general

I need to pass a reference of a managed object to a function (bar). I
believe the syntax is correct. When I build the project, a message box withthe title "Microsoft (R) C/C++ Optimizing Compiler" displays indicating thata GPF has occurred.

Is this a compiler bug?

Sample Code:
class foo
{
...
bool bar(System::Data::DataSet^% ResultSet);
};


Feb 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Todd | last post by:
Is it possible to pass an argument by reference through an event in C++ managed code? For example, can I do the following? public __gc class MyClass : public Control { public: __event...
110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
38
by: Radde | last post by:
HI all, Whats the difference b/w pass by ref and pass by pointer in C++ when ur passing objects as args.. Cheers..
9
by: Stuart Carnie | last post by:
Due to the tightening of the VC++ compiler in 2005, I have run into a compiler error (from code that previously worked in 2003) using a CComPtr<ITypeLib> as an element of a std::list, as follows...
5
by: josh | last post by:
Hi, how really work behind the scene the pass-by-reference in C++? I know that in C++ like the C the objects are passed by-values and if we want we can simulate the pass-by-reference using the...
14
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is...
6
by: lisp9000 | last post by:
I've read that C allows two ways to pass information between functions: o Pass by Value o Pass by Reference I was talking to some C programmers and they told me there is no such thing as...
11
by: venkatagmail | last post by:
I have problem understanding pass by value and pass by reference and want to how how they are or appear in the memory: I had to get my basics right again. I create an array and try all possible...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.