Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# and mysql Pin
Jeason Zhao27-Oct-05 4:26
Jeason Zhao27-Oct-05 4:26 
GeneralRe: C# and mysql Pin
vandread12-Nov-05 8:12
vandread12-Nov-05 8:12 
QuestionC# ArrayList Pin
Doncp26-Oct-05 12:38
Doncp26-Oct-05 12:38 
AnswerRe: C# ArrayList Pin
Wjousts26-Oct-05 12:48
Wjousts26-Oct-05 12:48 
AnswerRe: C# ArrayList Pin
enjoycrack26-Oct-05 12:49
enjoycrack26-Oct-05 12:49 
AnswerRe: C# ArrayList Pin
Edbert P26-Oct-05 12:57
Edbert P26-Oct-05 12:57 
GeneralRe: C# ArrayList Pin
Doncp27-Oct-05 6:01
Doncp27-Oct-05 6:01 
QuestionP/Invoke problem Pin
Mark Tutt26-Oct-05 12:19
Mark Tutt26-Oct-05 12:19 
After a day of scratching my head, I think I've found the problem with my latest project, however I'm not sure what to do about it.

I've wrapped a legacy DLL with a .NET remoting solution that allows the functions to be accessed easily from ASP.NET. The DLL is used for reporting.

On my test system, with demo configuration and minimal data, everything worked fine.

At the clients site, where the reports are larger, the remoting service returns a null reference exception when the reports are over 4k.

Here is functions P/Invoke signature:

[DllImport("opsrpts.dll", CallingConvention=CallingConvention.Cdecl)]
static extern String DisplayReport(int rvc, int wsobj, int rptnum, int period, int scope, int reset, int range, int start, int end, int suppress);

and the C declaration:

extern "C" DLLIMP_DBI char* __cdecl DisplayReport(int rvc, int wsobj, int rptnum, int period, int scope, int reset, int range, int start, int end, int suppress)

I'm assuming that the attempt to append more than 4k in a single string operation blows something up somewhere. At this point it's the only logical explaination I have.

Is there any way other than modifying the report to get the larger reports back? Since there is no way to just take the char* and work with it, I can't think of a way other than changing the DLL to use multiple calls to pull the data back in chunks.

Thanks in advance!
AnswerRe: P/Invoke problem Pin
leppie26-Oct-05 12:59
leppie26-Oct-05 12:59 
GeneralRe: P/Invoke problem Pin
Mark Tutt26-Oct-05 13:22
Mark Tutt26-Oct-05 13:22 
AnswerRe: P/Invoke problem Pin
leppie26-Oct-05 13:31
leppie26-Oct-05 13:31 
QuestionCalling dynamicly created buttons Pin
mwallon26-Oct-05 12:17
mwallon26-Oct-05 12:17 
AnswerRe: Calling dynamicly created buttons Pin
enjoycrack26-Oct-05 12:51
enjoycrack26-Oct-05 12:51 
AnswerRe: Calling dynamicly created buttons Pin
Wjousts26-Oct-05 12:53
Wjousts26-Oct-05 12:53 
GeneralRe: Calling dynamicly created buttons Pin
mwallon26-Oct-05 13:16
mwallon26-Oct-05 13:16 
GeneralRe: Calling dynamicly created buttons Pin
Wjousts26-Oct-05 14:47
Wjousts26-Oct-05 14:47 
GeneralRe: Calling dynamicly created buttons Pin
mwallon27-Oct-05 11:00
mwallon27-Oct-05 11:00 
Question.NET Remoting Constructor Parameter Pin
code_dude26-Oct-05 11:03
code_dude26-Oct-05 11:03 
AnswerRe: .NET Remoting Constructor Parameter Pin
Tom Larsen26-Oct-05 11:15
Tom Larsen26-Oct-05 11:15 
GeneralRe: .NET Remoting Constructor Parameter Pin
code_dude26-Oct-05 11:46
code_dude26-Oct-05 11:46 
AnswerRe: .NET Remoting Constructor Parameter Pin
leppie26-Oct-05 12:47
leppie26-Oct-05 12:47 
QuestionCoding in C# - arrays Pin
Zjaded26-Oct-05 10:56
Zjaded26-Oct-05 10:56 
AnswerRe: Coding in C# - arrays Pin
SimonS26-Oct-05 11:03
SimonS26-Oct-05 11:03 
AnswerRe: Coding in C# - arrays Pin
enjoycrack26-Oct-05 11:05
enjoycrack26-Oct-05 11:05 
AnswerRe: Coding in C# - arrays Pin
Christian Graus26-Oct-05 11:30
protectorChristian Graus26-Oct-05 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.