掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
VBでOCXから値を取得するには? (ID:120510)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
魔界の仮面弁士様ありがとうございました。 解決いたしました。下記のとうりです。 本当に助かりました。 VB************************************************ Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSrc As Any, ByVal ByteLen As Long) Public Type EVENT_REC Temp As Long 'アドレスがはいる sec As Long '4byte usec As Long '4byte eventType As Byte '1byte channelNo As Integer '2byte videoDataPossible As Byte '1byte area As Integer '2byte End Type Public g_EventRec(0) As EVENT_REC Dim tpos As Long Dim apos As Long tpos = VarPtr(g_EventRec(0)) 'アドレスを取得 apos = tpos Window1.GetLatestEvent tpos (ここでtpos=0になる) CopyMemory g_EventRec(0), apos, Len(g_EventRec(0)) 'コピー VC************************************************ [id(4), helpstring("メソッド GetLatestEvent")] HRESULT GetLatestEvent(long* output); STDMETHODIMP ReportWindow::GetLatestEvent(long *output) { memcpy(output, &m_latest_log, sizeof(m_latest_log)); 'コピー }
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.