Develop and Download Open Source Software

Browse Subversion Repository

/[ttssh2]/trunk/teraterm/ttpcmn/ttcmn_cominfo.c

Log of /trunk/teraterm/ttpcmn/ttcmn_cominfo.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 9201 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 18 15:27:25 2021 UTC (3 years ago) by zmatsuo
File length: 3216 byte(s)
Diff to previous 9200
VS2005 でビルドできるよう修正

- comportinfo.cpp で devpkey.h を利用するようにした
  - VS2005 + SDK7.1 のとき
  - VS2019 のとき
  - MinGW のとき
- VS2005 + SDK7.0 のときはファイルがないので include できない

Revision 9200 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 18 15:27:14 2021 UTC (3 years ago) by zmatsuo
File length: 3198 byte(s)
Diff to previous 9197
DetectComPorts()でバッファオーバーランしないよう修正

- テーブルサイズ(4096)よりcomポート数が多い場合オーバーランしていた
- ttpcmn/ttcmn_cominfo.h を追加

Revision 9197 - (view) (download) (as text) (annotate) - [select for diffs]
Added Sat Mar 13 14:42:48 2021 UTC (3 years ago) by zmatsuo
File length: 2929 byte(s)
comポートの列挙、情報取得を一か所にまとめた

- 機能を一か所(ComPortInfoGet())にまとめた
- DetectComPorts() から ComPortInfoGet() を利用するようにした
  - comport関連を ttpcmn/ttpcmn.c から ttpcmn/ttpcmn_cominfo.c に分離
  - 従来の動作
    - QueryDosDeviceA(NULL) でデバイスを列挙
    - "COM0" などを探して列挙
    - しかし 95 ではQueryDosDeviceA(NULL)は常に失敗
    - fopen() して成功したときデバイスが存在する、と判定
      - "\\.\COM0" など
  - 修正後
    - ComPortInfoGet() の結果を使用するようにした
- ttpcmn/comportinfo.cpp の ComPortInfoGet()
  - 従来
    - Windows 95 では列挙できていなかった
      - 多分 NT4も
      - setupapi がうまく使用できないOS
  - 修正後
    - 95,NT4の場合は "\\.\COM0" などをオープンしてデバイス存在判定を行う
    - その他のOSの場合は従来とおなじ
      - setupapi を使用する方法
  - comportinfo.cpp,h を common/ へ移動
- QueryDosDeviceA(NULL)
  - 成功するOSでは setupapi が正しく動作
  - 失敗するOSでは setupapi は動作しない

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26