471,321 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Static wrapper throws Object Not Set on long running routines

I have dll (vb.net) that decrypts data. Since I can not mix VB and C# in the
same project I compiled the VB to a dll and reference it in my project. I
then created a static c# class that calls the dll and returns the data.

This all works fine except when I have to decrypt data from many (100,000+)
rows of data (looping through a SqlDataReader)

i.e. I am getting an Object reference not set to an instance of an object
error only when I am calling this class in a long running loop (the magic
number seems to be somewhere around 28,000 calls).

The C# class looks like this

public sealed class DecrypWrapper{

public static string DecryptString(string EncryptedValue){
VBDecryptor d = new VBDecryptor();
return d.Decrypt(EncryptedValue);
}

}
How do I even troubleshoot this?

kevin

Jan 12 '06 #1
1 1075
Kevin,
Assuming as you indicate that you have the source code for the VB.NET DLL,
you should bring this VB.NET project into your Solution and set a PROJECT
reference to it.
Then, you will be able to debug through - regardless of language.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"kevin" wrote:
I have dll (vb.net) that decrypts data. Since I can not mix VB and C# in the
same project I compiled the VB to a dll and reference it in my project. I
then created a static c# class that calls the dll and returns the data.

This all works fine except when I have to decrypt data from many (100,000+)
rows of data (looping through a SqlDataReader)

i.e. I am getting an Object reference not set to an instance of an object
error only when I am calling this class in a long running loop (the magic
number seems to be somewhere around 28,000 calls).

The C# class looks like this

public sealed class DecrypWrapper{

public static string DecryptString(string EncryptedValue){
VBDecryptor d = new VBDecryptor();
return d.Decrypt(EncryptedValue);
}

}
How do I even troubleshoot this?

kevin

Jan 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by lkrubner | last post: by
1 post views Thread by James | last post: by
15 posts views Thread by Steve Richfield | last post: by
1 post views Thread by Ray Ackley | last post: by
10 posts views Thread by goose | last post: by
4 posts views Thread by Stephen Walch | last post: by
49 posts views Thread by Ben Voigt [C++ MVP] | last post: by
5 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by

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.