Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Undefinierter Bezeichner 'Outlook := unassigned' (https://www.delphipraxis.net/110372-undefinierter-bezeichner-outlook-%3D-unassigned.html)

PASST 17. Mär 2008 08:28


Undefinierter Bezeichner 'Outlook := unassigned'
 
Hallo allerseits,

ich teste gerade eine Anwendung, die ich unter Delphi 4 geschrieben habe, in Delphi 7. Dabei lese ich Kontaktdaten aus Outlook.
Delphi-Quellcode:
  Outlook := CreateOleObject('Outlook.Application');
  NameSpace := Outlook.GetNameSpace('MAPI');
  ... blablabla ...
  Outlook := Unassigned;
Obwohl ich nichts am Code verändert habe, erhalte ich beim Kompilieren in Delphi 7 die Fehlermeldung:
Delphi-Quellcode:
[Fehler] Unit1.pas(212): Undefinierter Bezeichner: 'Unassigned'
Kann mir jemand sagen was da schief läuft?

Gruß
Peter

Der.Kaktus 17. Mär 2008 08:39

Re: Undefinierter Bezeichner 'Outlook := unassigned'
 
Hallo,

binde mal die Unit Variants mit ein.

Delphi-Quellcode:
Uses ......,Variants;

var Outlook:Variant;

Outlook := CreateOleObject('Outlook.Application');
  NameSpace := Outlook.GetNameSpace('MAPI');
  ... blablabla ...
  Outlook := Unassigned;

PASST 17. Mär 2008 08:47

Re: Undefinierter Bezeichner 'Outlook := unassigned'
 
Danke, das war es!

Ich habe jetzt mal schnell verglichen und siehe da, in Delphi4 ist 'Unassigned' in der Unit 'System' enthalten und in Delphi7 in 'Variants', wie du schriebst.


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz