Link to home
Create AccountLog in
Avatar of meyerworks
meyerworksFlag for United States of America

asked on

Windows Server 2003 SP2, Syspro, COM Object,Delphi 7 Server as thrown an exception

I am using Delphi7 to access a third party's com object.
It is a component that allows us to logon to Syspro and retrieve a session ID in order to
access the business system ( part of their E.Net strategy).
We are moving to a new server and an error has popped up.
When running a basic program that has been in use for 3 years, we are now getting a
'Server Has Thrown an Exception Message'. If I run the same app on the server, I see
"Access violation at address 0012F514. Write of address 0012F514"
When we access the same com object using VBScript, the com object performs as expected.
The major fdifference between the old and new servers is that Service pack 2 has been applied to the
new 'broken ' machine.
Is there a problem with COM and service pack 2? Why would VBscript work, but not Delphi compiled app
using the same com object?
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

can you post piece of code that generates this error in your app?

also it's good idea to go to madshi.net and download madExcept package it will help you to track where did error came from

ziolko.
Avatar of meyerworks

ASKER

//The folllwing code works as a VBS file yo return a string store in uid
Dim uid, Encore
Set Encore = createobject("Encore.Utilities")
uid = Encore.logon("COWNER", "1054", "A","", "05", 0, 0,"");

// the foillwing is the only line i use in delphi to retrun a string
uid := u.logon('COWNER','1054','A',' ', 5, 0, 0,'');

Do you need to see the whole type library source code file
ZIOLKO: wow good idead about MadExcept: here;s the output..can you help interpret?
date/time Ā  Ā  Ā  Ā  : 2008-08-12, 06:03:11, 421ms
computer name Ā  Ā  : PESRV
wts client name Ā  : AMD64
user name Ā  Ā  Ā  Ā  : administrator
operating system Ā : Windows 2003 Service Pack 2 build 3790
system language Ā  : English
system up time Ā  Ā : 16 hours 47 minutes
program up time Ā  : 2 seconds
processors Ā  Ā  Ā  Ā : 4x Intel(R) Xeon(R) CPU Ā  Ā  Ā  Ā  Ā  E5440 Ā @ 2.83GHz
physical memory Ā  : 3297/4091 MB (free/total)
free disk space Ā  : (C:) 13.19 GB
display mode Ā  Ā  Ā : 1280x1024, 16 bit
process id Ā  Ā  Ā  Ā : $f94
allocated memory Ā : 4.00 MB
executable Ā  Ā  Ā  Ā : et.exe
exec. date/time Ā  : 2008-08-12 06:02
madExcept version : 2.7k
exception class Ā  : EAccessViolation
exception message : Access violation at address 0012F518. Write of address 0012F518.

main thread ($b74):
0012f518 +000 ??? Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
00479caf +04f et.exe Ā  Ā  Encore_TLB Ā  Ā  Ā  Ā TUtilities.Logon
00479ef4 +03c et.exe Ā  Ā  enetu Ā  Ā  Ā 41 +11 TForm1.Button1Click
00458b7c +064 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.Click
00451404 +01c et.exe Ā  Ā  StdCtrls Ā  Ā  Ā  Ā  Ā TButton.Click
004514f8 +00c et.exe Ā  Ā  StdCtrls Ā  Ā  Ā  Ā  Ā TButton.CNCommand
004589e4 +188 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.WndProc
0045b8ef +157 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.WndProc
004512c8 +06c et.exe Ā  Ā  StdCtrls Ā  Ā  Ā  Ā  Ā TButtonControl.WndProc
004587b4 +024 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.Perform
0045ba27 +023 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā DoControlMsg
0045c07f +00b et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.WMCommand
00472528 +02c et.exe Ā  Ā  Forms Ā  Ā  Ā  Ā  Ā  Ā  TCustomForm.WMCommand
004589e4 +188 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.WndProc
0045b8ef +157 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.WndProc
00470581 +421 et.exe Ā  Ā  Forms Ā  Ā  Ā  Ā  Ā  Ā  TCustomForm.WndProc
00444920 +014 et.exe Ā  Ā  Classes Ā  Ā  Ā  Ā  Ā  StdWndProc
0045b56c +02c et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.MainWndProc
00444920 +014 et.exe Ā  Ā  Classes Ā  Ā  Ā  Ā  Ā  StdWndProc
7739c332 +044 user32.dll Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  SendMessageW
773b045e +016 user32.dll Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  CallWindowProcA
0045b9d3 +0d7 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.DefaultHandler
00458f84 +010 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.WMLButtonUp
004589e4 +188 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TControl.WndProc
0045b8ef +157 et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.WndProc
004512c8 +06c et.exe Ā  Ā  StdCtrls Ā  Ā  Ā  Ā  Ā TButtonControl.WndProc
0045b56c +02c et.exe Ā  Ā  Controls Ā  Ā  Ā  Ā  Ā TWinControl.MainWndProc
00444920 +014 et.exe Ā  Ā  Classes Ā  Ā  Ā  Ā  Ā  StdWndProc
773a16e0 +00a user32.dll Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  DispatchMessageA
00476897 +083 et.exe Ā  Ā  Forms Ā  Ā  Ā  Ā  Ā  Ā  TApplication.ProcessMessage
004768b6 +00a et.exe Ā  Ā  Forms Ā  Ā  Ā  Ā  Ā  Ā  TApplication.HandleMessage
00476ad6 +096 et.exe Ā  Ā  Forms Ā  Ā  Ā  Ā  Ā  Ā  TApplication.Run
0047a24b +03b et.exe Ā  Ā  et Ā  Ā  Ā  Ā  14 Ā +3 initialization

thread $b78:
7c8285ec +0 ntdll.dll Ā KiFastSystemCallRet
7c827cf9 +a ntdll.dll Ā NtWaitForMultipleObjects

modules:
00400000 et.exe Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  C:
00db0000 MFOM.DLL Ā  Ā  4.3.3.0 Ā  Ā  Ā  Ā  Ā  d:\SYSPRO60\base
00dc0000 class.dll Ā  Ā 1.0.0.0 Ā  Ā  Ā  Ā  Ā  D:\SYSPRO60\BASE
00dd0000 classm.dll Ā  1.0.0.0 Ā  Ā  Ā  Ā  Ā  D:\SYSPRO60\BASE
00f80000 MFOLEM.DLL Ā  4.4.1.0 Ā  Ā  Ā  Ā  Ā  d:\SYSPRO60\base
00fa0000 oleclasm.dll 1.0.0.0 Ā  Ā  Ā  Ā  Ā  D:\SYSPRO60\BASE
01d00000 AdmState.dll 6.0.9.0 Ā  Ā  Ā  Ā  Ā  d:\SYSPRO60\base
10000000 OOPSM.dll Ā  Ā 5.0.1.0 Ā  Ā  Ā  Ā  Ā  d:\SYSPRO60\base
600a0000 CBLRTSM.DLL Ā 8.181.5.151 Ā  Ā  Ā  d:\SYSPRO60\base
60150000 cblintm.dll Ā 8.181.5.151 Ā  Ā  Ā  d:\SYSPRO60\base
60170000 COB32API.dll 8.181.5.151 Ā  Ā  Ā  d:\SYSPRO60\base
61000000 ENCORE.DLL Ā  6.0.9.0 Ā  Ā  Ā  Ā  Ā  d:\SYSPRO60\base
71b70000 uxtheme.dll Ā 6.0.3790.3959 Ā  Ā  C:\WINDOWS\system32
71bb0000 wsock32.dll Ā 5.2.3790.0 Ā  Ā  Ā  Ā C:\WINDOWS\system32
71bf0000 WS2HELP.dll Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
71c00000 WS2_32.dll Ā  5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
71c40000 NETAPI32.dll 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
75da0000 SXS.DLL Ā  Ā  Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
762b0000 comdlg32.dll 6.0.3790.3959 Ā  Ā  C:\WINDOWS\system32
76f00000 wtsapi32.dll 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
76f50000 Secur32.dll Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77010000 COMRes.dll Ā  2001.12.4720.3959 C:\WINDOWS\system32
771f0000 WINSTA.dll Ā  5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77380000 user32.dll Ā  5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77420000 comctl32.dll 6.0.3790.3959 Ā  Ā  C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55
77530000 comctl32.dll 5.82.3790.3959 Ā  Ā C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.3959_x-ww_78FCF8D0
77670000 ole32.dll Ā  Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
777b0000 CLBCatQ.DLL Ā 2001.12.4720.3959 C:\WINDOWS\system32
77b90000 version.dll Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77ba0000 msvcrt.dll Ā  7.0.3790.3959 Ā  Ā  C:\WINDOWS\system32
77c00000 GDI32.dll Ā  Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77c50000 RPCRT4.dll Ā  5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77d00000 oleaut32.dll 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77da0000 SHLWAPI.dll Ā 6.0.3790.3959 Ā  Ā  C:\WINDOWS\system32
77e40000 kernel32.dll 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
77f50000 ADVAPI32.dll 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
7c800000 ntdll.dll Ā  Ā 5.2.3790.3959 Ā  Ā  C:\WINDOWS\system32
7c8d0000 SHELL32.dll Ā 6.0.3790.3959 Ā  Ā  C:\WINDOWS\system32

hardware:
+ Computer
Ā  - ACPI Multiprocessor PC
+ Disk drives
Ā  - DELL PERC 6/i SCSI Disk Device
+ Display adapters
Ā  - ATI ES1000 Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā (driver 8.24.3.0)
+ DVD/CD-ROM drives
Ā  - HL-DT-ST CDRW/DVD GCCH30N
+ Floppy disk controllers
Ā  - Standard floppy disk controller
+ Floppy disk drives
Ā  - Floppy disk drive
+ Human Interface Devices
Ā  - USB Human Interface Device
Ā  - USB Human Interface Device
Ā  - USB Human Interface Device
Ā  - USB Human Interface Device
+ IDE ATA/ATAPI controllers
Ā  - Intel(R) 631xESB/6321ESB Serial ATA Storage Controller - 2680 (driver 7.3.0.1010)
Ā  - Primary IDE Channel
Ā  - Secondary IDE Channel
+ Keyboards
Ā  - HID Keyboard Device
Ā  - HID Keyboard Device
+ Mice and other pointing devices
Ā  - HID-compliant mouse
Ā  - HID-compliant mouse
+ Monitors
Ā  - Default Monitor
+ Network adapters
Ā  - Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) (driver 4.2.2.0)
Ā  - Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) #2 (driver 4.2.2.0)
+ Ports (COM &Ā LPT)
Ā  - Communications Port (COM1)
Ā  - Communications Port (COM2)
+ Processors
Ā  - Intel(R) Xeon(R) CPU Ā  Ā  Ā  Ā  Ā  E5440 Ā @ 2.83GHz
Ā  - Intel(R) Xeon(R) CPU Ā  Ā  Ā  Ā  Ā  E5440 Ā @ 2.83GHz
Ā  - Intel(R) Xeon(R) CPU Ā  Ā  Ā  Ā  Ā  E5440 Ā @ 2.83GHz
Ā  - Intel(R) Xeon(R) CPU Ā  Ā  Ā  Ā  Ā  E5440 Ā @ 2.83GHz
+ SCSI and RAID controllers
Ā  - DELL PERC 6/i Integrated RAID Controller (driver 2.14.0.32)
+ Sound, video and game controllers
Ā  - Audio Codecs
Ā  - Legacy Audio Drivers
Ā  - Legacy Video Capture Devices
Ā  - Media Control Devices
Ā  - Video Codecs
+ System devices
Ā  - ACPI Fixed Feature Button
Ā  - Broadcom BCM5708C NetXtreme II GigE (driver 4.1.5.0)
Ā  - Broadcom BCM5708C NetXtreme II GigE #2 (driver 4.1.5.0)
Ā  - DELL PERC RAID Virtual Device (driver 2.14.0.32)
Ā  - Direct memory access controller
Ā  - High Precision Event Timer (driver 7.0.0.1011)
Ā  - Intel(R) 5000 Series Chipset Error Reporting Registers - 25F0 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset Error Reporting Registers - 25F0 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset Error Reporting Registers - 25F0 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset FBD Registers - 25F5 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset FBD Registers - 25F6 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x4 Port 2 - 25E2 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x4 Port 3 - 25E3 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x4 Port 4 - 25E4 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x4 Port 5 - 25E5 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x4 Port 7 - 25E7 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset PCI Express x8 Port 6-7 - 25F9 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset Reserved Registers - 25F1 (driver 7.3.0.1010)
Ā  - Intel(R) 5000 Series Chipset Reserved Registers - 25F3 (driver 7.3.0.1010)
Ā  - Intel(R) 5000X Chipset Memory Controller Hub - 25C0 (driver 7.3.0.1010)
Ā  - Intel(R) 6311ESB/6321ESB PCI Express Downstream Port E1 - 3510 (driver 7.3.0.1010)
Ā  - Intel(R) 6311ESB/6321ESB PCI Express Downstream Port E2 - 3514 (driver 7.3.0.1010)
Ā  - Intel(R) 6311ESB/6321ESB PCI Express to PCI-X Bridge - 350C (driver 7.3.0.1010)
Ā  - Intel(R) 6311ESB/6321ESB PCI Express Upstream Port - 3500 (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB LPC Interface Controller - 2670 (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB PCI Express Root Port 1 - 2690 (driver 7.3.0.1010)
Ā  - Intel(R) 82801 PCI Bridge - 244E (driver 7.0.0.1011)
Ā  - ISAPNP Read Data Port
Ā  - Logical Disk Manager
Ā  - Microcode Update Device
Ā  - Microsoft ACPI-Compliant System
Ā  - Microsoft System Management BIOS Driver
Ā  - Motherboard resources
Ā  - Numeric data processor
Ā  - PCI bus
Ā  - PCI standard PCI-to-PCI bridge
Ā  - PCI standard PCI-to-PCI bridge
Ā  - Plug and Play Software Device Enumerator
Ā  - Programmable interrupt controller
Ā  - System board
Ā  - System board
Ā  - System board
Ā  - System board
Ā  - System CMOS/real time clock
Ā  - System Management Device (driver 5.8.0.4952)
Ā  - System timer
Ā  - Terminal Server Device Redirector
Ā  - Terminal Server Keyboard Driver
Ā  - Terminal Server Mouse Driver
Ā  - Volume Manager
+ Universal Serial Bus controllers
Ā  - Generic USB Hub
Ā  - Generic USB Hub
Ā  - Intel(R) 631xESB/6321ESB USB Universal Host Controller - 2688 (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB USB Universal Host Controller - 2689 (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB USB Universal Host Controller - 268A (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB USB Universal Host Controller - 268B (driver 7.3.0.1010)
Ā  - Intel(R) 631xESB/6321ESB USB2 Enhanced Host Controller - 268C (driver 7.3.0.1010)
Ā  - USB Composite Device
Ā  - USB Root Hub
Ā  - USB Root Hub
Ā  - USB Root Hub
Ā  - USB Root Hub
Ā  - USB Root Hub
as I can see variable: "u" is of type TUtilities how/when you create/destroy this object.
first try this:
if Assigned(u) then
Ā  uid := u.logon('COWNER','1054','A',' ', 5, 0, 0,'')
else
Ā  ShowMessage('not created');

and see what happens:)

ziolko.
I've found out that I may be running into Microsoft DEP "Data Execution Protection"
I changed the setting on the Dell Poweredge Server [Performance->advanced->data execution]
to only monitor essential windows services. Now I can run the app on the server,
but I cannot connect from clients. Still Receive ":The server has thrown an exception"
message at the client.
Any thoughts on this would be appreciated.
and there's no indication what was exception?
are you trying to connect to it remotelly using DCOM? if yes it maybe DCOM securty settings

ziolko.
Dcom works remotely with the VBScript program as I stated above
My Application , on the client still generates The Server Thre An Exception message.
and what if you turn DEP completely?

ziolko.
if it helped on local machine look at DEP settings of client's machine

ziolko.
I'm trying to find out from Dell, as we speak,how to do that on our Poweredge Server, unless you know of Registry fix or something
this is strange VBScript should use same DLLs and same interfaces so errors should be in both cases... but anyway try switching off DEP on client machine

ziolko.
I changed the DEP software setting on the client to ignore this particular application.
Also tried DEP settings that protected only 'essential operating system programs' on the client as well.
is it possible that you debbug your app on machine that fails? or at least change code of TUtilities to dump some log data so you can make sure that DefaultInterface is properly created

ziolko.
I do not have a development environment installed on that machine
I could send you the Delphi Type library siurce file
or the type library itself
you can alter type library so it dumps log info to text file then build it on your machine and deploy compiled app on client machine

ziolko.
I don't have any idea how to do that!
ok post here Encore_TLB.pas file

ziolko.
unit Encore_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 : 1.2
// File generated on 5/2/2008 5:28:01 AM from Type Library described below.

// ************************************************************************ Ā //
// Type Lib: C:\Program Files\SYSPRO60\base\ENCORE.TLB (1)
// LIBID: {8C5EFC94-03E1-4129-B705-973023DB849E}
// LCID: 0
// Helpfile: C:\Program Files\SYSPRO60\base\SDK.CHM
// HelpString: SYSPRO e.net solutions Type Library
// DepndLst:
// Ā  (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// Errors:
// Ā  Error creating palette bitmap of (TUtilities) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TeQuery) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TSetup) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TTransaction) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// ************************************************************************ //
// *************************************************************************//
// 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. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
Ā 

// *********************************************************************//
// 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
Ā  EncoreMajorVersion = 1;
Ā  EncoreMinorVersion = 0;

Ā  LIBID_Encore: TGUID = '{8C5EFC94-03E1-4129-B705-973023DB849E}';

Ā  IID_IUtilities: TGUID = '{DE5E3827-E894-4D29-8791-3AB12021B9B9}';
Ā  CLASS_Utilities: TGUID = '{FE41B1AD-0F2B-459C-9668-5FC6BBF093EE}';
Ā  IID_IQuery: TGUID = '{9EE97AFC-5678-4248-ACEC-3555AE4CA703}';
Ā  CLASS_Query: TGUID = '{60AFCED0-DF97-435B-BE5B-1691B727444E}';
Ā  IID_ISetup: TGUID = '{B2272F56-2FC5-441A-96AE-594150F632A1}';
Ā  CLASS_Setup: TGUID = '{C846F049-F07B-4D28-B2B2-3F6B904E9032}';
Ā  IID_ITransaction: TGUID = '{1B1A7332-53BC-46A4-AC26-02F8C703A42B}';
Ā  CLASS_Transaction: TGUID = '{073C394C-95B8-4973-83E9-4B2620BD32A5}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
// Constants for enum Language
type
Ā  Language = TOleEnum;
const
Ā  AUTO = $00000000;
Ā  ENGLISH_US = $00000001;
Ā  FRENCH_CANADIAN = $00000002;
Ā  DANISH = $00000003;
Ā  DUTCH = $00000004;
Ā  ENGLISH = $00000005;
Ā  FINNISH = $00000006;
Ā  FRENCH = $00000007;
Ā  GERMAN = $00000008;
Ā  ITALIAN = $00000009;
Ā  NORWEGIAN = $0000000A;
Ā  PORTUGUESE = $0000000B;
Ā  SPANISH = $0000000C;
Ā  SWEDISH = $0000000D;

// Constants for enum LogDetail
type
Ā  LogDetail = TOleEnum;
const
Ā  ldNoDebug = $00000000;
Ā  ldDebug = $00000001;

// Constants for enum Instance
type
Ā  Instance = TOleEnum;
const
Ā  EncoreInstance_0 = $00000000;
Ā  EncoreInstance_1 = $00000001;
Ā  EncoreInstance_2 = $00000002;
Ā  EncoreInstance_3 = $00000003;
Ā  EncoreInstance_4 = $00000004;
Ā  EncoreInstance_5 = $00000005;
Ā  EncoreInstance_6 = $00000006;
Ā  EncoreInstance_7 = $00000007;
Ā  EncoreInstance_8 = $00000008;
Ā  EncoreInstance_9 = $00000009;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  IUtilities = interface;
Ā  IUtilitiesDisp = dispinterface;
Ā  IQuery = interface;
Ā  IQueryDisp = dispinterface;
Ā  ISetup = interface;
Ā  ISetupDisp = dispinterface;
Ā  ITransaction = interface;
Ā  ITransactionDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// (NOTE: Here we map each CoClass to its Default Interface) Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  Utilities = IUtilities;
Ā  Query = IQuery;
Ā  Setup = ISetup;
Ā  Transaction = ITransaction;


// *********************************************************************//
// Interface: IUtilities
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {DE5E3827-E894-4D29-8791-3AB12021B9B9}
// *********************************************************************//
Ā  IUtilities = interface(IDispatch)
Ā  Ā  ['{DE5E3827-E894-4D29-8791-3AB12021B9B9}']
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString; safecall;
Ā  Ā  function Logoff(const UserId: WideString): Integer; safecall;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā IUtilitiesDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {DE5E3827-E894-4D29-8791-3AB12021B9B9}
// *********************************************************************//
Ā  IUtilitiesDisp = dispinterface
Ā  Ā  ['{DE5E3827-E894-4D29-8791-3AB12021B9B9}']
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString; dispid 1;
Ā  Ā  function Logoff(const UserId: WideString): Integer; dispid 2;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString; dispid 3;
Ā  end;

// *********************************************************************//
// Interface: IQuery
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {9EE97AFC-5678-4248-ACEC-3555AE4CA703}
// *********************************************************************//
Ā  IQuery = interface(IDispatch)
Ā  Ā  ['{9EE97AFC-5678-4248-ACEC-3555AE4CA703}']
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā IQueryDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {9EE97AFC-5678-4248-ACEC-3555AE4CA703}
// *********************************************************************//
Ā  IQueryDisp = dispinterface
Ā  Ā  ['{9EE97AFC-5678-4248-ACEC-3555AE4CA703}']
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString; dispid 1;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 2;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString; dispid 3;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString; dispid 4;
Ā  end;

// *********************************************************************//
// Interface: ISetup
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {B2272F56-2FC5-441A-96AE-594150F632A1}
// *********************************************************************//
Ā  ISetup = interface(IDispatch)
Ā  Ā  ['{B2272F56-2FC5-441A-96AE-594150F632A1}']
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā ISetupDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {B2272F56-2FC5-441A-96AE-594150F632A1}
// *********************************************************************//
Ā  ISetupDisp = dispinterface
Ā  Ā  ['{B2272F56-2FC5-441A-96AE-594150F632A1}']
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 1;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 2;
Ā  end;

// *********************************************************************//
// Interface: ITransaction
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {1B1A7332-53BC-46A4-AC26-02F8C703A42B}
// *********************************************************************//
Ā  ITransaction = interface(IDispatch)
Ā  Ā  ['{1B1A7332-53BC-46A4-AC26-02F8C703A42B}']
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā ITransactionDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {1B1A7332-53BC-46A4-AC26-02F8C703A42B}
// *********************************************************************//
Ā  ITransactionDisp = dispinterface
Ā  Ā  ['{1B1A7332-53BC-46A4-AC26-02F8C703A42B}']
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 1;
Ā  end;

// *********************************************************************//
// The Class CoUtilities provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface IUtilities exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Utilities. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoUtilities = class
Ā  Ā  class function Create: IUtilities;
Ā  Ā  class function CreateRemote(const MachineName: string): IUtilities;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TUtilities
// Help String Ā  Ā  Ā : SYSPRO e.net solutions utilities class
// Default Interface: IUtilities
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TUtilitiesProperties= class;
{$ENDIF}
Ā  TUtilities = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā IUtilities;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TUtilitiesProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TUtilitiesProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: IUtilities;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: IUtilities);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString;
Ā  Ā  function Logoff(const UserId: WideString): Integer;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString;
Ā  Ā  property DefaultInterface: IUtilities read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TUtilitiesProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TUtilities
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TUtilitiesProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TUtilities;
Ā  Ā  function Ā  Ā GetDefaultInterface: IUtilities;
Ā  Ā  constructor Create(AServer: TUtilities);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: IUtilities read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoQuery provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface IQuery exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Query. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoQuery = class
Ā  Ā  class function Create: IQuery;
Ā  Ā  class function CreateRemote(const MachineName: string): IQuery;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TeQuery
// Help String Ā  Ā  Ā : SYSPRO e.net solutions query class
// Default Interface: IQuery
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TeQueryProperties= class;
{$ENDIF}
Ā  TeQuery = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā IQuery;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TeQueryProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TeQueryProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: IQuery;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: IQuery);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: IQuery read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TeQueryProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TeQuery
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TeQueryProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TeQuery;
Ā  Ā  function Ā  Ā GetDefaultInterface: IQuery;
Ā  Ā  constructor Create(AServer: TeQuery);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: IQuery read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoSetup provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface ISetup exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Setup. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoSetup = class
Ā  Ā  class function Create: ISetup;
Ā  Ā  class function CreateRemote(const MachineName: string): ISetup;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TSetup
// Help String Ā  Ā  Ā : SYSPRO e.set solutions setup class
// Default Interface: ISetup
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TSetupProperties= class;
{$ENDIF}
Ā  TSetup = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā ISetup;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TSetupProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TSetupProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: ISetup;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: ISetup);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: ISetup read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TSetupProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TSetup
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TSetupProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TSetup;
Ā  Ā  function Ā  Ā GetDefaultInterface: ISetup;
Ā  Ā  constructor Create(AServer: TSetup);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: ISetup read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoTransaction provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface ITransaction exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Transaction. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoTransaction = class
Ā  Ā  class function Create: ITransaction;
Ā  Ā  class function CreateRemote(const MachineName: string): ITransaction;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TTransaction
// Help String Ā  Ā  Ā : SYSPRO e.net solutions transaction class
// Default Interface: ITransaction
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TTransactionProperties= class;
{$ENDIF}
Ā  TTransaction = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā ITransaction;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TTransactionProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TTransactionProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: ITransaction;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: ITransaction);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: ITransaction read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TTransactionProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TTransaction
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TTransactionProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TTransaction;
Ā  Ā  function Ā  Ā GetDefaultInterface: ITransaction;
Ā  Ā  constructor Create(AServer: TTransaction);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: ITransaction read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


procedure Register;

resourcestring
Ā  dtlServerPage = 'ActiveX';

Ā  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

class function CoUtilities.Create: IUtilities;
begin
Ā  Result := CreateComObject(CLASS_Utilities) as IUtilities;
end;

class function CoUtilities.CreateRemote(const MachineName: string): IUtilities;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Utilities) as IUtilities;
end;

procedure TUtilities.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{FE41B1AD-0F2B-459C-9668-5FC6BBF093EE}';
Ā  Ā  IntfIID: Ā  '{DE5E3827-E894-4D29-8791-3AB12021B9B9}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TUtilities.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as IUtilities;
Ā  end;
end;

procedure TUtilities.ConnectTo(svrIntf: IUtilities);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TUtilities.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TUtilities.GetDefaultInterface: IUtilities;
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 TUtilities.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TUtilitiesProperties.Create(Self);
{$ENDIF}
end;

destructor TUtilities.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TUtilities.GetServerProperties: TUtilitiesProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TUtilities.Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Logon(Operator, OperatorPassword, CompanyId, CompanyPassword,
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode, LogLevel, EncoreInstance, XMLIn);
end;

function TUtilities.GetLogonProfile(const UserId: WideString): WideString;
begin
Ā  Result := DefaultInterface.GetLogonProfile(UserId);
end;

function TUtilities.Logoff(const UserId: WideString): Integer;
begin
Ā  Result := DefaultInterface.Logoff(UserId);
end;

function TUtilities.Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const Parameter: WideString): WideString;
begin
Ā  Result := DefaultInterface.Run(UserId, BusinessObject, Parameter);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TUtilitiesProperties.Create(AServer: TUtilities);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TUtilitiesProperties.GetDefaultInterface: IUtilities;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoQuery.Create: IQuery;
begin
Ā  Result := CreateComObject(CLASS_Query) as IQuery;
end;

class function CoQuery.CreateRemote(const MachineName: string): IQuery;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Query) as IQuery;
end;

procedure TeQuery.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{60AFCED0-DF97-435B-BE5B-1691B727444E}';
Ā  Ā  IntfIID: Ā  '{9EE97AFC-5678-4248-ACEC-3555AE4CA703}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TeQuery.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as IQuery;
Ā  end;
end;

procedure TeQuery.ConnectTo(svrIntf: IQuery);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TeQuery.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TeQuery.GetDefaultInterface: IQuery;
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 TeQuery.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TeQueryProperties.Create(Self);
{$ENDIF}
end;

destructor TeQuery.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TeQuery.GetServerProperties: TeQueryProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TeQuery.Browse(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Browse(UserId, XMLIn);
end;

function TeQuery.Fetch(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Fetch(UserId, XMLIn);
end;

function TeQuery.Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Query(UserId, BusinessObject, XMLIn);
end;

function TeQuery.NextKey(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.NextKey(UserId, XMLIn);
end;

function TeQuery.PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.PreviousKey(UserId, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TeQueryProperties.Create(AServer: TeQuery);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TeQueryProperties.GetDefaultInterface: IQuery;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoSetup.Create: ISetup;
begin
Ā  Result := CreateComObject(CLASS_Setup) as ISetup;
end;

class function CoSetup.CreateRemote(const MachineName: string): ISetup;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Setup) as ISetup;
end;

procedure TSetup.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{C846F049-F07B-4D28-B2B2-3F6B904E9032}';
Ā  Ā  IntfIID: Ā  '{B2272F56-2FC5-441A-96AE-594150F632A1}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TSetup.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as ISetup;
Ā  end;
end;

procedure TSetup.ConnectTo(svrIntf: ISetup);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TSetup.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TSetup.GetDefaultInterface: ISetup;
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 TSetup.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TSetupProperties.Create(Self);
{$ENDIF}
end;

destructor TSetup.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TSetup.GetServerProperties: TSetupProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TSetup.Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Add(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TSetup.Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Update(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TSetup.Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Delete(UserId, BusinessObject, XMLParameters, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TSetupProperties.Create(AServer: TSetup);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TSetupProperties.GetDefaultInterface: ISetup;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoTransaction.Create: ITransaction;
begin
Ā  Result := CreateComObject(CLASS_Transaction) as ITransaction;
end;

class function CoTransaction.CreateRemote(const MachineName: string): ITransaction;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Transaction) as ITransaction;
end;

procedure TTransaction.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{073C394C-95B8-4973-83E9-4B2620BD32A5}';
Ā  Ā  IntfIID: Ā  '{1B1A7332-53BC-46A4-AC26-02F8C703A42B}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TTransaction.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as ITransaction;
Ā  end;
end;

procedure TTransaction.ConnectTo(svrIntf: ITransaction);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TTransaction.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TTransaction.GetDefaultInterface: ITransaction;
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 TTransaction.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TTransactionProperties.Create(Self);
{$ENDIF}
end;

destructor TTransaction.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TTransaction.GetServerProperties: TTransactionProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TTransaction.Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Post(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TTransaction.Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Build(UserId, BusinessObject, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TTransactionProperties.Create(AServer: TTransaction);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TTransactionProperties.GetDefaultInterface: ITransaction;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

procedure Register;
begin
Ā  RegisterComponents(dtlServerPage, [TUtilities, TeQuery, TSetup, TTransaction]);
end;

end.
ok, I'll take a look at it this evening and post here version for test

ziolko.
first thing is that Logon method has parameter LogDetail set it to "ldDebug"
u.Logon('','','','',LANG_NEUTRAL, ldDebug, EncoreInstance_0, '');
and check documentation where you can read logs

but any way here's modified version of TUtilites which will dump some info to text file (c:\utilities.log) when u will be destroyed, so make sure that it is properly destroyed:) for instance like this:

procedure TForm1.Button1Click(Sender: TObject);
var u: TUtilities;
begin
Ā  u := TUtilities.Create(nil);
Ā  try
Ā  Ā  u.Logon('','','','',LANG_NEUTRAL, ldDebug, EncoreInstance_0, '');
Ā  except
Ā  Ā  u.Free;
Ā  end;
end;

here's modified unit:

unit Encore_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 : 1.2
// File generated on 5/2/2008 5:28:01 AM from Type Library described below.

// ************************************************************************ Ā //
// Type Lib: C:\Program Files\SYSPRO60\base\ENCORE.TLB (1)
// LIBID: {8C5EFC94-03E1-4129-B705-973023DB849E}
// LCID: 0
// Helpfile: C:\Program Files\SYSPRO60\base\SDK.CHM
// HelpString: SYSPRO e.net solutions Type Library
// DepndLst:
// Ā  (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// Errors:
// Ā  Error creating palette bitmap of (TUtilities) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TeQuery) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TSetup) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// Ā  Error creating palette bitmap of (TTransaction) : Access violation at address 00A15353 in module 'tlib70.bpl'. Read of address 00000000
// ************************************************************************ //
// *************************************************************************//
// 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.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
Ā 

// *********************************************************************//
// 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
Ā  EncoreMajorVersion = 1;
Ā  EncoreMinorVersion = 0;

Ā  LIBID_Encore: TGUID = '{8C5EFC94-03E1-4129-B705-973023DB849E}';

Ā  IID_IUtilities: TGUID = '{DE5E3827-E894-4D29-8791-3AB12021B9B9}';
Ā  CLASS_Utilities: TGUID = '{FE41B1AD-0F2B-459C-9668-5FC6BBF093EE}';
Ā  IID_IQuery: TGUID = '{9EE97AFC-5678-4248-ACEC-3555AE4CA703}';
Ā  CLASS_Query: TGUID = '{60AFCED0-DF97-435B-BE5B-1691B727444E}';
Ā  IID_ISetup: TGUID = '{B2272F56-2FC5-441A-96AE-594150F632A1}';
Ā  CLASS_Setup: TGUID = '{C846F049-F07B-4D28-B2B2-3F6B904E9032}';
Ā  IID_ITransaction: TGUID = '{1B1A7332-53BC-46A4-AC26-02F8C703A42B}';
Ā  CLASS_Transaction: TGUID = '{073C394C-95B8-4973-83E9-4B2620BD32A5}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
// Constants for enum Language
type
Ā  Language = TOleEnum;
const
Ā  AUTO = $00000000;
Ā  ENGLISH_US = $00000001;
Ā  FRENCH_CANADIAN = $00000002;
Ā  DANISH = $00000003;
Ā  DUTCH = $00000004;
Ā  ENGLISH = $00000005;
Ā  FINNISH = $00000006;
Ā  FRENCH = $00000007;
Ā  GERMAN = $00000008;
Ā  ITALIAN = $00000009;
Ā  NORWEGIAN = $0000000A;
Ā  PORTUGUESE = $0000000B;
Ā  SPANISH = $0000000C;
Ā  SWEDISH = $0000000D;

// Constants for enum LogDetail
type
Ā  LogDetail = TOleEnum;
const
Ā  ldNoDebug = $00000000;
Ā  ldDebug = $00000001;

// Constants for enum Instance
type
Ā  Instance = TOleEnum;
const
Ā  EncoreInstance_0 = $00000000;
Ā  EncoreInstance_1 = $00000001;
Ā  EncoreInstance_2 = $00000002;
Ā  EncoreInstance_3 = $00000003;
Ā  EncoreInstance_4 = $00000004;
Ā  EncoreInstance_5 = $00000005;
Ā  EncoreInstance_6 = $00000006;
Ā  EncoreInstance_7 = $00000007;
Ā  EncoreInstance_8 = $00000008;
Ā  EncoreInstance_9 = $00000009;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  IUtilities = interface;
Ā  IUtilitiesDisp = dispinterface;
Ā  IQuery = interface;
Ā  IQueryDisp = dispinterface;
Ā  ISetup = interface;
Ā  ISetupDisp = dispinterface;
Ā  ITransaction = interface;
Ā  ITransactionDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// (NOTE: Here we map each CoClass to its Default Interface) Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  Utilities = IUtilities;
Ā  Query = IQuery;
Ā  Setup = ISetup;
Ā  Transaction = ITransaction;


// *********************************************************************//
// Interface: IUtilities
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {DE5E3827-E894-4D29-8791-3AB12021B9B9}
// *********************************************************************//
Ā  IUtilities = interface(IDispatch)
Ā  Ā  ['{DE5E3827-E894-4D29-8791-3AB12021B9B9}']
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString; safecall;
Ā  Ā  function Logoff(const UserId: WideString): Integer; safecall;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā IUtilitiesDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {DE5E3827-E894-4D29-8791-3AB12021B9B9}
// *********************************************************************//
Ā  IUtilitiesDisp = dispinterface
Ā  Ā  ['{DE5E3827-E894-4D29-8791-3AB12021B9B9}']
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString; dispid 1;
Ā  Ā  function Logoff(const UserId: WideString): Integer; dispid 2;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString; dispid 3;
Ā  end;

// *********************************************************************//
// Interface: IQuery
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {9EE97AFC-5678-4248-ACEC-3555AE4CA703}
// *********************************************************************//
Ā  IQuery = interface(IDispatch)
Ā  Ā  ['{9EE97AFC-5678-4248-ACEC-3555AE4CA703}']
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā IQueryDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {9EE97AFC-5678-4248-ACEC-3555AE4CA703}
// *********************************************************************//
Ā  IQueryDisp = dispinterface
Ā  Ā  ['{9EE97AFC-5678-4248-ACEC-3555AE4CA703}']
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString; dispid 1;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 2;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString; dispid 3;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString; dispid 4;
Ā  end;

// *********************************************************************//
// Interface: ISetup
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {B2272F56-2FC5-441A-96AE-594150F632A1}
// *********************************************************************//
Ā  ISetup = interface(IDispatch)
Ā  Ā  ['{B2272F56-2FC5-441A-96AE-594150F632A1}']
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā ISetupDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {B2272F56-2FC5-441A-96AE-594150F632A1}
// *********************************************************************//
Ā  ISetupDisp = dispinterface
Ā  Ā  ['{B2272F56-2FC5-441A-96AE-594150F632A1}']
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 1;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 2;
Ā  end;

// *********************************************************************//
// Interface: ITransaction
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {1B1A7332-53BC-46A4-AC26-02F8C703A42B}
// *********************************************************************//
Ā  ITransaction = interface(IDispatch)
Ā  Ā  ['{1B1A7332-53BC-46A4-AC26-02F8C703A42B}']
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; safecall;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; safecall;
Ā  end;

// *********************************************************************//
// DispIntf: Ā ITransactionDisp
// Flags: Ā  Ā  (4416) Dual OleAutomation Dispatchable
// GUID: Ā  Ā  Ā {1B1A7332-53BC-46A4-AC26-02F8C703A42B}
// *********************************************************************//
Ā  ITransactionDisp = dispinterface
Ā  Ā  ['{1B1A7332-53BC-46A4-AC26-02F8C703A42B}']
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString; dispid 0;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString; dispid 1;
Ā  end;

// *********************************************************************//
// The Class CoUtilities provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface IUtilities exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Utilities. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoUtilities = class
Ā  Ā  class function Create: IUtilities;
Ā  Ā  class function CreateRemote(const MachineName: string): IUtilities;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TUtilities
// Help String Ā  Ā  Ā : SYSPRO e.net solutions utilities class
// Default Interface: IUtilities
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TUtilitiesProperties= class;
{$ENDIF}
Ā  TUtilities = class(TOleServer)
Ā  private
Ā  Ā  FLog: TStrings;
Ā  Ā  FIntf: Ā  Ā  Ā  Ā IUtilities;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TUtilitiesProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TUtilitiesProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: IUtilities;
Ā  Ā  procedure Log(AMessage: string);
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: IUtilities);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  function GetLogonProfile(const UserId: WideString): WideString;
Ā  Ā  function Logoff(const UserId: WideString): Integer;
Ā  Ā  function Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const Parameter: WideString): WideString;
Ā  Ā  property DefaultInterface: IUtilities read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TUtilitiesProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TUtilities
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TUtilitiesProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TUtilities;
Ā  Ā  function Ā  Ā GetDefaultInterface: IUtilities;
Ā  Ā  constructor Create(AServer: TUtilities);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: IUtilities read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoQuery provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface IQuery exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Query. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoQuery = class
Ā  Ā  class function Create: IQuery;
Ā  Ā  class function CreateRemote(const MachineName: string): IQuery;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TeQuery
// Help String Ā  Ā  Ā : SYSPRO e.net solutions query class
// Default Interface: IQuery
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TeQueryProperties= class;
{$ENDIF}
Ā  TeQuery = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā IQuery;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TeQueryProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TeQueryProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: IQuery;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: IQuery);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Browse(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Fetch(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  function NextKey(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: IQuery read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TeQueryProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TeQuery
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TeQueryProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TeQuery;
Ā  Ā  function Ā  Ā GetDefaultInterface: IQuery;
Ā  Ā  constructor Create(AServer: TeQuery);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: IQuery read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoSetup provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface ISetup exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Setup. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoSetup = class
Ā  Ā  class function Create: ISetup;
Ā  Ā  class function CreateRemote(const MachineName: string): ISetup;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TSetup
// Help String Ā  Ā  Ā : SYSPRO e.set solutions setup class
// Default Interface: ISetup
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TSetupProperties= class;
{$ENDIF}
Ā  TSetup = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā ISetup;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TSetupProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TSetupProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: ISetup;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: ISetup);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: ISetup read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TSetupProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TSetup
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TSetupProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TSetup;
Ā  Ā  function Ā  Ā GetDefaultInterface: ISetup;
Ā  Ā  constructor Create(AServer: TSetup);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: ISetup read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


// *********************************************************************//
// The Class CoTransaction provides a Create and CreateRemote method to Ā  Ā  Ā  Ā  Ā 
// create instances of the default interface ITransaction exposed by Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// the CoClass Transaction. The functions are intended to be used by Ā  Ā  Ā  Ā  Ā  Ā 
// clients wishing to automate the CoClass objects exposed by the Ā  Ā  Ā  Ā 
// server of this typelibrary. Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 
// *********************************************************************//
Ā  CoTransaction = class
Ā  Ā  class function Create: ITransaction;
Ā  Ā  class function CreateRemote(const MachineName: string): ITransaction;
Ā  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object Ā  Ā : TTransaction
// Help String Ā  Ā  Ā : SYSPRO e.net solutions transaction class
// Default Interface: ITransaction
// Def. Intf. DISP? : No
// Event Ā  Interface:
// TypeFlags Ā  Ā  Ā  Ā : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  TTransactionProperties= class;
{$ENDIF}
Ā  TTransaction = class(TOleServer)
Ā  private
Ā  Ā  FIntf: Ā  Ā  Ā  Ā ITransaction;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  FProps: Ā  Ā  Ā  TTransactionProperties;
Ā  Ā  function Ā  Ā  Ā GetServerProperties: TTransactionProperties;
{$ENDIF}
Ā  Ā  function Ā  Ā  Ā GetDefaultInterface: ITransaction;
Ā  protected
Ā  Ā  procedure InitServerData; override;
Ā  public
Ā  Ā  constructor Create(AOwner: TComponent); override;
Ā  Ā  destructor Ā Destroy; override;
Ā  Ā  procedure Connect; override;
Ā  Ā  procedure ConnectTo(svrIntf: ITransaction);
Ā  Ā  procedure Disconnect; override;
Ā  Ā  function Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
Ā  Ā  function Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
Ā  Ā  property DefaultInterface: ITransaction read GetDefaultInterface;
Ā  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  Ā  property Server: TTransactionProperties read GetServerProperties;
{$ENDIF}
Ā  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object Ā  Ā : TTransaction
// (This object is used by the IDE's Property Inspector to allow editing
// Ā of the properties of this server)
// *********************************************************************//
Ā TTransactionProperties = class(TPersistent)
Ā  private
Ā  Ā  FServer: Ā  Ā TTransaction;
Ā  Ā  function Ā  Ā GetDefaultInterface: ITransaction;
Ā  Ā  constructor Create(AServer: TTransaction);
Ā  protected
Ā  public
Ā  Ā  property DefaultInterface: ITransaction read GetDefaultInterface;
Ā  published
Ā  end;
{$ENDIF}


procedure Register;

resourcestring
Ā  dtlServerPage = 'ActiveX';

Ā  dtlOcxPage = 'ActiveX';

implementation

uses ComObj, SysUtils;

class function CoUtilities.Create: IUtilities;
begin
Ā  Result := CreateComObject(CLASS_Utilities) as IUtilities;
end;

class function CoUtilities.CreateRemote(const MachineName: string): IUtilities;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Utilities) as IUtilities;
end;

procedure TUtilities.Log(AMessage: string);
begin
Ā  if Assigned(FLog) then
Ā  Ā  FLog.Add(AMessage);
end;

procedure TUtilities.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{FE41B1AD-0F2B-459C-9668-5FC6BBF093EE}';
Ā  Ā  IntfIID: Ā  '{DE5E3827-E894-4D29-8791-3AB12021B9B9}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TUtilities.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as IUtilities;
Ā  end;
end;

procedure TUtilities.ConnectTo(svrIntf: IUtilities);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TUtilities.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TUtilities.GetDefaultInterface: IUtilities;
begin
Ā  Log('GetDefaultInterface');
Ā  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;
Ā  Log('Default interface assigned: ' + BoolToStr(Assigned(FIntf), True));
end;

constructor TUtilities.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
Ā  FLog := TStringList.Create;
Ā  Log('Create');
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TUtilitiesProperties.Create(Self);
{$ENDIF}
end;

destructor TUtilities.Destroy;
begin
Ā  Log('Destroy');
Ā  FLog.SaveToFile('c:\utilities.log');
Ā  FreeAndNil(FLog);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TUtilities.GetServerProperties: TUtilitiesProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TUtilities.Logon(const Operator: WideString; const OperatorPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const CompanyId: WideString; const CompanyPassword: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  LanguageCode: Language; LogLevel: LogDetail; EncoreInstance: Instance;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLIn: WideString): WideString;
begin
Ā  Log('Logon');
Ā  try
Ā  Ā  Result := DefaultInterface.Logon(Operator, OperatorPassword, CompanyId, CompanyPassword,
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā LanguageCode, LogLevel, EncoreInstance, XMLIn);
Ā  Ā  Log('Logon result: ' + Result);
Ā  except
Ā  Ā  on E: Exception do begin
Ā  Ā  Ā  Log('Logon result: ' + E.Message);
Ā  Ā  Ā  raise;
Ā  Ā  end;
Ā  end;
end;

function TUtilities.GetLogonProfile(const UserId: WideString): WideString;
begin
Ā  Log('GetLogonProfile');
Ā  try
Ā  Ā  Result := DefaultInterface.GetLogonProfile(UserId);
Ā  Ā  Log('GetLogonProfile result: ' + Result);
Ā  except
Ā  Ā  on E: Exception do begin
Ā  Ā  Ā  Log('GetLogonProfile result: ' + E.Message);
Ā  Ā  Ā  raise;
Ā  Ā  end;
Ā  end;
end;

function TUtilities.Logoff(const UserId: WideString): Integer;
begin
Ā  Log('Logoff');
Ā  try
Ā  Ā  Result := DefaultInterface.Logoff(UserId);
Ā  Ā  Log('Logoff result: ' + IntToStr(Result));
Ā  except
Ā  Ā  on E: Exception do begin
Ā  Ā  Ā  Log('Logoff result: ' + E.Message);
Ā  Ā  Ā  raise;
Ā  Ā  end;
Ā  end;
end;

function TUtilities.Run(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const Parameter: WideString): WideString;
begin
Ā  Log('Logoff');
Ā  try
Ā  Ā  Result := DefaultInterface.Run(UserId, BusinessObject, Parameter);
Ā  Ā  Log('Run result: ' + Result);
Ā  except
Ā  Ā  on E: Exception do begin
Ā  Ā  Ā  Log('Run result: ' + E.Message);
Ā  Ā  Ā  raise;
Ā  Ā  end;
Ā  end;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TUtilitiesProperties.Create(AServer: TUtilities);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TUtilitiesProperties.GetDefaultInterface: IUtilities;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoQuery.Create: IQuery;
begin
Ā  Result := CreateComObject(CLASS_Query) as IQuery;
end;

class function CoQuery.CreateRemote(const MachineName: string): IQuery;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Query) as IQuery;
end;

procedure TeQuery.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{60AFCED0-DF97-435B-BE5B-1691B727444E}';
Ā  Ā  IntfIID: Ā  '{9EE97AFC-5678-4248-ACEC-3555AE4CA703}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TeQuery.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as IQuery;
Ā  end;
end;

procedure TeQuery.ConnectTo(svrIntf: IQuery);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TeQuery.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TeQuery.GetDefaultInterface: IQuery;
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 TeQuery.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TeQueryProperties.Create(Self);
{$ENDIF}
end;

destructor TeQuery.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TeQuery.GetServerProperties: TeQueryProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TeQuery.Browse(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Browse(UserId, XMLIn);
end;

function TeQuery.Fetch(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Fetch(UserId, XMLIn);
end;

function TeQuery.Query(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Query(UserId, BusinessObject, XMLIn);
end;

function TeQuery.NextKey(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.NextKey(UserId, XMLIn);
end;

function TeQuery.PreviousKey(const UserId: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.PreviousKey(UserId, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TeQueryProperties.Create(AServer: TeQuery);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TeQueryProperties.GetDefaultInterface: IQuery;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoSetup.Create: ISetup;
begin
Ā  Result := CreateComObject(CLASS_Setup) as ISetup;
end;

class function CoSetup.CreateRemote(const MachineName: string): ISetup;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Setup) as ISetup;
end;

procedure TSetup.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{C846F049-F07B-4D28-B2B2-3F6B904E9032}';
Ā  Ā  IntfIID: Ā  '{B2272F56-2FC5-441A-96AE-594150F632A1}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TSetup.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as ISetup;
Ā  end;
end;

procedure TSetup.ConnectTo(svrIntf: ISetup);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TSetup.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TSetup.GetDefaultInterface: ISetup;
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 TSetup.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TSetupProperties.Create(Self);
{$ENDIF}
end;

destructor TSetup.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TSetup.GetServerProperties: TSetupProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TSetup.Add(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Add(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TSetup.Update(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Update(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TSetup.Delete(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Delete(UserId, BusinessObject, XMLParameters, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TSetupProperties.Create(AServer: TSetup);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TSetupProperties.GetDefaultInterface: ISetup;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

class function CoTransaction.Create: ITransaction;
begin
Ā  Result := CreateComObject(CLASS_Transaction) as ITransaction;
end;

class function CoTransaction.CreateRemote(const MachineName: string): ITransaction;
begin
Ā  Result := CreateRemoteComObject(MachineName, CLASS_Transaction) as ITransaction;
end;

procedure TTransaction.InitServerData;
const
Ā  CServerData: TServerData = (
Ā  Ā  ClassID: Ā  '{073C394C-95B8-4973-83E9-4B2620BD32A5}';
Ā  Ā  IntfIID: Ā  '{1B1A7332-53BC-46A4-AC26-02F8C703A42B}';
Ā  Ā  EventIID: Ā '';
Ā  Ā  LicenseKey: nil;
Ā  Ā  Version: 500);
begin
Ā  ServerData := @CServerData;
end;

procedure TTransaction.Connect;
var
Ā  punk: IUnknown;
begin
Ā  if FIntf = nil then
Ā  begin
Ā  Ā  punk := GetServer;
Ā  Ā  Fintf:= punk as ITransaction;
Ā  end;
end;

procedure TTransaction.ConnectTo(svrIntf: ITransaction);
begin
Ā  Disconnect;
Ā  FIntf := svrIntf;
end;

procedure TTransaction.DisConnect;
begin
Ā  if Fintf <>Ā nil then
Ā  begin
Ā  Ā  FIntf := nil;
Ā  end;
end;

function TTransaction.GetDefaultInterface: ITransaction;
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 TTransaction.Create(AOwner: TComponent);
begin
Ā  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps := TTransactionProperties.Create(Self);
{$ENDIF}
end;

destructor TTransaction.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
Ā  FProps.Free;
{$ENDIF}
Ā  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TTransaction.GetServerProperties: TTransactionProperties;
begin
Ā  Result := FProps;
end;
{$ENDIF}

function TTransaction.Post(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā const XMLParameters: WideString; const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Post(UserId, BusinessObject, XMLParameters, XMLIn);
end;

function TTransaction.Build(const UserId: WideString; const BusinessObject: WideString;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  const XMLIn: WideString): WideString;
begin
Ā  Result := DefaultInterface.Build(UserId, BusinessObject, XMLIn);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TTransactionProperties.Create(AServer: TTransaction);
begin
Ā  inherited Create;
Ā  FServer := AServer;
end;

function TTransactionProperties.GetDefaultInterface: ITransaction;
begin
Ā  Result := FServer.DefaultInterface;
end;

{$ENDIF}

procedure Register;
begin
Ā  RegisterComponents(dtlServerPage, [TUtilities, TeQuery, TSetup, TTransaction]);
end;

end.

ziolko.
Thanks for all your help so far!
I made the changes ..
the Utiites log file contains 2 lines:
Create
Destroy


I've also learned that the business server generates a log when these ENet objects are used
Ā  Ā Date Ā  Ā  Ā  Time Ā  Ā  Method Ā  Ā  Ā  Ā  Ā  Ā  Ā Object Status Ā  Ā Operator UserID
2008-08-13 12:08:17:23 Logon Ā  Ā  Ā  Ā  Ā  S A COMLGN 000000000 BEM Ā  Ā  Ā 961DBDC23FE23945801F803A15F9C14F0
2008-08-13 13:18:49:42 Logon Ā  Ā  Ā  Ā  Ā  S A COMLGN 000000000 BEM Ā  Ā  Ā D2E4328B3B7C3F409FCA098D0460C9FA0
2008-08-14 05:45:29:36 Logon Ā  Ā  Ā  Ā  Ā  Ā  A COMLGN 000100006 Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā 

It does indicate that my app, as of yesterday is getting to the server and a login is generated , but something gets lost on returning the user ID to my application on the client

I am in Pacific Time Zone and need to leave for work..will be back on this in a few hours
Note:
I've found out that there is a BIOS Ā processor switch that will turn off hardware data execution protection. known as the XD switch.
Turning this off fixed the problem.
However, I would think that it would be preferable to run the code regardless of the type of processor.
I'd like to see if we can solve this problem..since you've gone so far already.
I am ready to award Ā a portion 0f the points, however , if you feel you've had enough.
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
There have been a few quite serious Ā issues over the recent years that I've been involved with their software. I have passed it on to our Syspro Representative.
Thanks for your effort. You have renewed my faith in this site.
glad I could help at least a little bit:)

ziolko.

From another source I've read:
"The fundamental difference between the VB script (which returns the GUID) and and the Ā appliccation is that the script uses late binding whereas the others each use early binding"

Can you enlightenme on the difference and how maybe this might affect the code that we experimented with. I have no idea what the practical difference is in terms of Delphi
yeah it's true VBScript always uses late binding but it's not true that every application uses early binding. for example in Delphi you can choose which method you use, in this case we used early binding.

in simplest words late binding uses OleVariant while early binding uses interface types, of course that's not only difference. if you want some indepth info about COM programming I strongly suggest reading book by Eric Harmon: "Delphi COM programming". it's pretty old but if you want understand basic concepts of COM it's a must-read.

ziolko.