Need help to allow a working Delphi 3 project to build on Delphi XE

How do I adjust this working Delphi 3 program that uses OLEAUTO and OLE2 to work on the newer Delphi XE,

Program code is below this, errors are here :

Checking project dependencies...

Compiling admn_api.dproj (Debug, Win32)

dcc command line for "admn_api.dpr"

  c:\program files (x86)\embarcadero\rad studio\8.0\bin\dcc32.exe -$O- -$W+ --no-config -M -Q -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;
  DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"c:\program files (x86)\embarcadero\rad studio\8.0\lib\Win32\release";"C:\Users\Administrator\Documents\RAD 
  Studio\8.0\Imports";"c:\program files (x86)\embarcadero\rad studio\8.0\Imports";"C:\Users\Public\Documents\RAD Studio\8.0\Dcp";"c:\program files 
  (x86)\embarcadero\rad studio\8.0\include" -LE"C:\Users\Public\Documents\RAD Studio\8.0\Bpl" -LN"C:\Users\Public\Documents\RAD Studio\8.0\Dcp" 
  -O"c:\program files (x86)\embarcadero\rad studio\8.0\lib\Win32\release";"C:\Users\Administrator\Documents\RAD Studio\8.0\Imports";"c:\program files 
  (x86)\embarcadero\rad studio\8.0\Imports";"C:\Users\Public\Documents\RAD Studio\8.0\Dcp";"c:\program files (x86)\embarcadero\rad studio\8.0\include" 
  -R"c:\program files (x86)\embarcadero\rad studio\8.0\lib\Win32\release";"C:\Users\Administrator\Documents\RAD Studio\8.0\Imports";"c:\program files 
  (x86)\embarcadero\rad studio\8.0\Imports";"C:\Users\Public\Documents\RAD Studio\8.0\Dcp";"c:\program files (x86)\embarcadero\rad studio\8.0\include" 
  -U"c:\program files (x86)\embarcadero\rad studio\8.0\lib\Win32\release";"C:\Users\Administrator\Documents\RAD Studio\8.0\Imports";"c:\program files 
  (x86)\embarcadero\rad studio\8.0\Imports";"C:\Users\Public\Documents\RAD Studio\8.0\Dcp";"c:\program files (x86)\embarcadero\rad studio\8.0\include" 
  -K00400000 -NB"C:\Users\Public\Documents\RAD Studio\8.0\Dcp" -NH"C:\Users\Public\Documents\RAD Studio\8.0\hpp"   admn_api.dpr   

[DCC Warning] App_obj.pas(25): W1006 Unit 'OleAuto' is deprecated

[DCC Error] App_obj.pas(189): E2003 Undeclared identifier: 'VarIsNULL'

[DCC Error] App_obj.pas(189): E2003 Undeclared identifier: 'varisempty'

[DCC Error] App_obj.pas(189): E2012 Type of expression must be BOOLEAN

[DCC Fatal Error] admn_api.dpr(5): F2063 Could not compile used unit 'App_obj.pas'

Failed

Elapsed time: 00:00:01.7

****** Program code **********  :

{/***************************************************************************
$name: UNIT1.PAS 
$version: 1.0 
$date_modified: 121198 
$description: Pascal source file
$owner: GroupWise SDK Team Lead
Copyright (c) 1998 Novell, Inc. All Rights Reserved.

THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE LICENSE AGREEMENT
ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT (SDK) THAT CONTAINS THIS WORK.
PURSUANT TO THE SDK LICENSE AGREEMENT, NOVELL HEREBY GRANTS TO DEVELOPER A
ROYALTY-FREE, NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL'S SAMPLE CODE IN ITS
PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS TO MARKET,
DISTRIBUTE, OR SELL NOVELL'S SAMPLE CODE AS A COMPONENT OF DEVELOPER'S
PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO DEVELOPER OR DEVELOPER'S
CUSTOMERS WITH RESPECT TO THIS CODE.
****************************************************************************/}
unit App_obj;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, OleAuto, Ole2, ComObj, ActiveX, ComServ;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label6: TLabel;
    UserID: TEdit;
    Label7: TLabel;
    LastName: TEdit;
    Label8: TLabel;
    FirstName: TEdit;
    UserDistinguishedName: TEdit;
    Label10: TLabel;
    SystemInfo: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    SystemDescription: TEdit;
    SystemDistinguishedName: TEdit;
    SystemLastModifiedBy: TEdit;
    ConnectedDomainName: TEdit;
    SystemObjectID: TEdit;
    PostOfficeList: TComboBox;
    Label11: TLabel;
    Label9: TLabel;
    UserContext: TEdit;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    DomainPath: TEdit;
    Button2: TButton;
    procedure Initialize(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  vSystem:variant;
  vDomain:variant;

const
  ADMIN_NAME = 'Admin';
  sDOT = '.';

implementation

{$R *.DFM}

procedure TForm1.Initialize(Sender: TObject);
begin
     //Initialize controls
     DomainPath.Text:='';
     SystemDescription.Text:='';
     SystemDistinguishedName.Text:='';
     SystemLastModifiedBy.Text:='';
     ConnectedDomainName.Text:='';
     SystemObjectID.Text:='';

     UserID.Text:='';
     LastName.Text:='';
     FirstName.Text:='';
     UserDistinguishedName.Text:='';
     UserContext.Text:='';
     UserID.SetFocus;

end;

procedure TForm1.Button1Click(Sender: TObject);
var
   vUsers:variant;
   vUser:variant;
   stemp:string;
   idotpos:integer;
   SelectedPO:string;
   sAdmin:string;
begin
   //Get Selected PostOffice
   SelectedPO:=PostOfficeList.Items[PostOfficeList.ItemIndex];

   //Get Users Object
   vUsers:=vDomain.Users;

   //Find Admin user object
   vUser:=vUsers.Item(ADMIN_NAME,SelectedPO,ConnectedDomainName.Text);

   If UserContext.Text = '' then begin

     //Get Admin Context and use as Default
     sAdmin:=vUser.NetID;
     idotpos:=Pos(sDOT,sAdmin);
     stemp:=Copy(sAdmin,idotpos,256); //Copy everything after first dot include dot
     UserContext.Text:=stemp;

   end else begin
     //Use context string
     stemp:=UserContext.Text;
   end;

   //Make Distinguished name by adding UserID and admin context
   stemp:=UserID.Text+stemp;

   //Display User distinguished name
   UserDistinguishedName.Text:=stemp;

   //Add user
   vUser:=vUsers.Add(UserID.Text,LastName.Text,stemp,
          '',SelectedPO);

   //Set User first name
   vUser.GivenName:=FirstName.Text;

   //Commit User first name to system
   vUser.Commit;
end;



procedure TForm1.Button2Click(Sender: TObject);
var
 vPostOffice:variant;
 vPostOffices:variant;
 vPOIterator:variant;

begin
     //Get GroupWise Admin Object and connect to it
     if(DomainPath.Text = '') then begin
        ShowMessage('You must enter a valid Domain Path.  Then press Login');
        exit;
     end;
     vSystem:=CreateOleObject('NovellGroupWareAdmin');

     vSystem.Connect(DomainPath.Text);
     //Get the connected Domain
     vDomain:=vSystem.ConnectedDomain;

     //List some Domain properties
     SystemDescription.Text:=vDomain.Description;
     SystemDistinguishedName.Text:=vDomain.DistinguishedName;
     SystemLastModifiedBy.Text:=vDomain.LastModifiedBy;
     ConnectedDomainName.Text:=vDomain.Name;
     SystemObjectID.Text:=vDomain.ObjectID;

     //Initialize controls
     UserID.Text:='';
     LastName.Text:='';
     FirstName.Text:='';
     UserDistinguishedName.Text:='';
     UserContext.Text:='';
     UserID.SetFocus;

     //Get list of PostOffices for connected Domain
     vPostOffices:=vDomain.PostOffices;
     vPOIterator:=vPostOffices.CreateIterator;
     vPostOffice:=vPOIterator.Next;
     PostOfficeList.Clear;
     While( (NOT VarIsNULL(vPostOffice)) And (NOT varisempty(vPostOffice))) do begin
        PostOfficeList.Items.Add(vPostOffice.Name);
        vPostOffice:=vPOIterator.Next;
     end;

     //Set index to first item in list
     PostOfficeList.ItemIndex:=0;
end;

end.
0
Bob
9/24/2013 10:19:15 PM
embarcadero.delphi.ole 598 articles. 1 followers. Follow

2 Replies
2286 Views

Similar Articles

[PageSpeed] 6
Get it on Google Play
Get it on Apple App Store

Bob wrote:

> [DCC Warning] App_obj.pas(25): W1006 Unit 'OleAuto' is deprecated

Replace the OleAuto unit with the System.Win.ComObj unit in your uses clause.

> [DCC Error] App_obj.pas(189): E2003 Undeclared identifier: 'VarIsNULL'
> 
> [DCC Error] App_obj.pas(189): E2003 Undeclared identifier:
> 'varisempty'

Add the System.Variants unit to your uses clause.

> [DCC Error] App_obj.pas(189): E2012 Type of expression must be BOOLEAN

That is just a side effect of the undefined identifier errors.

--
Remy Lebeau (TeamB)
0
Remy
9/24/2013 11:36:42 PM
Remy,

Thank You so much ! .  I added comobj, variants and no errors.

Have a great day.
Bob Perez

*******************************************************************

> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Bob wrote:
> 
> > [DCC Warning] App_obj.pas(25): W1006 Unit 'OleAuto' is deprecated
> 
> Replace the OleAuto unit with the System.Win.ComObj unit in your uses clause.
> 
> > [DCC Error] App_obj.pas(189): E2003 Undeclared identifier: 'VarIsNULL'
> > 
> > [DCC Error] App_obj.pas(189): E2003 Undeclared identifier:
> > 'varisempty'
> 
> Add the System.Variants unit to your uses clause.
> 
> > [DCC Error] App_obj.pas(189): E2012 Type of expression must be BOOLEAN
> 
> That is just a side effect of the undefined identifier errors.
> 
> --
> Remy Lebeau (TeamB)
0
Bob
9/25/2013 2:11:33 AM
Reply:

Similar Artilces:

Migrating from Delphi 6 to Delphi XE 3! [Edit]
All, I am a Delphi developer working in an windows form application developed using Delphi 6. Now, we are planning to upgrade the development tool. Can anyone provide me information related to major roadblocks that we can face while migrating from Delphi 6 to Delphi XE 3? Should we migrate to Delphi XE 3 or any other preferred version of Delphi based on the fact that our target users will be using Windows 7 or Windows 8? Do we have any tools or utilities to migrate the source code from Delphi 6 to higher version of Delphi? Also, any suggestions related to best practices are welcome....

Delphi 7 to Delphi XE
Have been using Delphi 7 for many moons ( have got later versions but never upgraded to ) My first problem is: Component Palette. in XE it is a small toolbar docked in top right in Delphi 7 it gives a large view of all the components. I am struggling to be able to cope/access my components.in Delphi XE. Can I make the component pallette tool bar the same size as Delphi 7, or is there a fast way to view/choose all available components in XE, that I have not spotted yet? Kind Regards, Robert. Hi, What I know is that in Delphi 2010 and XE you can choose between t...

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

I need help:File CodeGear.Delphi.Targets dammaged in Delphi X2
Hello My computer has a crash and the file CodeGear.Delphi.Targets was dammaged. Delphi open but I can not compile anything. other files recovered but Windows Backup Center does no save this filetype .Targets (pay attention!) Can someone send my privatelly this file or say me where I can download it. It's Delphi X2 update 4 I tried delphi X2 repair but it gives me error Thank you. Joan Galí GTV Barcelona-Europe Solved reinstalling Delphi. El 30/06/2014 13:51, Joan Gali ha escrit: > Hello > My computer has a crash and the file CodeGear.Delphi.Targe...

I need help:File CodeGear.Delphi.Targets dammaged in Delphi X2
Hello My computer has a crash and the file CodeGear.Delphi.Targets was dammaged. Delphi open but I can not compile anything. other files recovered but Windows Backup Center does no save this filetype .Targets (pay attention!) Can someone send my privatelly this file or say me where I can download it. It's Delphi X2 update 4 I tried delphi X2 repair but it gives me error Thank you. Joan Galí GTV Barcelona-Europe Solved reinstalling Delphi. El 30/06/2014 13:51, Joan Gali ha escrit: > Hello > My computer has a crash and the file CodeGear.Delphi.Targets...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Help Update 3 for Delphi XE and C++Builder XE
Help Update 3 for Delphi XE and C++Builder XE http://cc.embarcadero.com/Item/28256 Updated: Fri, 24 Jun 2011 18:52:00 GMT Is the update really new? > {quote:title=Ralf Stocker wrote:}{quote} > Help Update 3 for Delphi XE and C++Builder XE > http://cc.embarcadero.com/Item/28256 > Updated: Fri, 24 Jun 2011 18:52:00 GMT > > Is the update really new? I think so -- but it's nothing major. The update is really BIG though. Not worth it if you're in your cabin in the mountains with a 9600 baud modem connection. ...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

Migrating to Delphi XE from Delphi 7.0
Below is my code in Delphi 7.0, this is how to call another units in webmodule... Hello All, I create a web application in Delphi 7.0, using the Web Server Application, CGI, IntraWeb 7.0.15. And I used TIWPageProducer to view like this url "http://localhost/mcr/mcr.exe/main". I built and run. I viewed in thru IIS and it is running... This is my code in Delphi 7.0 .... .... procedure TWebModule1.proMainGetForm(ASender: TIWPageProducer; AWebApplication: TIWApplication; var VForm: TIWPageForm); begin VForm := TfrmMain.Create(AWebApplication); end;...

delphi.Net Delphi 2005 Project Upgrades?
Our company aquired the software property from another last year. Most of the projects were written in Delphi 2007. We purchased Delphi XE which gave us access to previous versions, including D 2007... all is well. However, 3 projects were written Delphi 2005 for .Net. The VM we received from this company included D2005 but it was licensed from the previous developer. I've contacted Embarcadero about obtaining a copy and or a license+registration for Delphi 2005 and was told this product is no longer available. I'm under the impression Delphi for .Net was abandoned. My qu...

Migrating to Delphi XE from Delphi 7.0
Below is my code in Delphi 7.0, this is how to call another units in webmodule... Hello All, I create a web application in Delphi 7.0, using the Web Server Application, CGI, IntraWeb 7.0.15. And I used TIWPageProducer to view like this url "http://localhost/mcr/mcr.exe/main". I built and run. I viewed in thru IIS and it is running... This is my code in Delphi 7.0 .... .... procedure TWebModule1.proMainGetForm(ASender: TIWPageProducer; AWebApplication: TIWApplication; var VForm: TIWPageForm); begin VForm := TfrmMain.Create(AWebApplication); end; procedure TWebModule1....

Error on Delphi 6 but not on Delphi Xe for Ftp
I am Experimenting with get a file from our webside server via Ftp. I have 2 Machines 1 a laptop runing XP Delphi 6 Indy 10.5.8.0 An a machine runing Window 7 Delphi XE2 with Indy 10.5.8.0. I am using the Same Code on Both. procedure TFrmMain.ProcessItemDalySpecial; var PathDest : String; FileName : String; begin with FrmTb2 do begin if ReadIniBoolean(IniCfg,'FTP','UseFtpDaly') then begin Ftp.Host := ReadIniStr(IniCfg,'FTP','HostDaly'); Ftp.Port := ReadIniInt(IniCfg,'FTP'...

Why does this work fine in Delphi 2009, but not in Delphi 2010
I've been racking my head trying to figure this out and can't understand what is wrong, TFileStream.ReadComponentRes fails when I try to read a component containing a record, it works fine in Delphi 2009 and Delphi 2007, but fails with Delphi 2010 Here is the unit source and DFM *+//UnitSource+* unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TThresholdMode = (tm0,tm1,tm2,tm3,tm4,tm5); TThreshold = Record Mode:TThresholdMode; Filter,Start,Stop:Integer; end; ...

Web resources about - Need help to allow a working Delphi 3 project to build on Delphi XE - embarcadero.delphi.ole

Working class - Wikipedia, the free encyclopedia
The working class (also lower class , labouring class , proletariat , or laboring class ) are those employed in lower tier, subordinate jobs. ...

Here's what Jay Leno will be working on in 2016
Filed under: Green , Videos , Mercedes-Benz , Porsche , Classics , Electric , Performance Jay Leno shows a few of his 2016 projects, including ...

Time to start working on Ted #Cruzisstartingtoworrythem
Time to start working on Ted by digby For some reason I find myself on the email list of CNN contributor and GOPm strategist Alex Castellanos ...

There Are 7 House Democrats Enabling Anti-Working Family GOP Tax Policies, Like Kyrsten Sinema
... Number one, of course, was a giant wet kiss for Big Oil in the form of a repeal of the oil export ban. As Mike Huckabee pointed out, working ...

Crews working to repair water main break on Morena Blvd - CBS News 8 - San Diego, CA News Station - KFMB ...
A concrete water main broke early Saturday morning in the 4600 block of Morena Boulevard, depriving water service to several customers in the ...

Texas Officials Working To Get “Affluenza” Teen Back To The US
CBS Local Texas Officials Working To Get “Affluenza” Teen Back To The US CBS Local The pair first hid out at a high-end resort called Los ...

Duchess Kate had the fewest public events of the ‘working royals’ in 2015
... of Cambridge had the fewest number of royal events for 2015. The 2015 tally came out a few days ago, and of course Kate was the least-working ...

Utilities Working To Be EV Pioneers
... of utility guys. The summit had one session with perspectives from 6 different utility reps — JEA’s Peter King, Gulf [&hellip Utilities Working ...

Is this the working hoverboard we've been waiting for?
The ArcaBoard just barely meets the "Back to the Future: Part II" deadline with a late 2015 announcement showing the hoverboard truly hovering. ...

Here's Some Of That 'Working Class Frustration' You Keep Hearing About
If you ask anyone in the pundit class why Donald Trump and Ted Cruz are gaining traction, it always comes back to this idea that there's a bloc ...

Resources last updated: 1/3/2016 3:13:40 PM