G
Guest
I have a class library project that uses unmanaged C dll to perform some
image handling. This DLL requires me to pass in a structure containing image
coordinates. In VB6, I could use a type/endtype and define left, top, right,
and bottom coordinates. In .NET, I can use a structure to do the same thing.
In .NET only, I have found odd behavior in my C DLL, so in debugging, I try
to view the values of my 4 public variables in my structure. I do this
BEFORE I pass the structure to the C DLL. The values of the member variables
are not the values I assigned them. In fact, I execute a line like this:
struct.top = intVariable
then, after executing this line, I try to display the value of this
variable. All member variables behave the same - they all evaluate to zero.
If I attempt to execute this same line in the debugger, I get a debugger
error:
System Error &H80131303&
If I write a test application (standalong EXE), I do not see this behavior.
Is there anything I can do to find out if my C dll is getting nothing but
"0" ?
Is there something about the system error that's causing this problem?
In researching this system error, I found it's about a core class that's not
loaded, although it doesn't say what class. My class library is being loaded
late-bound, and I'm using reflection to load the DLL into memory. Is this
related?
thanks,
andrew
image handling. This DLL requires me to pass in a structure containing image
coordinates. In VB6, I could use a type/endtype and define left, top, right,
and bottom coordinates. In .NET, I can use a structure to do the same thing.
In .NET only, I have found odd behavior in my C DLL, so in debugging, I try
to view the values of my 4 public variables in my structure. I do this
BEFORE I pass the structure to the C DLL. The values of the member variables
are not the values I assigned them. In fact, I execute a line like this:
struct.top = intVariable
then, after executing this line, I try to display the value of this
variable. All member variables behave the same - they all evaluate to zero.
If I attempt to execute this same line in the debugger, I get a debugger
error:
System Error &H80131303&
If I write a test application (standalong EXE), I do not see this behavior.
Is there anything I can do to find out if my C dll is getting nothing but
"0" ?
Is there something about the system error that's causing this problem?
In researching this system error, I found it's about a core class that's not
loaded, although it doesn't say what class. My class library is being loaded
late-bound, and I'm using reflection to load the DLL into memory. Is this
related?
thanks,
andrew