DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 8 Aug 2007 17:49:19 +0300,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    Empi
          2    ctacke/ ctacke[at]opennetcf[dot]com
          3    Empi
          4    ctacke/ ctacke[at]opennetcf[dot]com


unmanaged memory   
Hi,

Should I use unmanaged memory when I work with the coredll?
If not - is there no chance .net will allocate uncontinous blocks of bytes, 
and the dll
will refer to a wrong address  ?

Thanks.
Date:Wed, 8 Aug 2007 17:49:19 +0300   Author:  

Re: unmanaged memory   
"coredll" is really ambiguous.  P/Invokes don't inherently require using 
unmanaged memory, but some do.  Depends on what API you're calling.


-- 

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Empi"  wrote in message 
news:uH5NMtc2HHA.484@TK2MSFTNGP06.phx.gbl...

> Hi,
>
> Should I use unmanaged memory when I work with the coredll?
> If not - is there no chance .net will allocate uncontinous blocks of 
> bytes, and the dll
> will refer to a wrong address  ?
>
> Thanks.
>
> 
Date:Wed, 8 Aug 2007 10:10:37 -0500   Author:  

Re: unmanaged memory   
I specificallt meant I/O functions such as ReadFile and WriteFile that gets 
a Byte buffer,
but more important, how do I know which one might geperdise software's 
stability?
Shouldn't I - just in order to be on the safe side - always pass unmanaged 
memory?

Thanks.



"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message 
news:%23MPlJ5c2HHA.4400@TK2MSFTNGP06.phx.gbl...

> "coredll" is really ambiguous.  P/Invokes don't inherently require using 
> unmanaged memory, but some do.  Depends on what API you're calling.
>
>
> -- 
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Managed Code in an Embedded World
> www.OpenNETCF.com
>
>
> "Empi"  wrote in message 
> news:uH5NMtc2HHA.484@TK2MSFTNGP06.phx.gbl...
>> Hi,
>>
>> Should I use unmanaged memory when I work with the coredll?
>> If not - is there no chance .net will allocate uncontinous blocks of 
>> bytes, and the dll
>> will refer to a wrong address  ?
>>
>> Thanks.
>>
>>
>
> 
Date:Wed, 8 Aug 2007 18:25:47 +0300   Author:  

Re: unmanaged memory   
ReadFIle and WriteFile are blocking calls, so the buffer you pass in can not 
be moved by the GC until after the P/Invoke has returned.  That means that 
that specifc call is safe without manual allocation.


-- 

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com



"Empi"  wrote in message 
news:%23bCrkBd2HHA.1164@TK2MSFTNGP02.phx.gbl...

>I specificallt meant I/O functions such as ReadFile and WriteFile that gets 
>a Byte buffer,
> but more important, how do I know which one might geperdise software's 
> stability?
> Shouldn't I - just in order to be on the safe side - always pass unmanaged 
> memory?
>
> Thanks.
>
>
>
> "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message 
> news:%23MPlJ5c2HHA.4400@TK2MSFTNGP06.phx.gbl...
>> "coredll" is really ambiguous.  P/Invokes don't inherently require using 
>> unmanaged memory, but some do.  Depends on what API you're calling.
>>
>>
>> -- 
>>
>> Chris Tacke, Embedded MVP
>> OpenNETCF Consulting
>> Managed Code in an Embedded World
>> www.OpenNETCF.com
>>
>>
>> "Empi"  wrote in message 
>> news:uH5NMtc2HHA.484@TK2MSFTNGP06.phx.gbl...
>>> Hi,
>>>
>>> Should I use unmanaged memory when I work with the coredll?
>>> If not - is there no chance .net will allocate uncontinous blocks of 
>>> bytes, and the dll
>>> will refer to a wrong address  ?
>>>
>>> Thanks.
>>>
>>>
>>
>>
>
> 
Date:Wed, 8 Aug 2007 11:11:01 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us