最初にRegisterWindowMessage(詳細はhttps://msdn.microsoft.com/en-us/library/windows/desktop/ms644947%28v=vs.85%29.aspxを参照)の戻り値を確認し、0の場合はエラーコードを取得するためにMarshal.GetLastWin32Error()(System.Runtime.InteropServicesから)を使用する必要があります。エラーコードは、インストールされているWMx SDKのwinerror.hで調べることができます。
基本SAMPEアプリは、リターンコードをチェックしません: - 。((
YOUはInitReader戻りコードをチェックする必要があります(ドキュメントの22ページを参照してください)
をするDLLがコピーされている場合にも確認してください。
The following happens when decoded data comes about,
A decode event broadcasts when the reader decodes data.
The thread waits for the decode event, and the decode data can then
be obtained.
For example,
while(true) {
dwStatus = WaitForSingleObject(handleEvent,INFINITE)
b1 = Reader.ReaderEngineAPI.GetDecodeType();
b1 = Reader.ReaderEngineAPI.GetDecodeData(ref tmp, tmp.length());
}
リーダーDLLは、次の パスでOSディレクトリ内でアクセス可能です。あなたのアプリケーションを開発する前に、必要なファイルをコピーし ActiveSync接続を介してモバイルコンピュータから。 \ Windows \ Reader_Ce_Net.dll \ Windows \ ReaderDll_CE.dll