Click here to Skip to main content
15,885,216 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralSaving a TextBox with Its Format Pin
njppp12-Oct-04 1:10
njppp12-Oct-04 1:10 
GeneralRe: Saving a TextBox with Its Format Pin
J4amieC12-Oct-04 1:25
J4amieC12-Oct-04 1:25 
QuestionHow to make C# application run on win2000 and WinMe and Win98? Pin
momer11-Oct-04 1:24
momer11-Oct-04 1:24 
AnswerRe: How to make C# application run on win2000 and WinMe and Win98? Pin
Vasudevan Deepak Kumar13-Oct-04 2:02
Vasudevan Deepak Kumar13-Oct-04 2:02 
QuestionHowTo copy a folder with all permissions? Pin
akum10-Oct-04 22:40
akum10-Oct-04 22:40 
GeneralError: usbtest(Cs).exe----cannt find DLL Pin
momer10-Oct-04 19:23
momer10-Oct-04 19:23 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
J4amieC11-Oct-04 0:51
J4amieC11-Oct-04 0:51 
GeneralException in SafeNativeMethods Pin
Mikke_x10-Oct-04 19:18
Mikke_x10-Oct-04 19:18 
Hi!

Sorry for posting in multiple boards, but my post in the C# board gave no replies what so ever, so I thought I give it a try here too.

I´m working on a project where we are making a hook for an other software. Now we have encountered a problem and I would like some help on finding a work-around.

When we are opening a new form in the hook an exception is thrown and the form is destroyed. The exception is a System.TypeInitializationException that says that "The type initializer for "System.Drawing.SafeNativeMethods" threw an exception. -->System.NullreferenceException: Object reference not set to an instance of an object".
I have traced the exception into the InitializeComponent() method and it is thrown when the first component on the form is initialized. This exception does not appere every time, but once in a while. I can not see any real reason for the problem and we are not doing any different when it works and does not.

I have searched the net and found others that have had the same problem, mut I have not found any good solution. The problem seems to be in GDI+, at least that is what how I have understod it when reading posts on other forums..

The application loading the hook is creating appDomains for all hooks so that it can unload them as it whishes, I think that this might be the root of the problem, or? We would really need to show this form, its for configuring the hook, and the main application really needs to unload the hooks now and then, so the problem is a fact.

Is there any good work-around for this? Is there anything we can do to solve this problem without having to make changes in the main application?

All help appriciated!

Regards Mikael

Generalreferencing assemblies in the GAC (global assembly cache) Pin
rajrao10-Oct-04 10:38
rajrao10-Oct-04 10:38 
GeneralMicrosoft Installer does not remove assemblies from the GAC - Global Assembly Cache Pin
rajrao10-Oct-04 9:52
rajrao10-Oct-04 9:52 
GeneralRemoting to unmanaged 3ds Max plugin Pin
DonCroco9-Oct-04 1:53
DonCroco9-Oct-04 1:53 
QuestionHow to compare two files' content in C#? Pin
momer8-Oct-04 17:20
momer8-Oct-04 17:20 
AnswerRe: How to compare two files' content in C#? Pin
J4amieC11-Oct-04 0:56
J4amieC11-Oct-04 0:56 
AnswerRe: How to compare two files' content in C#? Pin
Aryo Handono21-Oct-04 2:59
professionalAryo Handono21-Oct-04 2:59 
Questionhow to owner-draw mainMenu? Pin
mickelliot8-Oct-04 14:42
mickelliot8-Oct-04 14:42 
QuestionHow to use Regular Expression to split a String Pin
Dan Dusek8-Oct-04 14:03
Dan Dusek8-Oct-04 14:03 
AnswerRe: How to use Regular Expression to split a String Pin
Tomas Petricek9-Oct-04 14:51
Tomas Petricek9-Oct-04 14:51 
GeneralBIZTALK 2004 -- Configuration Issue Pin
DotNetLearner8-Oct-04 4:42
DotNetLearner8-Oct-04 4:42 
GeneralWeb Access Failed Error Pin
Hadi Fakhreddine7-Oct-04 20:43
Hadi Fakhreddine7-Oct-04 20:43 
GeneralDynamic Image on Crystal Report Pin
HyVong7-Oct-04 12:37
HyVong7-Oct-04 12:37 
QuestionTTfonts,Label,Drawtext Anomaly? Pin
rlphillips7-Oct-04 5:40
rlphillips7-Oct-04 5:40 
GeneralNgen outlook Com addin dll Pin
Isaac Varghese7-Oct-04 0:19
Isaac Varghese7-Oct-04 0:19 
QuestionHow to conjoin C# code with VC++6.0 code? Pin
momer6-Oct-04 19:40
momer6-Oct-04 19:40 
AnswerRe: How to conjoin C# code with VC++6.0 code? Pin
Nnamdi Onyeyiri7-Oct-04 23:20
Nnamdi Onyeyiri7-Oct-04 23:20 
GeneralRe: Nnamdi Onyeyiri Pin
momer10-Oct-04 15:46
momer10-Oct-04 15:46 

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.