C#でもメモリを確保して、ポインタを意識しながらアクセスしないとだめっぽい。
参考:http://www2u.biglobe.ne.jp/~kaduhiko/csharp_05.html
普通にスレッドでDLLを呼び出すと、以降、他のDLLを呼び出す時にNullReferenceException?が出た。user32.dllとかスレッドでDLLを呼び出す前に呼び出したDLLは正常に動作した・・・。
スレッド中のDLLの呼び出しにDelegateを使用したところ問題解決!
タイマクラスは3種類存在するが、どれもバグを抱えている。(.NET Framework1.1SP1時点)
System.Timers.Timer:
http://www.atmarkit.co.jp/fdotnet/dotnettips/374timerstimer/timerstimer.html
System.Threading.Time:
http://www.atmarkit.co.jp/fdotnet/dotnettips/373threadtimer/threadtimer.html
System.Windows.Forms.Timer:
http://www.atmarkit.co.jp/fdotnet/dotnettips/372formstimer/formstimer.html
バグ内容は以下の通り。
System.Timers.Timerはサービスでは使えない:
http://support.microsoft.com/default.aspx?scid=kb;ja;842793
System.Threading.Timerはタイマ イベントが通知できないことがある:
http://support.microsoft.com/default.aspx?scid=kb;ja;900822
WEB参照を行った後は、必ずオブジェクトビューアで確認すること。 オブジェクトビューアで確認しないと、更新されない場合が多い。
Application.EnableVisualStyles?は システムが不安定になる為、使用しないこと。 どうしても、というならマニフェストファイル使って下さい。
アプリケーションの構成ファイルに以下の記述を追加する。
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="DllDirPath"/> </assemblyBinding> </runtime> </configuration>
どうやらC#はJavaと違ってthrowsみたいなException投げますよ宣言はないらしい。 その代わり、全てExceptionクラスを継承する必要があるみたい。
http://msdn2.microsoft.com/ja-jp/library/ms228505(vs.80).aspx
Linux
サーバ構築
Windows
Java
Program