You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
P/Invoke において,データをC#側からアンマネージ側へ渡す,またはアンマネージ側から受け取るとき,どのような動作をしているのかについて調べてみました. まず P/Invoke について,MSDN の中で参考になりそうなページを挙げます. クラス、構造体、および共用体のマーシャリング 文字列のマーシャリング 型の配列のマーシャリング 各種のマーシャリング プラットフォーム呼び出しのデータ型 これらのドキュメントを読んでいると,値型,参照型,blittable 型,非 blittable 型といった,型に関する用語が出てきます. 以下にまとめてみました (blittable の語源だけはわかりませんでしたが...). 値型 (値型) 値型とは,System.ValueType から派生する型のことであり,インスタンスがスタック上に割り当てられます. また値型の変数は,参照型の変数のよう
構造体のポインタを引数に受ける関数には、2通りあります。 引数に渡したポインタに情報を格納して返す 引数に渡したポインタから情報を受け取る この2通りの方法について説明します。 Win32APIのGetSystemTime()を呼び出す 「引数に渡したポインタに情報を格納して返す」タイプの呼び出しです。 Win32APIのGetSystemTime()は、引数に構造体SYSTEMTIMEのポインタを受け取り、そのアドレスに対して現在のシステム時刻を格納します。これをC#でマーシャリングしてみます。 Win32APIでのSYSTEMTIME構造体は以下のように定義されています。 typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORD wMinute;
For this discussion, I am using Windows Mobile 5 for the Smartphone. The version is not critical, though, as the data-access concepts presented remain the same regardless of version. After installing the .NET Compact Framework 2.0 with SP2 and the appropriate Windows Mobile SDK, you must also install ActiveSync (for Windows® XP) or Windows Mobile Device Center (for Windows Vista®). These are neede
Recommendations on how to design and develop custom applications using the Microsoft platform Each patterns & practices offering contains a combination of written documentation and re-usable source code. Many also include a reference implementation. As the guidance is being developed it is reviewed and approved by internal Microsoft product teams and by external customers and partners. This produc
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く