コード例 #1
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal void ResetSession()
 {
     if (iSession != null)
     {
         try { iSession.CeRapiUninit(); } catch { }
     }
     iSession       = null;
     sessionFailure = false;
 }
コード例 #2
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal DeviceFile(IRAPISession sess, string fileName, uint dwDesiredAccess, uint dwShareMode, uint dwCreationDistribution, uint dwFlags)
     : base(InvalidHandleValue, true)
 {
     this.sess = sess;
     Name      = fileName;
     SetHandle(sess.CeCreateFile(fileName, dwDesiredAccess, dwShareMode, IntPtr.Zero, dwCreationDistribution, dwFlags, IntPtr.Zero));
     if (IsInvalid)
     {
         throw new RapiException(sess.CeGetLastError());
     }
 }
コード例 #3
0
ファイル: RemoteDatabase.cs プロジェクト: Dooks123/Rapi2
 internal RemoteDatabase(IRAPISession s, uint objId)
 {
     sess   = s;
     handle = new RemoteDevice.DeviceHandle(sess, sess.CeOpenDatabase(ref objId, null, 0, CEDB_AUTOINCREMENT, IntPtr.Zero));
     if (handle.IsInvalid)
     {
         throw new RapiException(sess.CeGetLastError());
     }
     ObjectId        = objId;
     CurrentRecordId = 0;
 }
コード例 #4
0
ファイル: RemoteDatabase.cs プロジェクト: Dooks123/Rapi2
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoteDatabase"/> class and opens an existing database in the object store on a remote Microsoft® Windows® CE–based device.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="objId">The object identifier of the database to be opened.</param>
 /// <param name="autoIncr">If set to <c>true</c> current seek position is automatically incremented with each call to the ReadRecordProps method.</param>
 /// <param name="sortId">Property identifier of the primary key for the sort order in which the database is to be traversed. Subsequent calls to Seek assume this sort order. This parameter can be zero if the sort order is not important.</param>
 public RemoteDatabase(RemoteDevice device, uint objId, bool autoIncr, uint sortId)
 {
     sess   = device.ISession;
     handle = new RemoteDevice.DeviceHandle(sess, sess.CeOpenDatabase(ref objId, null, sortId, autoIncr ? CEDB_AUTOINCREMENT : 0, IntPtr.Zero));
     if (handle.IsInvalid)
     {
         device.ThrowRAPIException();
     }
     ObjectId        = objId;
     CurrentRecordId = 0;
 }
コード例 #5
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal DeviceFile(IRAPISession sess, string fileName)
     : this(sess, fileName, 0, 1, 3, 0x80)
 {
 }
コード例 #6
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal RemoteDatabaseEnum(IRAPISession session, uint dbType)
 {
     sess        = session;
     this.dbType = dbType;
     Reset();
 }
コード例 #7
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 /// <summary>
 /// Cleans up all internal references.
 /// </summary>
 public void Dispose()
 {
     sess = null;
     GC.SuppressFinalize(this);
 }
コード例 #8
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal RemoteDatabaseList(IRAPISession session, uint dbType)
 {
     sess        = session;
     this.dbType = dbType;
 }
コード例 #9
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal DeviceRegistryKey(IRAPISession session, uint handle, string keyName)
 {
     sess = session;
     hKey = handle;
     Name = keyName;
 }
コード例 #10
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 internal DeviceRegistryKey(IRAPISession session)
 {
     sess = session;
 }
コード例 #11
0
ファイル: RemoteDevice.cs プロジェクト: Dooks123/Rapi2
 public DeviceHandle(IRAPISession session, IntPtr handle)
     : base(InvalidHandleValue, true)
 {
     sess = session;
     SetHandle(handle);
 }