| Products | Minisoft News | Events | Downloads | Product Manuals
 
  News

Minisoft News

Demo and Updates


Download an Evaluation today!

Updates and New Features (Jun 4, 2002)

Documentation


MiddleMan Manual

FAQ

  

Product Review


Features

MSJOB

Using INETD_NT

MiddleMan
Application Samples

Know Problem Reports

Type Libraries

MDMDA

MDMFT

MDMFTP

MDMSA

 
   

HPFOpen Method

Method of MDMDA3.Session object. Implements the MPEiX intrinsic HPFOPEN.


boolean HPFOpen ( long Table, long* Status, VARIANT ItemNum, VARIANT Item );

Parameter Type Description
Table long Used to select the table definition as created by AddMpeFileRef.
Status long Returns the status as defined by the HPFOPEN intrinsic.
ItemNum VARIANT Array of integer values. A maximum of 20 values can be used at this time.
Item VARIANT Array of values used by HPFOPEN
  boolean Returns true if no error is detected.

ErrorMessage does not return valid information at this time for HPFOpen.


VB (6) Sample

Private Sub Command1_Click()
Dim a As Long
Dim b As Long
Dim e
Dim c1(4) As Long
Dim d1(4) As Variant
DA.HostCommand "PURGE FILENAME"
a = DA.AddMpeFileRef("FILENAME")
DA.AddItem a, "LINE", "X", 80, 0, 1, False, False, "X", True
c1(0) = 2
d1(0) = "~FILENAME~"
c1(1) = 3
d1(1) = 4
c1(2) = 5
d1(2) = 0
c1(3) = 11
d1(3) = 4
DA.Item(a, "LINE") = "ABC"
If (DA.HPFOpen(a, b, c1, d1)) Then
Text1.Text = Text1.Text + vbNewLine + "HPFOpen OK"
DA.FWrite a, 80
Else
e = (b Mod 65536)
e = (b Mod 256)
MsgBox "Error" + vbNewLine + Hex(b) + vbNewLine + Format(Abs(e)) + vbNewLine + Hex(e) + vbNewLine + DA.ErrorMessage
End If
DA.FClose a, 0

End Sub


Delphi Sample

procedure TForm1.Button3Click(Sender: TObject);
var
a : integer;
b : integer;
c : variant;
d : variant;
da : variant;
begin
da := CreateOleObject ( 'MDMDA3.Session' );
c := VarArrayCreate([0,3], varInteger);
d := VarArrayCreate([0,3], varVariant);
a := 1;
b := 2;
c[0] := 1;
d[0] := 'Hello World';
c[1] := 2;
d[1] := true;
c[2] := 3;
d[2] := 1234;
c[3] := 4;
d[3] := 12345678;
da.HPFopen ( a, b, c, d );
end;


C# Sample

private void button5_Click(object sender, System.EventArgs e)
{
MdmDA.CMdmdaDocClass mDA;
int a;
int b;
object c;
long[] c1;
object d;
object[] d1;
try
{
mDA = new MdmDA.CMdmdaDocClass();
a = 1;
b = 2;
c1 = new long[5] {1, 2, 3, 4, 5};
d1 = new object[3] {"Hello",true,1};
c = d1;
d = d1;
mDA.HPFOpen ( a, b, c1, d );
}
catch (Exception e_1)
{
Console.WriteLine("{0} Caught exception #2.", e_1 );
}
finally
{
Console.WriteLine("fini");
mDA = null;
}
}