Click here to Skip to main content
15,914,071 members
Home / Discussions / C#
   

C#

 
GeneralUrgent: How to pass C# variable to HTML code Pin
Jug-Head2-Nov-04 12:39
Jug-Head2-Nov-04 12:39 
GeneralRe: Urgent: How to pass C# variable to HTML code Pin
Colin Angus Mackay2-Nov-04 23:37
Colin Angus Mackay2-Nov-04 23:37 
GeneralRe: Urgent: How to pass C# variable to HTML code Pin
Stefan Troschuetz3-Nov-04 0:09
Stefan Troschuetz3-Nov-04 0:09 
GeneralQuestion about music Pin
tom_dx2-Nov-04 11:55
tom_dx2-Nov-04 11:55 
GeneralRe: Question about music Pin
Dave Kreskowiak3-Nov-04 3:39
mveDave Kreskowiak3-Nov-04 3:39 
GeneralRe: Question about music Pin
tom_dx3-Nov-04 12:17
tom_dx3-Nov-04 12:17 
GeneralNetwork synchronization of serialized files Pin
jeweladdict2-Nov-04 11:38
jeweladdict2-Nov-04 11:38 
GeneralHelp simple string passing :( Pin
BambooMoon2-Nov-04 10:18
BambooMoon2-Nov-04 10:18 
I've now gone bald trying to figure out what is wrong with this simple code. Please help if you can.

The C# application has:
Managed oManaged = new Managed();
string myString = "My string";
oManaged.SetStringValue(myString);

The MC++ DLL has class Managed, where Managed::Managed() consists of:
m_pUnmanaged = new CUnmanaged();
and Managed::SetStringValue(String* strValue) consists of:
m_pUnmanaged->SetStringValue(strValue);

The C++ extension DLL has class CUnmanaged,
where CUnmanaged::SetStringValue(CString strValue) consists of
m_strValue = strValue; // m_strValue is declared as a CString

When I run it, one of two things happens. Either I get an error in CUnmanaged::SetStringValue() saying that object reference is not set to an instance of an object, even though in the debugger I can see in Managed::SetStringValue() that the value of the string passed in is perfectly good. Or, if I get past that (depends on how many times I recompile whether I get past it or not ;{), I get a debug assertion in the C# program of type BLOCK_TYPE_IS_VALID, presumably indicating that the heap is screwed up.Confused | :confused:

GeneralRe: Help simple string passing :( Pin
tom_dx2-Nov-04 11:57
tom_dx2-Nov-04 11:57 
GeneralRe: Help simple string passing :( Pin
BambooMoon2-Nov-04 12:16
BambooMoon2-Nov-04 12:16 
GeneralRe: Help simple string passing :( Pin
tom_dx2-Nov-04 12:20
tom_dx2-Nov-04 12:20 
GeneralRe: Help simple string passing :( Pin
BambooMoon2-Nov-04 12:58
BambooMoon2-Nov-04 12:58 
GeneralRe: Help simple string passing :( Pin
BambooMoon3-Nov-04 6:26
BambooMoon3-Nov-04 6:26 
GeneralInstrumentation Pin
mathon2-Nov-04 8:28
mathon2-Nov-04 8:28 
GeneralRe: Instrumentation Pin
kayhustle2-Nov-04 9:19
kayhustle2-Nov-04 9:19 
GeneralRe: Instrumentation Pin
mathon2-Nov-04 10:02
mathon2-Nov-04 10:02 
GeneralRe: Instrumentation Pin
Dave Kreskowiak3-Nov-04 3:35
mveDave Kreskowiak3-Nov-04 3:35 
GeneralRe: Instrumentation Pin
mathon3-Nov-04 6:35
mathon3-Nov-04 6:35 
GeneralRe: Instrumentation Pin
Dave Kreskowiak3-Nov-04 11:40
mveDave Kreskowiak3-Nov-04 11:40 
GeneralMSDN UDP Sample does not run Pin
win32wiz2-Nov-04 7:49
win32wiz2-Nov-04 7:49 
GeneralRe: MSDN UDP Sample does not run Pin
Charlie Williams2-Nov-04 8:32
Charlie Williams2-Nov-04 8:32 
QuestionClearing device with alpha? Pin
Jaran Nilsen2-Nov-04 6:48
Jaran Nilsen2-Nov-04 6:48 
QuestionHowto Instantiate a class of unknown type? Pin
Member 14185452-Nov-04 6:37
Member 14185452-Nov-04 6:37 
AnswerRe: Howto Instantiate a class of unknown type? Pin
Nick Parker2-Nov-04 8:00
protectorNick Parker2-Nov-04 8:00 
GeneralLine Break Pin
goatstudio2-Nov-04 5:58
goatstudio2-Nov-04 5:58 

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.