Click here to get back home

Stack Overflow Help?

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Stack Overflow Help? James O'Reilly 10-25-2007
Get Chitika Premium
Posted by James O'Reilly on October 25, 2007, 5:48 am
Please log in for more thread options
Hi,

I have been trying to embed third party software into a Windows Mobile 5
DotNet (C#) application by building it as a C++ DLL and calling the DLL
funtions using InteropServices.

The problem seems to be that the third party software requires a huge stack
(3.5Meg.) to prevent overflow (In C++ stack size is set in the link options)
. This works fine in C++, but when called from the C# app it crashes
(presumably down to stack overflow). But there appears to be no way to set
the stack (of the main app) in C# program.

Can anybody help?

Thanks in advance,

-James




Posted by Yaroslav Goncharov on November 13, 2007, 11:44 am
Please log in for more thread options
You can create a native function that creates a new thread (you can specify
a stack size when you create a new thread) and call the entry function from
that thread.

--
Yaroslav Goncharov
Pocket PC Developer Network coordinator, http://pocketpcdn.com
Spb Software House, http://spbsoftwarehouse.com


> Hi,
>
> I have been trying to embed third party software into a Windows Mobile 5
> DotNet (C#) application by building it as a C++ DLL and calling the DLL
> funtions using InteropServices.
>
> The problem seems to be that the third party software requires a huge
> stack (3.5Meg.) to prevent overflow (In C++ stack size is set in the link
> options) . This works fine in C++, but when called from the C# app it
> crashes (presumably down to stack overflow). But there appears to be no
> way to set the stack (of the main app) in C# program.
>
> Can anybody help?
>
> Thanks in advance,
>
> -James
>
>
>



Similar ThreadsPosted
Microsoft BT stack.. September 5, 2005, 7:59 pm
Bluetooth Stack August 30, 2006, 12:50 am
bluetooth stack September 6, 2006, 5:43 am
bluetooth stack September 6, 2006, 5:44 am
Widcomm Bluetooth Stack October 16, 2006, 3:51 pm
SIP / RTP Stack for Windows Mobile 5 November 13, 2006, 8:16 am
Bluetooth stack load order?? February 22, 2006, 12:08 am
Network stack on legacy devices June 7, 2007, 4:37 pm
Bluetooth Stack load-unload July 12, 2007, 2:30 am
Smartphones running the MS Bluetooth stack September 18, 2007, 1:52 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap