Jump to content

com obj?


 Share

Recommended Posts

Hello all

I need some help i have a program that i known has a com obj

but i do not known the name of it but is there some script i can run to get the com obj name

thanks beau

Edited by n9mfk9
Link to comment
Share on other sites

If you post the VB code I'm sure we can help you out.

this is project1.vbp

Type=Exe

Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\system32\Stdole2.tlb#OLE Automation

Reference=*\G{4FE359C5-A58F-459D-BE95-CA559FB4F270}#1.0#0#..\..\OmniRig.exe#OmniRig Library

Form=Form1.frm

Startup="Form1"

Command32=""

Name="Project1"

HelpContextID="0"

CompatibleMode="0"

MajorVer=1

MinorVer=0

RevisionVer=0

AutoIncrementVer=0

ServerSupportFiles=0

VersionCompanyName="b"

CompilationType=0

OptimizationType=0

FavorPentiumPro=0

CodeViewDebugInfo=0

NoAliasing=0

BoundsCheck=0

OverflowCheck=0

FlPointCheck=0

FDIVCheck=0

UnroundedFP=0

StartMode=0

Unattended=0

Retained=0

ThreadPerObject=0

MaxNumberOfThreads=1

[MS Transaction Server]

AutoRefresh=1

project1.vbw

Form1 = 17, 36, 763, 709, , 22, 22, 522, 527, C

form1.frm

VERSION 5.00

Begin VB.Form Form1

Caption = "Form1"

ClientHeight = 3810

ClientLeft = 60

ClientTop = 345

ClientWidth = 3300

LinkTopic = "Form1"

ScaleHeight = 3810

ScaleWidth = 3300

StartUpPosition = 3 'Windows Default

Begin VB.CommandButton Command1

Caption = "Configure"

Height = 375

Left = 1800

TabIndex = 11

Top = 3240

Width = 1095

End

Begin VB.Frame Frame1

Caption = " Rig "

Height = 1095

Left = 240

TabIndex = 8

Top = 2520

Width = 1095

Begin VB.OptionButton Option2

Caption = "#2"

Height = 195

Left = 120

TabIndex = 10

Top = 720

Width = 735

End

Begin VB.OptionButton Option1

Caption = "#1"

Height = 375

Left = 120

TabIndex = 9

Top = 240

Value = -1 'True

Width = 615

End

End

Begin VB.Label Label8

Caption = "Label8"

Height = 255

Left = 960

TabIndex = 7

Top = 1920

Width = 1935

End

Begin VB.Label Label7

Caption = "Status"

Height = 255

Left = 240

TabIndex = 6

Top = 1920

Width = 495

End

Begin VB.Label Label6

Caption = "Label6"

Height = 255

Left = 960

TabIndex = 5

Top = 1320

Width = 1935

End

Begin VB.Label Label5

Caption = "Mode"

Height = 255

Left = 240

TabIndex = 4

Top = 1320

Width = 495

End

Begin VB.Label Label4

Caption = "0.00"

Height = 255

Left = 1080

TabIndex = 3

Top = 720

Width = 1815

End

Begin VB.Label Label3

Caption = "0.00"

Height = 255

Left = 1080

TabIndex = 2

Top = 240

Width = 1815

End

Begin VB.Label Label2

Caption = "TX"

Height = 255

Left = 240

TabIndex = 1

Top = 720

Width = 255

End

Begin VB.Label Label1

Caption = "RX"

Height = 255

Left = 240

TabIndex = 0

Top = 240

Width = 255

End

End

Attribute VB_Name = "Form1"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = False

Dim WithEvents OmniRigEngine As OmniRigX

Attribute OmniRigEngine.VB_VarHelpID = -1

Dim Rig As RigX

Dim OurRigNo As Integer

'Form events

Private Sub Form_Load()

StartOmniRig

End Sub

Private Sub Form_Unload(Cancel As Integer)

StopOmniRig

End Sub

Private Sub Option1_Click()

SelectRig 1

End Sub

Private Sub Option2_Click()

SelectRig 2

End Sub

Private Sub Command1_Click()

If OmniRigEngine Is Nothing Then Exit Sub

OmniRigEngine.DialogVisible = True

End Sub

'OmniRig events

Private Sub OmniRigEngine_StatusChange(ByVal RigNumber As Long)

If RigNumber = OurRigNo Then ShowRigStatus

End Sub

Private Sub OmniRigEngine_ParamsChange(ByVal RigNumber As Long, ByVal Params As Long)

If RigNumber = OurRigNo Then ShowRigParams

End Sub

'Procedures

Private Sub StartOmniRig()

On Error GoTo Error

If Not OmniRigEngine Is Nothing Then Exit Sub

Set OmniRigEngine = CreateObject("OmniRig.OmniRigX")

'we want OmniRig interface V.1.1 to 1.99

'as V2.0 will likely be incompatible with 1.x

If OmniRigEngine.InterfaceVersion < &H101 Then GoTo Error

If OmniRigEngine.InterfaceVersion > &H299 Then GoTo Error

SelectRig 1

Exit Sub

Error:

'report problems

Set OmniRigEngine = Nothing

MsgBox "OmniRig is not installed or has a wrong version number"

End Sub

Private Sub StopOmniRig()

Set Rig = Nothing

Set OmniRigEngine = Nothing

End Sub

Private Sub SelectRig(NewRigNo As Integer)

If OmniRigEngine Is Nothing Then Exit Sub

OurRigNo = NewRigNo

Select Case NewRigNo

Case 1

Set Rig = OmniRigEngine.Rig1

Case 2

Set Rig = OmniRigEngine.Rig2

End Select

ShowRigStatus

ShowRigParams

End Sub

Private Sub ShowRigStatus()

If Rig Is Nothing Then Exit Sub

Label8.Caption = Rig.StatusStr

End Sub

Private Sub ShowRigParams()

If Rig Is Nothing Then Exit Sub

Label3.Caption = Rig.GetRxFrequency / 1000000

Label4.Caption = Rig.GetTxFrequency / 1000000

Select Case Rig.Mode

Case PM_CW_L

Label6.Caption = "CW"

Case PM_CW_U

Label6.Caption = "CW"

Case PM_SSB_L

Label6.Caption = "LSB"

Case PM_SSB_U

Label6.Caption = "USB"

Case Else

Label6.Caption = "Other"

End Select

End Sub

thanks beau

Link to comment
Share on other sites

  • Moderators

Well I got it this far not having any clue what it actually does.

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

Global $oEvent, $Rig, $OurRigNo, $OmniRigEngine

### Koda GUI section start ###
$Form1 = GUICreate("OmniRig", 338, 290, 291, 139)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$Button1 = GUICtrlCreateButton("Configure", 24, 200, 75, 25, 0)
GUICtrlSetOnEvent(-1, "_Configure")
$Button2 = GUICtrlCreateButton("Start", 24, 240, 75, 25, 0)
GUICtrlSetOnEvent(-1, "_StartOmniRig")
$Radio1 = GUICtrlCreateRadio("#1", 24, 152, 40, 17)
GUICtrlSetOnEvent(-1, "_SelectRig")
$Radio2 = GUICtrlCreateRadio("#2", 24, 176, 40, 17)
GUICtrlSetOnEvent(-1, "_SelectRig")
$Label1 = GUICtrlCreateLabel("RX", 160, 24, 150, 17)
$Label2 = GUICtrlCreateLabel("TX", 160, 56, 150, 17)
$Label3 = GUICtrlCreateLabel("0.00", 160, 88, 150, 17)
$Label4 = GUICtrlCreateLabel("0.00", 160, 120, 150, 17)
$Label5 = GUICtrlCreateLabel("Mode", 160, 152, 150, 17)
$Label6 = GUICtrlCreateLabel("Label6", 160, 184, 150, 17)
$Label7 = GUICtrlCreateLabel("Status", 160, 216, 150, 17)
$Label8 = GUICtrlCreateLabel("Label8", 160, 248, 150, 17)
$Group1 = GUICtrlCreateGroup("Rig", 8, 8, 321, 273)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
### Koda GUI section end   ###

While 1
    Sleep(100)
WEnd

Func _StartOmniRig()
    If IsObj($OmniRigEngine) Then
        SetError(1)
        Return 0
    EndIf

    $OmniRigEngine = ObjCreate("OmniRig.OmniRigX")
    If Not IsObj($OmniRigEngine) Then
        MsgBox(48, "Error", "Unable to create OmniRig Object.")
        SetError(1)
        Return 0
    EndIf   
    ;we want OmniRig interface V.1.1 to 1.99
    ;as V2.0 will likely be incompatible with 1.x
    If $OmniRigEngine.InterfaceVersion < 101 Then
        MsgBox(48, "Error", "OmniRig is not installed or has a wrong version number")
        Exit
    ElseIf $OmniRigEngine.InterfaceVersion > 299 Then
        MsgBox(48, "Error", "OmniRig is not installed or has a wrong version number")
        Exit
    EndIf

    $oEvent = ObjEvent($OmniRigEngine, "Evt_")

    _SelectRig()
EndFunc   ;==>_StartOmniRig

Func _SelectRig($NewRigNo = 1)
    If Not IsObj($OmniRigEngine) Then
        SetError(1)
        Return 0
    EndIf

    If GUICtrlRead($Radio1) = $GUI_CHECKED Then
        $NewRigNo = 1
    ElseIf GUICtrlRead($Radio2) = $GUI_CHECKED Then
        $NewRigNo = 2
    EndIf
    
    $OurRigNo = $NewRigNo

    Switch $NewRigNo
        Case 1
            $Rig = $OmniRigEngine.Rig1
        Case 2
            $Rig = $OmniRigEngine.Rig2
    EndSwitch

    _ShowRigStatus()
    _ShowRigParams()
EndFunc   ;==>_SelectRig


Func _ShowRigStatus()
    If Not IsObj($Rig) Then
        SetError(1)
        Return 0
    EndIf

    GUICtrlSetData($Label8, $Rig.StatusStr)
EndFunc   ;==>_ShowRigStatus


Func _ShowRigParams()
    If Not IsObj($Rig) Then
        SetError(1)
        Return 0
    EndIf

    ;GUICtrlSetData($Label3, $Rig.GetRxFrequency())
    ;GUICtrlSetData($Label4, $Rig.GetTxFrequency())

    Switch $Rig.Mode
        Case "PM_CW_L", "PM_CW_U"
            GUICtrlSetData($Label6, "CW")
        Case "PM_SSB_L"
            GUICtrlSetData($Label6, "LSB")
        Case "PM_SSB_U"
            GUICtrlSetData($Label6, "USB")
        Case Else
            GUICtrlSetData($Label6, "Other")
    EndSwitch
EndFunc   ;==>_ShowRigParams

Func _Configure()
    If Not IsObj($OmniRigEngine) Then
        SetError(1)
        Return 0
    EndIf
    
    $OmniRigEngine.DialogVisible = True
EndFunc   ;==>_Configure

Func Evt_StatusChange($RigNumber)
    If $RigNumber = $OurRigNo Then _ShowRigStatus()
EndFunc   ;==>Evt_StatusChange

Func Evt_ParamsChange($RigNumber, $Params)
    If $RigNumber = $OurRigNo Then _ShowRigParams()
EndFunc   ;==>Evt_ParamsChange

Func _Exit()
    Exit
EndFunc   ;==>_Exit
Link to comment
Share on other sites

  • Moderators

thanks it a radio control program

i do have one question how do you send dat to a com object thanks beau

You have to call methods or properties associated with the object. I never could find any documentation that described the com interface of the OmniRig program.
Link to comment
Share on other sites

is this any help

[

uuid(4FE359C5-A58F-459D-BE95-CA559FB4F270),

version(1.0),

helpstring("OmniRig Library")

]

library OmniRig

{

importlib("stdole2.tlb");

importlib("STDVCL40.DLL");

[

uuid(501A2858-3331-467A-837A-989FDEDACC7D),

version(1.0),

helpstring("Dispatch interface for OmniRigX Object"),

dual,

oleautomation

]

interface IOmniRigX: IDispatch

{

[propget, id(0x00000001)]

HRESULT _stdcall InterfaceVersion([out, retval] long * Value );

[propget, id(0x00000002)]

HRESULT _stdcall SoftwareVersion([out, retval] long * Value );

[propget, id(0x00000003)]

HRESULT _stdcall Rig1([out, retval] IRigX ** Value );

[propget, id(0x00000004)]

HRESULT _stdcall Rig2([out, retval] IRigX ** Value );

[propget, id(0x00000005)]

HRESULT _stdcall DialogVisible([out, retval] VARIANT_BOOL * Value );

[propput, id(0x00000005)]

HRESULT _stdcall DialogVisible([in] VARIANT_BOOL Value );

};

[

uuid(2219175F-E561-47E7-AD17-73C4D8891AA1),

version(1.0),

helpstring("Events interface for OmniRigX Object")

]

dispinterface IOmniRigXEvents

{

properties:

methods:

[id(0x00000001)]

HRESULT VisibleChange( void );

[id(0x00000002)]

HRESULT RigTypeChange([in] long RigNumber );

[id(0x00000003)]

HRESULT StatusChange([in] long RigNumber );

[id(0x00000004)]

HRESULT ParamsChange([in] long RigNumber, [in] long Params );

[id(0x00000005)]

HRESULT CustomReply([in] long RigNumber, [in] VARIANT Command, [in] VARIANT Reply );

};

[

uuid(0839E8C6-ED30-4950-8087-966F970F0CAE),

version(1.0),

helpstring("OmniRigX Object")

]

coclass OmniRigX

{

[default] interface IOmniRigX;

[default, source] dispinterface IOmniRigXEvents;

};

[

uuid(D30A7E51-5862-45B7-BFFA-6415917DA0CF),

version(1.0),

helpstring("Dispatch interface for Rig Object"),

dual,

oleautomation

]

interface IRigX: IDispatch

{

[propget, id(0x00000001)]

HRESULT _stdcall RigType([out, retval] BSTR * Value );

[propget, id(0x00000002)]

HRESULT _stdcall ReadableParams([out, retval] long * Value );

[propget, id(0x00000003)]

HRESULT _stdcall WriteableParams([out, retval] long * Value );

[id(0x00000004)]

HRESULT _stdcall IsParamReadable([in] RigParamX Param, [out, retval] VARIANT_BOOL * Value );

[id(0x00000005)]

HRESULT _stdcall IsParamWriteable([in] RigParamX Param, [out, retval] VARIANT_BOOL * Value );

[propget, id(0x00000006)]

HRESULT _stdcall Status([out, retval] RigStatusX * Value );

[propget, id(0x00000007)]

HRESULT _stdcall StatusStr([out, retval] BSTR * Value );

[propget, id(0x00000008)]

HRESULT _stdcall Freq([out, retval] long * Value );

[propput, id(0x00000008)]

HRESULT _stdcall Freq([in] long Value );

[propget, id(0x00000009)]

HRESULT _stdcall FreqA([out, retval] long * Value );

[propput, id(0x00000009)]

HRESULT _stdcall FreqA([in] long Value );

[propget, id(0x0000000A)]

HRESULT _stdcall FreqB([out, retval] long * Value );

[propput, id(0x0000000A)]

HRESULT _stdcall FreqB([in] long Value );

[propget, id(0x0000000B)]

HRESULT _stdcall RitOffset([out, retval] long * Value );

[propput, id(0x0000000B)]

HRESULT _stdcall RitOffset([in] long Value );

[propget, id(0x0000000C)]

HRESULT _stdcall Pitch([out, retval] long * Value );

[propput, id(0x0000000C)]

HRESULT _stdcall Pitch([in] long Value );

[propget, id(0x0000000D)]

HRESULT _stdcall Vfo([out, retval] RigParamX * Value );

[propput, id(0x0000000D)]

HRESULT _stdcall Vfo([in] RigParamX Value );

[propget, id(0x0000000E)]

HRESULT _stdcall Split([out, retval] RigParamX * Value );

[propput, id(0x0000000E)]

HRESULT _stdcall Split([in] RigParamX Value );

[propget, id(0x0000000F)]

HRESULT _stdcall Rit([out, retval] RigParamX * Value );

[propput, id(0x0000000F)]

HRESULT _stdcall Rit([in] RigParamX Value );

[propget, id(0x00000010)]

HRESULT _stdcall Xit([out, retval] RigParamX * Value );

[propput, id(0x00000010)]

HRESULT _stdcall Xit([in] RigParamX Value );

[propget, id(0x00000011)]

HRESULT _stdcall Tx([out, retval] RigParamX * Value );

[propput, id(0x00000011)]

HRESULT _stdcall Tx([in] RigParamX Value );

[propget, id(0x00000012)]

HRESULT _stdcall Mode([out, retval] RigParamX * Value );

[propput, id(0x00000012)]

HRESULT _stdcall Mode([in] RigParamX Value );

[id(0x00000013)]

HRESULT _stdcall ClearRit( void );

[id(0x00000014)]

HRESULT _stdcall SetSimplexMode([in] long Freq );

[id(0x00000015)]

HRESULT _stdcall SetSplitMode([in] long RxFreq, [in] long TxFreq );

[id(0x00000016)]

HRESULT _stdcall FrequencyOfTone([in] long Tone, [out, retval] long * Value );

[id(0x00000017)]

HRESULT _stdcall SendCustomCommand([in] VARIANT Command, [in] long ReplyLength, [in] VARIANT ReplyEnd );

[id(0x00000018)]

HRESULT _stdcall GetRxFrequency([out, retval] long * Value );

[id(0x00000019)]

HRESULT _stdcall GetTxFrequency([out, retval] long * Value );

[propget, id(0x0000001A)]

HRESULT _stdcall PortBits([out, retval] IPortBits ** Value );

};

[

uuid(78AECFA2-3F52-4E39-98D3-1646C00A6234),

version(1.0),

helpstring("Rig Object")

]

coclass RigX

{

[default] interface IRigX;

};

[

uuid(80E6D479-0553-44E9-AA50-1878A12719FB),

version(1.0)

]

typedef enum tagRigParamX

{

PM_UNKNOWN = 1,

PM_FREQ = 2,

PM_FREQA = 4,

PM_FREQB = 8,

PM_PITCH = 16,

PM_RITOFFSET = 32,

PM_RIT0 = 64,

PM_VFOAA = 128,

PM_VFOAB = 256,

PM_VFOBA = 512,

PM_VFOBB = 1024,

PM_VFOA = 2048,

PM_VFOB = 4096,

PM_VFOEQUAL = 8192,

PM_VFOSWAP = 16384,

PM_SPLITON = 32768,

PM_SPLITOFF = 65536,

PM_RITON = 131072,

PM_RITOFF = 262144,

PM_XITON = 524288,

PM_XITOFF = 1048576,

PM_RX = 2097152,

PM_TX = 4194304,

PM_CW_U = 8388608,

PM_CW_L = 16777216,

PM_SSB_U = 33554432,

PM_SSB_L = 67108864,

PM_DIG_U = 134217728,

PM_DIG_L = 268435456,

PM_AM = 536870912,

PM_FM = 1073741824

} RigParamX;

[

uuid(47EE3D83-5CC0-4C3E-94FB-28FF8DC79C48),

version(1.0)

]

typedef enum tagRigStatusX

{

ST_NOTCONFIGURED = 0,

ST_DISABLED = 1,

ST_PORTBUSY = 2,

ST_NOTRESPONDING = 3,

ST_ONLINE = 4

} RigStatusX;

[

uuid(3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A),

version(1.0),

dual,

oleautomation

]

interface IPortBits: IDispatch

{

[id(0x00000001)]

HRESULT _stdcall Lock([out, retval] VARIANT_BOOL * Ok );

[propget, id(0x00000002)]

HRESULT _stdcall Rts([out, retval] VARIANT_BOOL * Value );

[propput, id(0x00000002)]

HRESULT _stdcall Rts([in] VARIANT_BOOL Value );

[propget, id(0x00000003)]

HRESULT _stdcall Dtr([out, retval] VARIANT_BOOL * Value );

[propput, id(0x00000003)]

HRESULT _stdcall Dtr([in] VARIANT_BOOL Value );

[propget, id(0x00000004)]

HRESULT _stdcall Cts([out, retval] VARIANT_BOOL * Value );

[propget, id(0x00000005)]

HRESULT _stdcall Dsr([out, retval] VARIANT_BOOL * Value );

[id(0x00000006)]

HRESULT _stdcall Unlock( void );

};

[

uuid(B786DE29-3B3D-4C66-B7C4-547F9A77A21D),

version(1.0),

helpstring("PortBits Object")

]

coclass PortBits

{

[default] interface IPortBits;

};

};

Link to comment
Share on other sites

i foud a program to read com

does this help

Documentation for OmniRig

from

beau

Description:

automatically generated documentation for OmniRig.

generation date: 2006-08-15:08:21:55

last modified at: 2006-8-15:8:21:57table of contents:

1 Class Diagram

1.1 CoClasses and Interfaces

1.2 DispInterfaces

1.3 Modules

1.4 Basic Data Types

1.4.1 Enumerations

1.4.2 Built In Data Types (builtins)

1.4.3 Type Definitions (Type Defs)

2 Statistic

2.1 Data Types

2.2 Features

2.3 Other Statistics

Class Diagram

In this part, you can see the documentation created from sources out of the class diagram. In this manner, we will not write down all the pieces of information, the class diagram contains. In the first chapter, you can only see coclasses, interfaces, which are filled. In this way, you can see the basic data types, which will be used in these classes. Dependencies of DispInterfaces will not be supported in the version. Therefore Dispinterfaces are listed up in the next chapter. The next chapter will include all basic data types like enums, builtin types and type definitions.

CoClasses and Interfaces

In this chapter, you can find attributes and methods of coclasses and interfaces, it depends on.

CoClass StdFont

StdFont implements interface IFont, which is shown in the table below.

Attributes of IFont:

Scope DataType Name

public BSTR* Name

public BSTR Name

public CURRENCY* Size

public CURRENCY Size

public VARIANT_BOOL* Bold

public VARIANT_BOOL Bold

public VARIANT_BOOL* Italic

public VARIANT_BOOL Italic

public VARIANT_BOOL* Underline

public VARIANT_BOOL Underline

public VARIANT_BOOL* Strikethrough

public VARIANT_BOOL Strikethrough

public short* Weight

public short Weight

public short* Charset

public short Charset

public OLE_HANDLE* hFont

Operations of IFont:

Scope Return Value Name Parameters

public HRESULT Clone IFont** ppfont

public HRESULT IsEqual IFont* pfontOther

public HRESULT SetRatio long cyLogical, long cyHimetric

public HRESULT AddRefHfont OLE_HANDLE hFont

public HRESULT ReleaseHfont OLE_HANDLE hFont

CoClass StdPicture

StdPicture implements interface IPicture, which is shown in the table below.

Attributes of IPicture:

Scope DataType Name

public OLE_HANDLE* Handle

public OLE_HANDLE* hPal

public short* Type

public OLE_XSIZE_HIMETRIC* Width

public OLE_YSIZE_HIMETRIC* Height

public OLE_HANDLE hPal

public int* CurDC

public VARIANT_BOOL* KeepOriginalFormat

public VARIANT_BOOL KeepOriginalFormat

public long* Attributes

Operations of IPicture:

Scope Return Value Name Parameters

public HRESULT Render int hdc, long x, long y, long cx, long cy, OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc, OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc, void* prcWBounds

public HRESULT SelectPicture int hdcIn, int* phdcOut, OLE_HANDLE* phbmpOut

public HRESULT PictureChanged

public HRESULT SaveAsFile void* pstm, VARIANT_BOOL fSaveMemCopy, long* pcbSize

public HRESULT SetHdc OLE_HANDLE hdc

CoClass OmniRigX

OmniRigX implements interface IOmniRigX, which is shown in the table below.

Attributes of IOmniRigX:

Scope DataType Name

public long* InterfaceVersion

public long* SoftwareVersion

public IRigX** Rig1

public IRigX** Rig2

public VARIANT_BOOL* DialogVisible

public VARIANT_BOOL DialogVisible

The interface IOmniRigX has no operations.

CoClass RigX

RigX implements interface IRigX, which is shown in the table below.

Attributes of IRigX:

Scope DataType Name

public BSTR* RigType

public long* ReadableParams

public long* WriteableParams

public RigStatusX* Status

public BSTR* StatusStr

public long* Freq

public long Freq

public long* FreqA

public long FreqA

public long* FreqB

public long FreqB

public long* RitOffset

public long RitOffset

public long* Pitch

public long Pitch

public RigParamX* Vfo

public RigParamX Vfo

public RigParamX* Split

public RigParamX Split

public RigParamX* Rit

public RigParamX Rit

public RigParamX* Xit

public RigParamX Xit

public RigParamX* Tx

public RigParamX Tx

public RigParamX* Mode

public RigParamX Mode

public IPortBits** PortBits

Operations of IRigX:

Scope Return Value Name Parameters

public VARIANT_BOOL* IsParamReadable RigParamX Param

public VARIANT_BOOL* IsParamWriteable RigParamX Param

public HRESULT ClearRit

public HRESULT SetSimplexMode long Freq

public HRESULT SetSplitMode long RxFreq, long TxFreq

public long* FrequencyOfTone long Tone

public HRESULT SendCustomCommand VARIANT Command, long ReplyLength, VARIANT ReplyEnd

public long* GetRxFrequency

public long* GetTxFrequency

CoClass PortBits

PortBits implements interface IPortBits, which is shown in the table below.

Attributes of IPortBits:

Scope DataType Name

public VARIANT_BOOL* Rts

public VARIANT_BOOL Rts

public VARIANT_BOOL* Dtr

public VARIANT_BOOL Dtr

public VARIANT_BOOL* Cts

public VARIANT_BOOL* Dsr

Operations of IPortBits:

Scope Return Value Name Parameters

public VARIANT_BOOL* Lock

public HRESULT Unlock

DispInterfaces

The following tables show attributes and operations of dispinterfaces.

DispInterface Font

The dispinterface Font has no attributes.

The dispinterface Font has no operations.

DispInterface FontEvents

The dispinterface FontEvents has no attributes.

Operations of FontEvents:

Scope Return Value Name Parameters

public void FontChanged BSTR PropertyName

DispInterface Picture

The dispinterface Picture has no attributes.

Operations of Picture:

Scope Return Value Name Parameters

public void Render int hdc, long x, long y, long cx, long cy, OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc, OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc, void* prcWBounds

DispInterface IOmniRigXEvents

The dispinterface IOmniRigXEvents has no attributes.

Operations of IOmniRigXEvents:

Scope Return Value Name Parameters

public HRESULT VisibleChange

public HRESULT RigTypeChange long RigNumber

public HRESULT StatusChange long RigNumber

public HRESULT ParamsChange long RigNumber, long Params

public HRESULT CustomReply long RigNumber, VARIANT Command, VARIANT Reply

Modules

The following tables show attributes and operations of modules.

Module StdFunctions

The module StdFunctions has no attributes.

Operations of StdFunctions:

Scope Return Value Name Parameters

public IPictureDisp** LoadPicture VARIANT filename, int widthDesired, int heightDesired, LoadPictureConstants flags

public HRESULT SavePicture IPictureDisp* Picture, BSTR filename

Basic Data Types

In this chapter, you can find enumerations and type definitions, separated in built in data types and type definitions.

Enumerations

The following chapter lists enumerations and their values.

Attributes of enumeration OLE_TRISTATE:

Scope Name Value

public Unchecked 0

public Checked 1

public Gray 2

Attributes of enumeration LoadPictureConstants:

Scope Name Value

public Default 0

public Monochrome 1

public VgaColor 2

public Color 4

Attributes of enumeration RigParamX:

Scope Name Value

public PM_UNKNOWN 1

public PM_FREQ 2

public PM_FREQA 4

public PM_FREQB 8

public PM_PITCH 16

public PM_RITOFFSET 32

public PM_RIT0 64

public PM_VFOAA 128

public PM_VFOAB 256

public PM_VFOBA 512

public PM_VFOBB 1024

public PM_VFOA 2048

public PM_VFOB 4096

public PM_VFOEQUAL 8192

public PM_VFOSWAP 16384

public PM_SPLITON 32768

public PM_SPLITOFF 65536

public PM_RITON 131072

public PM_RITOFF 262144

public PM_XITON 524288

public PM_XITOFF 1048576

public PM_RX 2097152

public PM_TX 4194304

public PM_CW_U 8388608

public PM_CW_L 16777216

public PM_SSB_U 33554432

public PM_SSB_L 67108864

public PM_DIG_U 134217728

public PM_DIG_L 268435456

public PM_AM 536870912

public PM_FM 1073741824

Attributes of enumeration RigStatusX:

Scope Name Value

public ST_NOTCONFIGURED 0

public ST_DISABLED 1

public ST_PORTBUSY 2

public ST_NOTRESPONDING 3

public ST_ONLINE 4

Built In Data Types (builtins)

Here, you can only see a list of all COM built in data types.

No. Name

0 BOOLEAN

1 BYTE

2 CHAR

3 DOUBLE

4 FLOAT

5 HYPER

6 INT

7 INT64

8 LONG

9 SHORT

10 SMALL

11 VOID

12 WIDECHAR

13 BSTR

14 SAVEARRAY

15 VARIANT

16 VARIANTBOOL

Type Definitions (Type Defs)

This chapter shows only a list of all user defindes type definitions. In case that they are user defined, they can't be defined by COM itself as built ins.

Mo. Name

0 RigParamX

1 RigStatusX

2 RigStatusX*

3 RigParamX*

4 IPortBits**

5 IPortBits*

6 IPortBits

7 IRigX**

8 IRigX*

9 IRigX

10 GUID

11 unsigned long

12 unsigned short

13 unsigned char[8]

14 unsigned char

15 DISPPARAMS

16 VARIANT*

17 long*

18 long

19 unsigned int

20 EXCEPINFO

21 void*

22 void

23 SCODE

24 HRESULT

25 GUID*

26 void**

27 unsigned int*

28 char**

29 char*

30 char

31 DISPPARAMS*

32 EXCEPINFO*

33 unsigned long*

34 IEnumVARIANT**

35 IEnumVARIANT*

36 IEnumVARIANT

37 float

38 int

39 VARIANT_BOOL

40 OLE_TRISTATE

41 CURRENCY

42 BSTR*

43 CURRENCY*

44 VARIANT_BOOL*

45 short*

46 short

47 OLE_HANDLE*

48 IFont**

49 IFont*

50 IFont

51 Font

52 OLE_XSIZE_HIMETRIC*

53 OLE_YSIZE_HIMETRIC*

54 int*

55 Picture

56 LoadPictureConstants

57 IPictureDisp**

58 IPictureDisp*

59 FontEvents

60 OLE_HANDLE

61 OLE_XPOS_HIMETRIC

62 OLE_YPOS_HIMETRIC

63 OLE_XSIZE_HIMETRIC

64 OLE_YSIZE_HIMETRIC

Statistic

Data Types

In this chapter you will find statistical information about data types and the use of them

Overview

The following table shows the frequency of occurance for the data type classes.

data type class No. of instances

UNION 0

ARRAY 1

STRUCT 3

ALIAS 26

ENUM 4

POINTER 31

BUILTIN 38

Built In Data Types

The following table shows the frequence of occurance for built in data types.

built in data type No. of instances

SAFEARRAY 0

BOOLEAN 1

BYTE 1

CHAR 1

DOUBLE 1

FLOAT 1

HYPER 1

INT 1

INT64 1

LONG 1

SHORT 1

SMALL 1

VOID 1

WIDECHAR 1

BSTR 1

SAVEARRAY 1

VARIANT 1

VARIANTBOOL 1

Features

The selected models define 167 Features. The following table lists the available feature types and the frequency of occurance for them.

feature type No. of instances

appobject 0

async_uudi 0

call_as 0

custom 0

first_is 0

helpfile 0

ignore 0

iid_is 0

last_is 0

lcid 0

length_is 0

max_is 0

nonextensible 0

object 0

pointer_default 0

propputref 0

ptr 0

range 0

ref 0

size_is 0

string 0

switch_is 0

switch_type 0

transmit_as 0

unique 0

v1_enum 0

vararg 0

wire_marshal 0

cancreate 0

licensed 0

predeclid 0

control 0

requestedit 0

displaybind 0

defaultbind 0

immideatebind 0

noncreateable 0

locale 0

odl 1

hidden 1

restricted 1

in 1

out 1

public 1

propget 1

retval 1

propput 1

default 1

source 1

readonly 1

dllname 1

optional 1

defaultvalue 3

entry 2

helpcontext 3

dual 1

oleautomation 1

id 71

uuid 47

version 11

helpstring 14

Other Statistics

Classes

The selected models define a total of 4 Enumerations, 31 Pointers, 1 Arrays, 3 Structures, and 167 Features.

Associations

There are a total of 17 fields in structs (approx. 5.67 fields per struct).

Modules define 1 libraries, 8 interfaces, 60 datatypes, 5 CoClasses, 4 DispInterfaces, and 0 Aliases,

0 constants are defined by modules. These modules define 2 operations.

0 constants are defines by interfaces. The interfaces also define 99 operations.

0 variables and 7 operations are defined by DispInterfaces.

Link to comment
Share on other sites

hi big daddy i wet to set freqa an read an set mode

i wet to set freqato 14230.00

i can not reat the mod im ton shure wat rig x is i may be another ole

unit OmniRig_TLB;

// ************************************************************************ //

// WARNING

// -------

// The types declared in this file were generated from data read from a

// Type Library. If this type library is explicitly or indirectly (via

// another type library referring to this type library) re-imported, or the

// 'Refresh' command of the Type Library Editor activated while editing the

// Type Library, the contents of this file will be regenerated and all

// manual modifications will be lost.

// ************************************************************************ //

// PASTLWTR : $Revision: 1.88.1.0.1.0 $

// File generated on 2003-10-16 AM 11:38:49 from Type Library described below.

// *************************************************************************//

// NOTE:

// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties

// which return objects that may need to be explicitly created via a function

// call prior to any access via the property. These items have been disabled

// in order to prevent accidental use from within the object inspector. You

// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively

// removing them from the $IFDEF blocks. However, such items must still be

// programmatically created via a method of the appropriate CoClass before

// they can be used.

// ************************************************************************ //

// Type Lib: D:\OmniRig\OmniRig.exe (1)

// IID\LCID: {4FE359C5-A58F-459D-BE95-CA559FB4F270}\0

// Helpfile:

// DepndLst:

// (1) v2.0 stdole, (C:\WINNT\System32\Stdole2.tlb)

// (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)

// ************************************************************************ //

{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.

interface

uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;

// *********************************************************************//

// GUIDS declared in the TypeLibrary. Following prefixes are used:

// Type Libraries : LIBID_xxxx

// CoClasses : CLASS_xxxx

// DISPInterfaces : DIID_xxxx

// Non-DISP interfaces: IID_xxxx

// *********************************************************************//

const

// TypeLibrary Major and minor versions

OmniRigMajorVersion = 1;

OmniRigMinorVersion = 0;

LIBID_OmniRig: TGUID = '{4FE359C5-A58F-459D-BE95-CA559FB4F270}';

IID_IOmniRigX: TGUID = '{501A2858-3331-467A-837A-989FDEDACC7D}';

DIID_IOmniRigXEvents: TGUID = '{2219175F-E561-47E7-AD17-73C4D8891AA1}';

CLASS_OmniRigX: TGUID = '{0839E8C6-ED30-4950-8087-966F970F0CAE}';

IID_IRigX: TGUID = '{D30A7E51-5862-45B7-BFFA-6415917DA0CF}';

CLASS_RigX: TGUID = '{78AECFA2-3F52-4E39-98D3-1646C00A6234}';

// *********************************************************************//

// Declaration of Enumerations defined in Type Library

// *********************************************************************//

// Constants for enum RigParamX

type

RigParamX = TOleEnum;

const

PM_UNKNOWN = $00000001;

PM_FREQ = $00000002;

PM_FREQA = $00000004;

PM_FREQB = $00000008;

PM_PITCH = $00000010;

PM_RITOFFSET = $00000020;

PM_RIT0 = $00000040;

PM_VFOAA = $00000080;

PM_VFOAB = $00000100;

PM_VFOBA = $00000200;

PM_VFOBB = $00000400;

PM_VFOA = $00000800;

PM_VFOB = $00001000;

PM_VFOEQUAL = $00002000;

PM_VFOSWAP = $00004000;

PM_SPLITON = $00008000;

PM_SPLITOFF = $00010000;

PM_RITON = $00020000;

PM_RITOFF = $00040000;

PM_XITON = $00080000;

PM_XITOFF = $00100000;

PM_RX = $00200000;

PM_TX = $00400000;

PM_CW_U = $00800000;

PM_CW_L = $01000000;

PM_SSB_U = $02000000;

PM_SSB_L = $04000000;

PM_DIG_U = $08000000;

PM_DIG_L = $10000000;

PM_AM = $20000000;

PM_FM = $40000000;

// Constants for enum RigStatusX

type

RigStatusX = TOleEnum;

const

ST_NOTCONFIGURED = $00000000;

ST_DISABLED = $00000001;

ST_PORTBUSY = $00000002;

ST_NOTRESPONDING = $00000003;

ST_ONLINE = $00000004;

type

// *********************************************************************//

// Forward declaration of types defined in TypeLibrary

// *********************************************************************//

IOmniRigX = interface;

IOmniRigXDisp = dispinterface;

IOmniRigXEvents = dispinterface;

IRigX = interface;

IRigXDisp = dispinterface;

// *********************************************************************//

// Declaration of CoClasses defined in Type Library

// (NOTE: Here we map each CoClass to its Default Interface)

// *********************************************************************//

OmniRigX = IOmniRigX;

RigX = IRigX;

// *********************************************************************//

// Interface: IOmniRigX

// Flags: (4416) Dual OleAutomation Dispatchable

// GUID: {501A2858-3331-467A-837A-989FDEDACC7D}

// *********************************************************************//

IOmniRigX = interface(IDispatch)

['{501A2858-3331-467A-837A-989FDEDACC7D}']

function Get_InterfaceVersion: Integer; safecall;

function Get_SoftwareVersion: Integer; safecall;

function Get_Rig1: IRigX; safecall;

function Get_Rig2: IRigX; safecall;

function Get_DialogVisible: WordBool; safecall;

procedure Set_DialogVisible(Value: WordBool); safecall;

property InterfaceVersion: Integer read Get_InterfaceVersion;

property SoftwareVersion: Integer read Get_SoftwareVersion;

property Rig1: IRigX read Get_Rig1;

property Rig2: IRigX read Get_Rig2;

property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible;

end;

// *********************************************************************//

// DispIntf: IOmniRigXDisp

// Flags: (4416) Dual OleAutomation Dispatchable

// GUID: {501A2858-3331-467A-837A-989FDEDACC7D}

// *********************************************************************//

IOmniRigXDisp = dispinterface

['{501A2858-3331-467A-837A-989FDEDACC7D}']

property InterfaceVersion: Integer readonly dispid 1;

property SoftwareVersion: Integer readonly dispid 2;

property Rig1: IRigX readonly dispid 3;

property Rig2: IRigX readonly dispid 4;

property DialogVisible: WordBool dispid 5;

end;

// *********************************************************************//

// DispIntf: IOmniRigXEvents

// Flags: (4096) Dispatchable

// GUID: {2219175F-E561-47E7-AD17-73C4D8891AA1}

// *********************************************************************//

IOmniRigXEvents = dispinterface

['{2219175F-E561-47E7-AD17-73C4D8891AA1}']

procedure VisibleChange; dispid 1;

procedure RigTypeChange(RigNumber: Integer); dispid 2;

procedure StatusChange(RigNumber: Integer); dispid 3;

procedure ParamsChange(RigNumber: Integer; Params: Integer); dispid 4;

procedure CustomReply(RigNumber: Integer; Command: OleVariant; Reply: OleVariant); dispid 5;

end;

// *********************************************************************//

// Interface: IRigX

// Flags: (4416) Dual OleAutomation Dispatchable

// GUID: {D30A7E51-5862-45B7-BFFA-6415917DA0CF}

// *********************************************************************//

IRigX = interface(IDispatch)

['{D30A7E51-5862-45B7-BFFA-6415917DA0CF}']

function Get_RigType: WideString; safecall;

function Get_ReadableParams: Integer; safecall;

function Get_WriteableParams: Integer; safecall;

function IsParamReadable(Param: RigParamX): WordBool; safecall;

function IsParamWriteable(Param: RigParamX): WordBool; safecall;

function Get_Status: RigStatusX; safecall;

function Get_StatusStr: WideString; safecall;

function Get_Freq: Integer; safecall;

procedure Set_Freq(Value: Integer); safecall;

function Get_FreqA: Integer; safecall;

procedure Set_FreqA(Value: Integer); safecall;

function Get_FreqB: Integer; safecall;

procedure Set_FreqB(Value: Integer); safecall;

function Get_RitOffset: Integer; safecall;

procedure Set_RitOffset(Value: Integer); safecall;

function Get_Pitch: Integer; safecall;

procedure Set_Pitch(Value: Integer); safecall;

function Get_Vfo: RigParamX; safecall;

procedure Set_Vfo(Value: RigParamX); safecall;

function Get_Split: RigParamX; safecall;

procedure Set_Split(Value: RigParamX); safecall;

function Get_Rit: RigParamX; safecall;

procedure Set_Rit(Value: RigParamX); safecall;

function Get_Xit: RigParamX; safecall;

procedure Set_Xit(Value: RigParamX); safecall;

function Get_Tx: RigParamX; safecall;

procedure Set_Tx(Value: RigParamX); safecall;

function Get_Mode: RigParamX; safecall;

procedure Set_Mode(Value: RigParamX); safecall;

procedure ClearRit; safecall;

procedure SetSimplexMode(Freq: Integer); safecall;

procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer); safecall;

function FrequencyOfTone(Tone: Integer): Integer; safecall;

procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); safecall;

function GetRxFrequency: Integer; safecall;

function GetTxFrequency: Integer; safecall;

property RigType: WideString read Get_RigType;

property ReadableParams: Integer read Get_ReadableParams;

property WriteableParams: Integer read Get_WriteableParams;

property Status: RigStatusX read Get_Status;

property StatusStr: WideString read Get_StatusStr;

property Freq: Integer read Get_Freq write Set_Freq;

property FreqA: Integer read Get_FreqA write Set_FreqA;

property FreqB: Integer read Get_FreqB write Set_FreqB;

property RitOffset: Integer read Get_RitOffset write Set_RitOffset;

property Pitch: Integer read Get_Pitch write Set_Pitch;

property Vfo: RigParamX read Get_Vfo write Set_Vfo;

property Split: RigParamX read Get_Split write Set_Split;

property Rit: RigParamX read Get_Rit write Set_Rit;

property Xit: RigParamX read Get_Xit write Set_Xit;

property Tx: RigParamX read Get_Tx write Set_Tx;

property Mode: RigParamX read Get_Mode write Set_Mode;

end;

// *********************************************************************//

// DispIntf: IRigXDisp

// Flags: (4416) Dual OleAutomation Dispatchable

// GUID: {D30A7E51-5862-45B7-BFFA-6415917DA0CF}

// *********************************************************************//

IRigXDisp = dispinterface

['{D30A7E51-5862-45B7-BFFA-6415917DA0CF}']

property RigType: WideString readonly dispid 1;

property ReadableParams: Integer readonly dispid 2;

property WriteableParams: Integer readonly dispid 3;

function IsParamReadable(Param: RigParamX): WordBool; dispid 4;

function IsParamWriteable(Param: RigParamX): WordBool; dispid 5;

property Status: RigStatusX readonly dispid 6;

property StatusStr: WideString readonly dispid 7;

property Freq: Integer dispid 8;

property FreqA: Integer dispid 9;

property FreqB: Integer dispid 10;

property RitOffset: Integer dispid 11;

property Pitch: Integer dispid 12;

property Vfo: RigParamX dispid 13;

property Split: RigParamX dispid 14;

property Rit: RigParamX dispid 15;

property Xit: RigParamX dispid 16;

property Tx: RigParamX dispid 17;

property Mode: RigParamX dispid 18;

procedure ClearRit; dispid 19;

procedure SetSimplexMode(Freq: Integer); dispid 20;

procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer); dispid 21;

function FrequencyOfTone(Tone: Integer): Integer; dispid 22;

procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); dispid 23;

function GetRxFrequency: Integer; dispid 24;

function GetTxFrequency: Integer; dispid 25;

end;

// *********************************************************************//

// The Class CoOmniRigX provides a Create and CreateRemote method to

// create instances of the default interface IOmniRigX exposed by

// the CoClass OmniRigX. The functions are intended to be used by

// clients wishing to automate the CoClass objects exposed by the

// server of this typelibrary.

// *********************************************************************//

CoOmniRigX = class

class function Create: IOmniRigX;

class function CreateRemote(const MachineName: string): IOmniRigX;

end;

TOmniRigXRigTypeChange = procedure(Sender: TObject; RigNumber: Integer) of object;

TOmniRigXStatusChange = procedure(Sender: TObject; RigNumber: Integer) of object;

TOmniRigXParamsChange = procedure(Sender: TObject; RigNumber: Integer; Params: Integer) of object;

TOmniRigXCustomReply = procedure(Sender: TObject; RigNumber: Integer; Command: OleVariant;

Reply: OleVariant) of object;

// *********************************************************************//

// OLE Server Proxy class declaration

// Server Object : TOmniRigX

// Help String : OmniRigX Object

// Default Interface: IOmniRigX

// Def. Intf. DISP? : No

// Event Interface: IOmniRigXEvents

// TypeFlags : (2) CanCreate

// *********************************************************************//

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

TOmniRigXProperties= class;

{$ENDIF}

TOmniRigX = class(TOleServer)

private

FOnVisibleChange: TNotifyEvent;

FOnRigTypeChange: TOmniRigXRigTypeChange;

FOnStatusChange: TOmniRigXStatusChange;

FOnParamsChange: TOmniRigXParamsChange;

FOnCustomReply: TOmniRigXCustomReply;

FIntf: IOmniRigX;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps: TOmniRigXProperties;

function GetServerProperties: TOmniRigXProperties;

{$ENDIF}

function GetDefaultInterface: IOmniRigX;

protected

procedure InitServerData; override;

procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;

function Get_InterfaceVersion: Integer;

function Get_SoftwareVersion: Integer;

function Get_Rig1: IRigX;

function Get_Rig2: IRigX;

function Get_DialogVisible: WordBool;

procedure Set_DialogVisible(Value: WordBool);

public

constructor Create(AOwner: TComponent); override;

destructor Destroy; override;

procedure Connect; override;

procedure ConnectTo(svrIntf: IOmniRigX);

procedure Disconnect; override;

property DefaultInterface: IOmniRigX read GetDefaultInterface;

property InterfaceVersion: Integer read Get_InterfaceVersion;

property SoftwareVersion: Integer read Get_SoftwareVersion;

property Rig1: IRigX read Get_Rig1;

property Rig2: IRigX read Get_Rig2;

property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible;

published

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

property Server: TOmniRigXProperties read GetServerProperties;

{$ENDIF}

property OnVisibleChange: TNotifyEvent read FOnVisibleChange write FOnVisibleChange;

property OnRigTypeChange: TOmniRigXRigTypeChange read FOnRigTypeChange write FOnRigTypeChange;

property OnStatusChange: TOmniRigXStatusChange read FOnStatusChange write FOnStatusChange;

property OnParamsChange: TOmniRigXParamsChange read FOnParamsChange write FOnParamsChange;

property OnCustomReply: TOmniRigXCustomReply read FOnCustomReply write FOnCustomReply;

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

// *********************************************************************//

// OLE Server Properties Proxy Class

// Server Object : TOmniRigX

// (This object is used by the IDE's Property Inspector to allow editing

// of the properties of this server)

// *********************************************************************//

TOmniRigXProperties = class(TPersistent)

private

FServer: TOmniRigX;

function GetDefaultInterface: IOmniRigX;

constructor Create(AServer: TOmniRigX);

protected

function Get_InterfaceVersion: Integer;

function Get_SoftwareVersion: Integer;

function Get_Rig1: IRigX;

function Get_Rig2: IRigX;

function Get_DialogVisible: WordBool;

procedure Set_DialogVisible(Value: WordBool);

public

property DefaultInterface: IOmniRigX read GetDefaultInterface;

published

property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible;

end;

{$ENDIF}

// *********************************************************************//

// The Class CoRigX provides a Create and CreateRemote method to

// create instances of the default interface IRigX exposed by

// the CoClass RigX. The functions are intended to be used by

// clients wishing to automate the CoClass objects exposed by the

// server of this typelibrary.

// *********************************************************************//

CoRigX = class

class function Create: IRigX;

class function CreateRemote(const MachineName: string): IRigX;

end;

// *********************************************************************//

// OLE Server Proxy class declaration

// Server Object : TRigX

// Help String : Rig Object

// Default Interface: IRigX

// Def. Intf. DISP? : No

// Event Interface:

// TypeFlags : (2) CanCreate

// *********************************************************************//

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

TRigXProperties= class;

{$ENDIF}

TRigX = class(TOleServer)

private

FIntf: IRigX;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps: TRigXProperties;

function GetServerProperties: TRigXProperties;

{$ENDIF}

function GetDefaultInterface: IRigX;

protected

procedure InitServerData; override;

function Get_RigType: WideString;

function Get_ReadableParams: Integer;

function Get_WriteableParams: Integer;

function Get_Status: RigStatusX;

function Get_StatusStr: WideString;

function Get_Freq: Integer;

procedure Set_Freq(Value: Integer);

function Get_FreqA: Integer;

procedure Set_FreqA(Value: Integer);

function Get_FreqB: Integer;

procedure Set_FreqB(Value: Integer);

function Get_RitOffset: Integer;

procedure Set_RitOffset(Value: Integer);

function Get_Pitch: Integer;

procedure Set_Pitch(Value: Integer);

function Get_Vfo: RigParamX;

procedure Set_Vfo(Value: RigParamX);

function Get_Split: RigParamX;

procedure Set_Split(Value: RigParamX);

function Get_Rit: RigParamX;

procedure Set_Rit(Value: RigParamX);

function Get_Xit: RigParamX;

procedure Set_Xit(Value: RigParamX);

function Get_Tx: RigParamX;

procedure Set_Tx(Value: RigParamX);

function Get_Mode: RigParamX;

procedure Set_Mode(Value: RigParamX);

public

constructor Create(AOwner: TComponent); override;

destructor Destroy; override;

procedure Connect; override;

procedure ConnectTo(svrIntf: IRigX);

procedure Disconnect; override;

function IsParamReadable(Param: RigParamX): WordBool;

function IsParamWriteable(Param: RigParamX): WordBool;

procedure ClearRit;

procedure SetSimplexMode(Freq: Integer);

procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer);

function FrequencyOfTone(Tone: Integer): Integer;

procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant);

function GetRxFrequency: Integer;

function GetTxFrequency: Integer;

property DefaultInterface: IRigX read GetDefaultInterface;

property RigType: WideString read Get_RigType;

property ReadableParams: Integer read Get_ReadableParams;

property WriteableParams: Integer read Get_WriteableParams;

property Status: RigStatusX read Get_Status;

property StatusStr: WideString read Get_StatusStr;

property Freq: Integer read Get_Freq write Set_Freq;

property FreqA: Integer read Get_FreqA write Set_FreqA;

property FreqB: Integer read Get_FreqB write Set_FreqB;

property RitOffset: Integer read Get_RitOffset write Set_RitOffset;

property Pitch: Integer read Get_Pitch write Set_Pitch;

property Vfo: RigParamX read Get_Vfo write Set_Vfo;

property Split: RigParamX read Get_Split write Set_Split;

property Rit: RigParamX read Get_Rit write Set_Rit;

property Xit: RigParamX read Get_Xit write Set_Xit;

property Tx: RigParamX read Get_Tx write Set_Tx;

property Mode: RigParamX read Get_Mode write Set_Mode;

published

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

property Server: TRigXProperties read GetServerProperties;

{$ENDIF}

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

// *********************************************************************//

// OLE Server Properties Proxy Class

// Server Object : TRigX

// (This object is used by the IDE's Property Inspector to allow editing

// of the properties of this server)

// *********************************************************************//

TRigXProperties = class(TPersistent)

private

FServer: TRigX;

function GetDefaultInterface: IRigX;

constructor Create(AServer: TRigX);

protected

function Get_RigType: WideString;

function Get_ReadableParams: Integer;

function Get_WriteableParams: Integer;

function Get_Status: RigStatusX;

function Get_StatusStr: WideString;

function Get_Freq: Integer;

procedure Set_Freq(Value: Integer);

function Get_FreqA: Integer;

procedure Set_FreqA(Value: Integer);

function Get_FreqB: Integer;

procedure Set_FreqB(Value: Integer);

function Get_RitOffset: Integer;

procedure Set_RitOffset(Value: Integer);

function Get_Pitch: Integer;

procedure Set_Pitch(Value: Integer);

function Get_Vfo: RigParamX;

procedure Set_Vfo(Value: RigParamX);

function Get_Split: RigParamX;

procedure Set_Split(Value: RigParamX);

function Get_Rit: RigParamX;

procedure Set_Rit(Value: RigParamX);

function Get_Xit: RigParamX;

procedure Set_Xit(Value: RigParamX);

function Get_Tx: RigParamX;

procedure Set_Tx(Value: RigParamX);

function Get_Mode: RigParamX;

procedure Set_Mode(Value: RigParamX);

public

property DefaultInterface: IRigX read GetDefaultInterface;

published

property Freq: Integer read Get_Freq write Set_Freq;

property FreqA: Integer read Get_FreqA write Set_FreqA;

property FreqB: Integer read Get_FreqB write Set_FreqB;

property RitOffset: Integer read Get_RitOffset write Set_RitOffset;

property Pitch: Integer read Get_Pitch write Set_Pitch;

property Vfo: RigParamX read Get_Vfo write Set_Vfo;

property Split: RigParamX read Get_Split write Set_Split;

property Rit: RigParamX read Get_Rit write Set_Rit;

property Xit: RigParamX read Get_Xit write Set_Xit;

property Tx: RigParamX read Get_Tx write Set_Tx;

property Mode: RigParamX read Get_Mode write Set_Mode;

end;

{$ENDIF}

procedure Register;

implementation

uses ComObj;

class function CoOmniRigX.Create: IOmniRigX;

begin

Result := CreateComObject(CLASS_OmniRigX) as IOmniRigX;

end;

class function CoOmniRigX.CreateRemote(const MachineName: string): IOmniRigX;

begin

Result := CreateRemoteComObject(MachineName, CLASS_OmniRigX) as IOmniRigX;

end;

procedure TOmniRigX.InitServerData;

const

CServerData: TServerData = (

ClassID: '{0839E8C6-ED30-4950-8087-966F970F0CAE}';

IntfIID: '{501A2858-3331-467A-837A-989FDEDACC7D}';

EventIID: '{2219175F-E561-47E7-AD17-73C4D8891AA1}';

LicenseKey: nil;

Version: 500);

begin

ServerData := @CServerData;

end;

procedure TOmniRigX.Connect;

var

punk: IUnknown;

begin

if FIntf = nil then

begin

punk := GetServer;

ConnectEvents(punk);

Fintf:= punk as IOmniRigX;

end;

end;

procedure TOmniRigX.ConnectTo(svrIntf: IOmniRigX);

begin

Disconnect;

FIntf := svrIntf;

ConnectEvents(FIntf);

end;

procedure TOmniRigX.DisConnect;

begin

if Fintf <> nil then

begin

DisconnectEvents(FIntf);

FIntf := nil;

end;

end;

function TOmniRigX.GetDefaultInterface: IOmniRigX;

begin

if FIntf = nil then

Connect;

Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');

Result := FIntf;

end;

constructor TOmniRigX.Create(AOwner: TComponent);

begin

inherited Create(AOwner);

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps := TOmniRigXProperties.Create(Self);

{$ENDIF}

end;

destructor TOmniRigX.Destroy;

begin

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps.Free;

{$ENDIF}

inherited Destroy;

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

function TOmniRigX.GetServerProperties: TOmniRigXProperties;

begin

Result := FProps;

end;

{$ENDIF}

procedure TOmniRigX.InvokeEvent(DispID: TDispID; var Params: TVariantArray);

begin

case DispID of

-1: Exit; // DISPID_UNKNOWN

1: if Assigned(FOnVisibleChange) then

FOnVisibleChange(Self);

2: if Assigned(FOnRigTypeChange) then

FOnRigTypeChange(Self, Params[0] {Integer});

3: if Assigned(FOnStatusChange) then

FOnStatusChange(Self, Params[0] {Integer});

4: if Assigned(FOnParamsChange) then

FOnParamsChange(Self, Params[0] {Integer}, Params[1] {Integer});

5: if Assigned(FOnCustomReply) then

FOnCustomReply(Self, Params[0] {Integer}, Params[1] {OleVariant}, Params[2] {OleVariant});

end; {case DispID}

end;

function TOmniRigX.Get_InterfaceVersion: Integer;

begin

Result := DefaultInterface.Get_InterfaceVersion;

end;

function TOmniRigX.Get_SoftwareVersion: Integer;

begin

Result := DefaultInterface.Get_SoftwareVersion;

end;

function TOmniRigX.Get_Rig1: IRigX;

begin

Result := DefaultInterface.Get_Rig1;

end;

function TOmniRigX.Get_Rig2: IRigX;

begin

Result := DefaultInterface.Get_Rig2;

end;

function TOmniRigX.Get_DialogVisible: WordBool;

begin

Result := DefaultInterface.Get_DialogVisible;

end;

procedure TOmniRigX.Set_DialogVisible(Value: WordBool);

begin

DefaultInterface.Set_DialogVisible(Value);

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

constructor TOmniRigXProperties.Create(AServer: TOmniRigX);

begin

inherited Create;

FServer := AServer;

end;

function TOmniRigXProperties.GetDefaultInterface: IOmniRigX;

begin

Result := FServer.DefaultInterface;

end;

function TOmniRigXProperties.Get_InterfaceVersion: Integer;

begin

Result := DefaultInterface.Get_InterfaceVersion;

end;

function TOmniRigXProperties.Get_SoftwareVersion: Integer;

begin

Result := DefaultInterface.Get_SoftwareVersion;

end;

function TOmniRigXProperties.Get_Rig1: IRigX;

begin

Result := DefaultInterface.Get_Rig1;

end;

function TOmniRigXProperties.Get_Rig2: IRigX;

begin

Result := DefaultInterface.Get_Rig2;

end;

function TOmniRigXProperties.Get_DialogVisible: WordBool;

begin

Result := DefaultInterface.Get_DialogVisible;

end;

procedure TOmniRigXProperties.Set_DialogVisible(Value: WordBool);

begin

DefaultInterface.Set_DialogVisible(Value);

end;

{$ENDIF}

class function CoRigX.Create: IRigX;

begin

Result := CreateComObject(CLASS_RigX) as IRigX;

end;

class function CoRigX.CreateRemote(const MachineName: string): IRigX;

begin

Result := CreateRemoteComObject(MachineName, CLASS_RigX) as IRigX;

end;

procedure TRigX.InitServerData;

const

CServerData: TServerData = (

ClassID: '{78AECFA2-3F52-4E39-98D3-1646C00A6234}';

IntfIID: '{D30A7E51-5862-45B7-BFFA-6415917DA0CF}';

EventIID: '';

LicenseKey: nil;

Version: 500);

begin

ServerData := @CServerData;

end;

procedure TRigX.Connect;

var

punk: IUnknown;

begin

if FIntf = nil then

begin

punk := GetServer;

Fintf:= punk as IRigX;

end;

end;

procedure TRigX.ConnectTo(svrIntf: IRigX);

begin

Disconnect;

FIntf := svrIntf;

end;

procedure TRigX.DisConnect;

begin

if Fintf <> nil then

begin

FIntf := nil;

end;

end;

function TRigX.GetDefaultInterface: IRigX;

begin

if FIntf = nil then

Connect;

Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');

Result := FIntf;

end;

constructor TRigX.Create(AOwner: TComponent);

begin

inherited Create(AOwner);

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps := TRigXProperties.Create(Self);

{$ENDIF}

end;

destructor TRigX.Destroy;

begin

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

FProps.Free;

{$ENDIF}

inherited Destroy;

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

function TRigX.GetServerProperties: TRigXProperties;

begin

Result := FProps;

end;

{$ENDIF}

function TRigX.Get_RigType: WideString;

begin

Result := DefaultInterface.Get_RigType;

end;

function TRigX.Get_ReadableParams: Integer;

begin

Result := DefaultInterface.Get_ReadableParams;

end;

function TRigX.Get_WriteableParams: Integer;

begin

Result := DefaultInterface.Get_WriteableParams;

end;

function TRigX.Get_Status: RigStatusX;

begin

Result := DefaultInterface.Get_Status;

end;

function TRigX.Get_StatusStr: WideString;

begin

Result := DefaultInterface.Get_StatusStr;

end;

function TRigX.Get_Freq: Integer;

begin

Result := DefaultInterface.Get_Freq;

end;

procedure TRigX.Set_Freq(Value: Integer);

begin

DefaultInterface.Set_Freq(Value);

end;

function TRigX.Get_FreqA: Integer;

begin

Result := DefaultInterface.Get_FreqA;

end;

procedure TRigX.Set_FreqA(Value: Integer);

begin

DefaultInterface.Set_FreqA(Value);

end;

function TRigX.Get_FreqB: Integer;

begin

Result := DefaultInterface.Get_FreqB;

end;

procedure TRigX.Set_FreqB(Value: Integer);

begin

DefaultInterface.Set_FreqB(Value);

end;

function TRigX.Get_RitOffset: Integer;

begin

Result := DefaultInterface.Get_RitOffset;

end;

procedure TRigX.Set_RitOffset(Value: Integer);

begin

DefaultInterface.Set_RitOffset(Value);

end;

function TRigX.Get_Pitch: Integer;

begin

Result := DefaultInterface.Get_Pitch;

end;

procedure TRigX.Set_Pitch(Value: Integer);

begin

DefaultInterface.Set_Pitch(Value);

end;

function TRigX.Get_Vfo: RigParamX;

begin

Result := DefaultInterface.Get_Vfo;

end;

procedure TRigX.Set_Vfo(Value: RigParamX);

begin

DefaultInterface.Set_Vfo(Value);

end;

function TRigX.Get_Split: RigParamX;

begin

Result := DefaultInterface.Get_Split;

end;

procedure TRigX.Set_Split(Value: RigParamX);

begin

DefaultInterface.Set_Split(Value);

end;

function TRigX.Get_Rit: RigParamX;

begin

Result := DefaultInterface.Get_Rit;

end;

procedure TRigX.Set_Rit(Value: RigParamX);

begin

DefaultInterface.Set_Rit(Value);

end;

function TRigX.Get_Xit: RigParamX;

begin

Result := DefaultInterface.Get_Xit;

end;

procedure TRigX.Set_Xit(Value: RigParamX);

begin

DefaultInterface.Set_Xit(Value);

end;

function TRigX.Get_Tx: RigParamX;

begin

Result := DefaultInterface.Get_Tx;

end;

procedure TRigX.Set_Tx(Value: RigParamX);

begin

DefaultInterface.Set_Tx(Value);

end;

function TRigX.Get_Mode: RigParamX;

begin

Result := DefaultInterface.Get_Mode;

end;

procedure TRigX.Set_Mode(Value: RigParamX);

begin

DefaultInterface.Set_Mode(Value);

end;

function TRigX.IsParamReadable(Param: RigParamX): WordBool;

begin

Result := DefaultInterface.IsParamReadable(Param);

end;

function TRigX.IsParamWriteable(Param: RigParamX): WordBool;

begin

Result := DefaultInterface.IsParamWriteable(Param);

end;

procedure TRigX.ClearRit;

begin

DefaultInterface.ClearRit;

end;

procedure TRigX.SetSimplexMode(Freq: Integer);

begin

DefaultInterface.SetSimplexMode(Freq);

end;

procedure TRigX.SetSplitMode(RxFreq: Integer; TxFreq: Integer);

begin

DefaultInterface.SetSplitMode(RxFreq, TxFreq);

end;

function TRigX.FrequencyOfTone(Tone: Integer): Integer;

begin

Result := DefaultInterface.FrequencyOfTone(Tone);

end;

procedure TRigX.SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant);

begin

DefaultInterface.SendCustomCommand(Command, ReplyLength, ReplyEnd);

end;

function TRigX.GetRxFrequency: Integer;

begin

Result := DefaultInterface.GetRxFrequency;

end;

function TRigX.GetTxFrequency: Integer;

begin

Result := DefaultInterface.GetTxFrequency;

end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}

constructor TRigXProperties.Create(AServer: TRigX);

begin

inherited Create;

FServer := AServer;

end;

function TRigXProperties.GetDefaultInterface: IRigX;

begin

Result := FServer.DefaultInterface;

end;

function TRigXProperties.Get_RigType: WideString;

begin

Result := DefaultInterface.Get_RigType;

end;

function TRigXProperties.Get_ReadableParams: Integer;

begin

Result := DefaultInterface.Get_ReadableParams;

end;

function TRigXProperties.Get_WriteableParams: Integer;

begin

Result := DefaultInterface.Get_WriteableParams;

end;

function TRigXProperties.Get_Status: RigStatusX;

begin

Result := DefaultInterface.Get_Status;

end;

function TRigXProperties.Get_StatusStr: WideString;

begin

Result := DefaultInterface.Get_StatusStr;

end;

function TRigXProperties.Get_Freq: Integer;

begin

Result := DefaultInterface.Get_Freq;

end;

procedure TRigXProperties.Set_Freq(Value: Integer);

begin

DefaultInterface.Set_Freq(Value);

end;

function TRigXProperties.Get_FreqA: Integer;

begin

Result := DefaultInterface.Get_FreqA;

end;

procedure TRigXProperties.Set_FreqA(Value: Integer);

begin

DefaultInterface.Set_FreqA(Value);

end;

function TRigXProperties.Get_FreqB: Integer;

begin

Result := DefaultInterface.Get_FreqB;

end;

procedure TRigXProperties.Set_FreqB(Value: Integer);

begin

DefaultInterface.Set_FreqB(Value);

end;

function TRigXProperties.Get_RitOffset: Integer;

begin

Result := DefaultInterface.Get_RitOffset;

end;

procedure TRigXProperties.Set_RitOffset(Value: Integer);

begin

DefaultInterface.Set_RitOffset(Value);

end;

function TRigXProperties.Get_Pitch: Integer;

begin

Result := DefaultInterface.Get_Pitch;

end;

procedure TRigXProperties.Set_Pitch(Value: Integer);

begin

DefaultInterface.Set_Pitch(Value);

end;

function TRigXProperties.Get_Vfo: RigParamX;

begin

Result := DefaultInterface.Get_Vfo;

end;

procedure TRigXProperties.Set_Vfo(Value: RigParamX);

begin

DefaultInterface.Set_Vfo(Value);

end;

function TRigXProperties.Get_Split: RigParamX;

begin

Result := DefaultInterface.Get_Split;

end;

procedure TRigXProperties.Set_Split(Value: RigParamX);

begin

DefaultInterface.Set_Split(Value);

end;

function TRigXProperties.Get_Rit: RigParamX;

begin

Result := DefaultInterface.Get_Rit;

end;

procedure TRigXProperties.Set_Rit(Value: RigParamX);

begin

DefaultInterface.Set_Rit(Value);

end;

function TRigXProperties.Get_Xit: RigParamX;

begin

Result := DefaultInterface.Get_Xit;

end;

procedure TRigXProperties.Set_Xit(Value: RigParamX);

begin

DefaultInterface.Set_Xit(Value);

end;

function TRigXProperties.Get_Tx: RigParamX;

begin

Result := DefaultInterface.Get_Tx;

end;

procedure TRigXProperties.Set_Tx(Value: RigParamX);

begin

DefaultInterface.Set_Tx(Value);

end;

function TRigXProperties.Get_Mode: RigParamX;

begin

Result := DefaultInterface.Get_Mode;

end;

procedure TRigXProperties.Set_Mode(Value: RigParamX);

begin

DefaultInterface.Set_Mode(Value);

end;

{$ENDIF}

procedure Register;

begin

RegisterComponents('Snd',[TOmniRigX, TRigX]);

end;

end.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...