void CallEntryPoint( IntPtr pObject, eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, IntPtr data, IntPtr pfnComplete, IntPtr refComplete) { Debug.Assert(_md3 != null); Console.WriteLine("CallEntryPoint: {0}", ulCommand.ToString()); try { eNkMAIDResult result = _md3.EntryPoint( pObject, ulCommand, ulParam, ulDataType, data, pfnComplete, refComplete); switch (result) { // Note: Ignore these return values case eNkMAIDResult.kNkMAIDResult_NoError: case eNkMAIDResult.kNkMAIDResult_Pending: case eNkMAIDResult.kNkMAIDResult_OrphanedChildren: break; default: Console.WriteLine("===>NikonException {0},{1},{2},{3},{4}", result, ulCommand, ulParam, ulDataType, data); /* * throw new NikonException( * result, * ulCommand, * ulParam, * ulDataType, * data); */ break; } } catch (System.AccessViolationException ex) { Console.WriteLine("===> {0}", ex.Message); } }
void CallEntryPoint( IntPtr pObject, eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, IntPtr data, IntPtr pfnComplete, IntPtr refComplete) { Debug.Assert(_md3 != null); eNkMAIDResult result = _md3.EntryPoint( pObject, ulCommand, ulParam, ulDataType, data, pfnComplete, refComplete); switch (result) { // Note: Ignore these return values case eNkMAIDResult.kNkMAIDResult_NoError: case eNkMAIDResult.kNkMAIDResult_Pending: case eNkMAIDResult.kNkMAIDResult_OrphanedChildren: break; default: throw new NikonException( result, ulCommand, ulParam, ulDataType, data); } }