(toppers-users 2679) vb.netによるデバイスエミュレーションについて Mitsuru Hirabushi

小永吉 進 konagayoshi @ hotmail.com
2007年 9月 27日 (木) 19:49:49 JST






平武士と申します。 Toppers/JSPのWindowsシミュレーション環境を使用させていただいています。Windowsシミュレーション環境の構築まではうまく行ったのですが、デバイスエミュレーションでつまずいてしまいました。vb.netでエミュレーションを利用されている方、アドバイスください。 私の環境は、VisualStudio.NET 2003なので、デバイスエミュレーションについては、windows.txtのvb6.0の設定を参考にsample1.cの改造とvb.netのデバイスドライバ作成しました。 しかし、コンソール上で、rコマンドを入力しても、vbのOnWriteに返答が返ってきません。 DeviceManagerは、タスクからCKernelが、デバイスドライバからCDeviceが呼ばれていることは確認できていますのでCOMは正しく呼べていると思っています。 vb.netのOnWriteの記述を疑っていますが、vb.netは初めて使ったので正しく記述できているかわかりません。Formは次のように記述しています。 問題があればご指摘いただきたく、よろしくお願いいたします。 Public Class Form1    Inherits System.Windows.Forms.Form    Friend WithEvents AxDeviceControl1 As AxATLDEVICELib.AxDeviceControl    Friend WithEvents Label1 As System.Windows.Forms.Label    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        'AxDeviceControl1 = New AxATLDEVICELib.AxDeviceControl        InitializeComponent()        AxDeviceControl1.Connect()        AxDeviceControl1.Map(100, 1)    End Sub    Private Sub AxDeviceControl1_OnWrite(ByVal sender As System.Object, ByVal e As AxATLDEVICELib._IDeviceControlEvents_OnWriteEvent)        Label1.Text() = Str(AxDeviceControl1.Value)End Sub   Private Sub InitializeComponent()        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))        Me.Label1 = New System.Windows.Forms.Label        Me.AxDeviceControl1 = New AxATLDEVICELib.AxDeviceControl        CType(Me.AxDeviceControl1, System.ComponentModel.ISupportInitialize).BeginInit()        Me.SuspendLayout()        '        'Label1        '        Me.Label1.Location = New System.Drawing.Point(72, 40)        Me.Label1.Name = "Label1"        Me.Label1.Size = New System.Drawing.Size(168, 72)        Me.Label1.TabIndex = 1        Me.Label1.Text = "Label1"        '        'AxDeviceControl1        '        Me.AxDeviceControl1.Enabled = True        Me.AxDeviceControl1.Location = New System.Drawing.Point(56, 128)        Me.AxDeviceControl1.Name = "AxDeviceControl1"        Me.AxDeviceControl1.OcxState = CType(resources.GetObject("AxDeviceControl1.OcxState"), System.Windows.Forms.AxHost.State)        Me.AxDeviceControl1.Size = New System.Drawing.Size(192, 128)        Me.AxDeviceControl1.TabIndex = 2        '        'Form1        '        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)        Me.ClientSize = New System.Drawing.Size(292, 266)        Me.Controls.Add(Me.AxDeviceControl1)        Me.Controls.Add(Me.Label1)        Me.Name = "Form1"        CType(Me.AxDeviceControl1, System.ComponentModel.ISupportInitialize).EndInit()        Me.ResumeLayout(False)End Sub    Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed        AxDeviceControl1.Close()    End SubEnd Class
_________________________________________________________________
MSNミュージックとEMI Artistsが共同開催するオーディション SCHOOL OF SCHOOL
http://music.jp.msn.com/
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://www.toppers.jp/pipermail/users/attachments/20070927/74f04295/attachment.html>