|
by: Mehdi Mousavi |
last post by:
Hi folks,
I'm new to Managed C++. I would like to know how can I implement a function
like this:
CWhateverClass **GetPointer()
{
//how can I allocate memory on heap (for my local variable of type
CWhateverClass),
//so that it won't go away when the
//local variable is out of scope.
|
by: Bern McCarty |
last post by:
I am using MEC++ in VC 7.1. I had a method on a __gc object that looked
like this:
__property System::UInt32 get_MyProperty(void)
{
System::Byte __pin * pinBytes = &m_byteArray; // entire array is
now pinned
NativeStruct const __nogc* nativeStructP = reinterpret_cast<NativeStruct
const __nogc*>(pinBytes);
|
by: microsoft |
last post by:
Hi All,
I am fairly new to Managed C++ extensions. I started trying to implement a
interface defined in a C# project, in C++. The problem was with passing
value arrays from c# to c++. I found examples on the web which worked, but
found mine didn't. After narrowing down the interface I found what I believe
to be the problem. The order of the parameters! The code below shows the
function that does not compile named QueryPositionsForward....
|
by: m |
last post by:
Hi,
I'm reading Microsoft Visual C++ .NET Step by Step, Version 2003 and I found
a sentence it says :
"you can't have pointers to managed types as members of a __gc class.".
Why ?
Thanks,
Michele
|
by: Chris |
last post by:
Hi,
what is the syntax for passing a pointer to a managed array of pointers in
C++.NET ?
Here's what I try :
void GetArr(Person ** parr __gc) ==> compiler error
{
*parr = new Person* ;
|
|
by: Mark Olbert |
last post by:
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 getting a NullReferenceException in a __gc class that wraps functionality in
a legacy C/C++ app (it's actually part of the Nero burning rom api).
...
|
by: Peteroid |
last post by:
I'm creating managed classes in an managed application, and believe I've
seen the following generate a compile error:
__gc class Parent_Class {} ;
__gc class Child_Class : public Parent_Class {} ;
__gc class Other_Class
{
public:
void Method_1( Parent_Class** pc_ptr_ptr ) {}
|
by: Hexar Anderson |
last post by:
I have two questions:
a) From documentation located at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/vcManagedExtensionsSpec_7_7.asp,
it says, "Pinning a sub-object defined in a managed object has the effect of
pinning the entire object. For example, if any element of an array is pinned,
then the whole array is also pinned. There are no extensions to the language
for declaring a pinned array. To pin an...
|
by: Richard |
last post by:
I've created a __gc Array of ManualResetEvents
seeing as this managed C++ and .NET is still new to me
I'll try and explain.
Each instance of one of my classes is going to require a
pointer to one of these array elements.
stepping through the assignment function it seems to work
fine, but the next time I access the object from one of
class' methods the value is undefined.
How to I get it to stay?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|