473,394 Members | 1,806 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,394 software developers and data experts.

HELP !! pb calling eVC++ DLL from VB.NET on compact framework

hi all !

i need your HELP ! (it's long to explain but it's needed)

i have a big problem (for me) with my APP/DLL

i have made an Application with VB.NET for Compact framework that call an
DLL written in eVC++ 4.

the pb is i get a "First-chance exception ... Access violation" sometimes...

before my VB app are small (and i haven't the pb) but now is bigger (and i
have the pb all the time).

when i debug the DLL, at the exception if i continu, i often get a "stack
overflow"..

i have read many things on the net but i haven't found a solution for the
pb. it seem its a limit of 4k(or 64k) boundary page pb with the stack..
here the start of my DLL function :

char __declspec(dllexport) f_com_ReadAcq(char voie,double * pValeurs, int
*nbValeur)
{
UCHAR buffer[120000];
long sizeBuf=0;

ReceiveData_GetLast(&tdReceiveMemory, buffer,500, RECEIVE_DATA_ACQ, voie
,&sizeBuf);
...
...
}

in ReceiveData_GetLast i do some memcpy to "buffer" and it's these memcpy
that do exception...i have try to replace the memcpy by a soft loop then it
crash at same time..

the DLL function is called from many place on the vb.net app then in one
case (always the same) it work...

when it work, the &buffer = 0x2207F2CC
when it crash the &buffer = 0x22011f8c
when it crash the pointer to buffer = 0x22012000

i mean it's the 1FFF to 2000 boudary that cause crash...(4k page ??)

i mean i can use malloc to allocate my 120k buffer, but i'm afraid for the
rest of development...if i have only 116 bytes of local memory available
(0x22012000 - 0x22011f8c)...then this problem can appairs later in
development even if i make all array with malloc............

can it be VB.NET that fill the stack ?and how i can do to "free" some bytes
of the stack before calling DLL...?

thank a lot for all people that can help me....(i'm on this pb since 3 days
now and my app is not finished.....)

Eric BOUXIROT
(sorry for my bad english)

you can answer me at bo******@lgm.fr


Nov 21 '05 #1
0 954

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

Similar topics

0
by: devgru | last post by:
I've developed several programs for the Pocket PC in eMbedded Visual C (API calls only, no MFC). All of these programs made use of a third-party DLL called SecureTrial (www.zedev.com) to create...
2
by: Duncan | last post by:
I am using the evaluation version of CE.NET 4.1. I had also installed the release version of the Compact Framework. I uninstalled the CE.NET 4.1, and then realized I needed it again and...
6
by: Ron | last post by:
All, I have a weird problem, I have a Native DLL that CoCreates a COM object. If I call this DLL from a native MFC app, everything goes just fine; If I call it from an managed application...
2
by: Hans Kesting | last post by:
Is it possible to mix code meant for the CompactFramework and code meant for the standard framework? We are trying to make PDA and light-weight "laptop" versions of one application. This means a...
3
by: Alexander | last post by:
Me again.... second time I type this - the post did not work the first time... Similar question as last time, but another problem: I am running a CE.Net Application and I want to show a small...
0
by: Eric BOUXIROT | last post by:
hi there, i want to debug a dll made with EVC++. the application is under VB.NET. in EVC++ project settings i have set this : in debug tab i set in category general remote executable path and...
2
by: delphine_fontaine | last post by:
Hello, I have a projet for smartphones which I can't build. In fact, I have this error : The type or namespace name 'ISupportInitialize' does not exist in the class or namespace...
2
by: delphine_fontaine | last post by:
Hello, I have a projet for smartphones which I can't build. In fact, I have this error : The type or namespace name 'ISupportInitialize' does not exist in the class or namespace...
2
by: =?Utf-8?B?VmljdG9yIExhaQ==?= | last post by:
Hi, I wrote an simple application using VS2005 C#. I am trying to call some functions in my other dll file. This dll is written in EVC for running on Windows CE 5.0. This dll file has the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.