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

Internal limitation: structure is too complex or too large.

i have a large C++ data structure that i'm trying to interop with... the
structure is 77400 bytes long. i have the structure defined in C#, so i was
trying to just use "ref <structure>" as the method parameter.

if i use this direct approach, i get the error:
Message: Cannot marshal 'parameter #1': Internal limitation: structure is
too complex or too large."

is there a 64k limit on marshalling structures? what workarounds are there
for this?

i've tried a workaround of using:

IntPtr ptr = Marshal.AllocHGlobal(77400);

// call C++ method to initialize structure
init_method(ptr);

<structure> = (<structure type>)Marshal.PtrToStructure(ptr,
typeof(<structure type>);

// fill in data structure fields...

Marshal.StructureToPtr(<structure>, ptr, false);

// call C++ method to open file
err = open_method(ptr);

now... this method completes properly, but with an error code returned from
the method. i've run the exact same code in a native C++ project and it
works fine and returns a success code.

is there anything obviously wrong with this workaround?

thanks,
Kirk
Nov 17 '05 #1
0 2200

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

Similar topics

9
by: qazmlp | last post by:
const has internal linkage in C++, but external linkage in C. Am I right ? But, linker reports multiply-defined error if the following header is included in multiple .cpp files. //...
30
by: Neil Zanella | last post by:
Hello, Allow me to share my frustrations with GNU g++. This is the second time something similar happens to me: I can't find anything wrong with my C++ program and yet I get segfaults, and...
12
by: pillepop2003 | last post by:
Hey! Can anyone give me a hint, how this problem is best implemented: I have a table of users (see below), where every user has one "superior user" (= parent node), this should be a fully...
2
by: Dave Brown | last post by:
I believe I have found a severe limitation of DotNet, with respect to hosting Windows Form Controls in WebPages. It appears this is only possible when the web is configured on Port 80. Any other...
7
by: Rob Nicholson | last post by:
We're using a well known presentation layer library to implement complex controls on an intranet site. IE has the following limitation which effectively means that you can only have 30 <STYLE> tags...
9
by: JT | last post by:
Here is the overall structure I will be referring to: End-program ProvideWorkFlow.dll Forms and methods that properly manipulate calls to methods in AccessUtils AccessUtils (a web service)...
17
by: Jason Doucette | last post by:
I am converting a C-style unit into a C++ class. I have an implementation function that was defined in the .cpp file (so it was hidden from the interface that exists in the .h file). It uses a...
17
by: Jeremy S. | last post by:
Just getting into OOP here... I remember reading somewhere that having protected and/or internal member variables is to generally be avoided or potentially a "bad thing" because having such...
3
by: =?Utf-8?B?SXpvcmljaA==?= | last post by:
I observed that WCF client running inside Full Trust mode XBAP application can't read byte array over 16384. If return result is bigger than that size, then client simply get null or Nothing in VB...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.