473,406 Members | 2,273 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,406 software developers and data experts.

C++ Interop Memory

Hi

1. Is Marshal::AllocHGlobal(IntPtr) always pinned memory?
2. Is Marshal::AllocHGlobal(int) moveable or pinned memory?

MSDN doesn't really explain that little difference ...

Thanks, Urs
Nov 17 '05 #1
1 1340
Hi Urs!
1. Is Marshal::AllocHGlobal(IntPtr) always pinned memory?
2. Is Marshal::AllocHGlobal(int) moveable or pinned memory?


Neither has something to do with garbage-collection and therefor
"pinned" makes no sence...

The returned IntPtr always points to a unmanaged memory region!

See: Marshal.AllocHGlobal
http://msdn.microsoft.com/library/en...obaltopic1.asp

and

See: GlobalAlloc
http://msdn.microsoft.com/library/en...lobalalloc.asp

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2

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

Similar topics

5
by: Trokey | last post by:
I am making interop calls to an object in a .NET component from a C++ program and am leaking memory... the following is some sample code: //////////////////////////////////////// // .NET...
11
by: Tamir Khason | last post by:
Is it possible (if 'yes' - how) to transfer data from VB application to .NET application and v.v WITHOUT using Interop (very expencive process). I need to manipulate big bunches of raw data between...
1
by: Shiro | last post by:
Hi I have read the various postings relating to Interop strong name signing and cannot find an example similar to mine. I have stringly named my AxInterops/Interops and they all work just...
0
by: bracoute | last post by:
Hello ppl... 1) i've finally got my automation launched correctly.. but this time i wanna know how to close my winword.exe process which seems to remain in memory despite closing the app......
2
by: Steve | last post by:
I'm using Visual Studio .NET (not 2003), and am developing a class that works with Word theough the Office PIAs (Interop). I can open word and do things with it programatically, but I can't close...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
1
by: Don.Leri | last post by:
Hi, I have a logger.dll (unmanaged c++ dll compiled in vs2005). I have a C# interop to use that dll in managed code implemented in Interfaces.dll (used by other C# dlls). I also have a...
5
by: John | last post by:
I would like to ask a question that is obvious to all people porting applications from the "traditional" C\VB6 interop scheme choosing C# vs VB.NET. We have a math library in C which...
2
by: Fredo | last post by:
First of all, I apologize for cross-posting. I posted this on the framework.interop group as well, but haven't received a response yet, so I thought I'd try here... I'm trying to write an app...
2
by: Tricky | last post by:
I am a newbie to .NET (using 3.5) however have written a C# Class library that performs some decryption and need to be able to reference this class from Visual Basic 6.0. I have attempted to do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
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...

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.