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: Tue, 31 Jul 2007 06:36:18 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    TheSebaster


SAFFEARRAY And Compac Framework leak   
I am trying to consume those 2 safe array into a
c# compac framework application without leaking.

This is the server side methode I am calling:
interface IArrayDataAccess : IDispatch{
  [id(1), helpstring("method Get1")] HRESULT Get1([out] SAFEARRAY(LONG)* 
_data, [out] SAFEARRAY(CHAR)* _state);
};

And this is the implementation:
STDMETHODIMP CArrayDataAccess::Get1(SAFEARRAY** _data, SAFEARRAY** _state)
{
  SAFEARRAYBOUND ArrayBoundaries;
  ArrayBoundaries.lLbound   = 0;
  ArrayBoundaries.cElements = 1000 * 1000 * 1000;

  *_data  = ::SafeArrayCreate(VT_I4,  1, &ArrayBoundaries);
  *_state = ::SafeArrayCreate(VT_UI1, 1, &ArrayBoundaries);

  return S_OK;
}

AND this is the C# CF test Application than consume it:
         ...
          Array arData;
          Array arState;

          objIArrayDataAccess.Get1(out arData, out arState);
          System.Diagnostics.Debug.WriteLine("Get: " + lSeq++);

          arData = null;
          arState = null;
          ...

The probleme is that under the compac framework, the call to Get1 methode 
leak and there is no leak with the same project under win32. Anyone could 
help me??
I use the compac framework 2 with latest update and fix.
Date:Tue, 31 Jul 2007 06:36:18 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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