Date of registration: Mar 13th 2009
Location: Oberirsen - Germany
Occupation: Senior Software Engineer
Hobbies: Programming aund Photography
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Private Type test test1 As String test2 As Long test3 As Boolean End Type Public Sub Test_Click() Dim hugo As test java#lang#System.out.println Len(hugo) hugo.test1 = "Test" hugo.test2 = 42 hugo.test3 = True End Sub |
] |
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
'VB6-Code Public Type MyType Var1 As Integer Var2 As Integer Var3 As Long Var4 As String End Type Public Sub WriteMyType(MyType As MyType, FNr As Integer) Put FNr, , MyType End Type Public Sub ReadMyType(MyType As MyType, FNr As Integer) Get FNr, , MyType End Type |
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 |
Public Sub WriteMyType(MyType As MyType, FNr As Integer) Put FNr, , MyType.Var1 Put FNr, , MyType.Var2 Put FNr, , MyType.Var3 Put FNr, , MyType.Var4 End Type Public Sub ReadMyType(MyType As MyType, FNr As Integer) Get FNr, , MyType.Var1 Get FNr, , MyType.Var2 Get FNr, , MyType.Var3 Get FNr, , MyType.Var4 End Type |
as long as we have your VarPtr-dll we have a possible way around some pointer things. This post has been edited 1 times, last edit by "OlimilO" (Jun 4th 2009, 9:34am)
Date of registration: Mar 13th 2009
Location: Oberirsen - Germany
Occupation: Senior Software Engineer
Hobbies: Programming aund Photography
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 |
Private Type HH_FTS_QUERY cbStruct As Long '< Here is the size of the structure fUniCodeStrings As Long pszSearchQuery As String iProximity As Long fStemmedSearch As Long fTitleOnly As Long fExecute As Long pszWindow As String End Type |
|
|
Jabaco Source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
'-Begin------------------------------------------------------------
'-External functions---------------------------------------------
Private WinAPI Function !HtmlHelp Lib "hhctrl.ocx" _
Alias "HtmlHelpA" (ByVal hwndCaller As Long, _
ByVal pszFile As String, ByVal uCommand As Long, _
ByVal dwData As Long) As Long
'-Constants------------------------------------------------------
Private Const HH_DISPLAY_TOPIC As Long =&H0
Private Const HH_DISPLAY_TOC As Long = &H1
Private Const HH_DISPLAY_INDEX As Long = &H2
Private Const HH_DISPLAY_SEARCH As Long = &H3
Private Const HH_CLOSE_ALL As Long = &H12
'-Global variables-----------------------------------------------
Dim VarPtr As New VarPtr()
Dim FileName As String = "c:\\windows\\help\\wmplayer.chm"
'-ButtonClick----------------------------------------------------
Public Sub Command1_Click()
!HtmlHelp 0, FileName, HH_DISPLAY_TOPIC, 0
Dim HH_FTS_QUERY As Long
HH_FTS_QUERY = VarPtr.CreateVar("HH_FTS_QUERY", "Array", 32)
Dim pszSearchQeury As Long
pszSearchQuery = VarPtr.CreateVar("pszSearchQuery", "String", 8)
VarPtr.SetStringVar "pszSearchQuery", "foo"
Dim pszWindow As Long
pszWindow = VarPtr.CreateVar("pszWindow", "String", 4)
VarPtr.SetStringVar "pszWindow", ""
VarPtr.SetArrayLong "HH_FTS_QUERY", 0, 32 'cbStruct
VarPtr.SetArrayLong "HH_FTS_QUERY", 4, 1 'fUniCodeStrings
VarPtr.SetArrayLong "HH_FTS_QUERY", 8, pszSearchQuery
VarPtr.SetArrayLong "HH_FTS_QUERY", 12, 0 'iProximity
VarPtr.SetArrayLong "HH_FTS_QUERY", 16, 0 'fStemmedSearch
VarPtr.SetArrayLong "HH_FTS_QUERY", 20, 1 'fTitleOnly
VarPtr.SetArrayLong "HH_FTS_QUERY", 24, 1 'fExecute
VarPtr.SetArrayLong "HH_FTS_QUERY", 28, pszWindow
!HtmlHelp 0, FileName, HH_DISPLAY_SEARCH, HH_FTS_QUERY
VarPtr.DestroyVar "pszWindow"
VarPtr.DestroyVar "pszSearchQuery"
VarPtr.DestroyVar "HH_FTS_QUERY"
End Sub
'-Button2Click---------------------------------------------------
Public Sub Command2_Click()
!HtmlHelp 0, "", HH_CLOSE_ALL, 0
End Sub
'-End--------------------------------------------------------------
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 |
Dim strSearch As HH_FTS_QUERY strSearch.cbStruct = 32 strSearch.fUniCodeStrings = 1& strSearch.pszSearchQuery = "foo" strSearch.iProximity = 0& strSearch.fStemmedSearch = 0& strSearch.fTitleOnly = 1& strSearch.fExecute = 1& strSearch.pszWindow = "" !HtmlHelp 0, FileName, HH_DISPLAY_SEARCH, strSearch |