Compiler error for

Add-in Express™ Support Service
That's what is more important than anything else

Compiler error for
Incompatible types 'HRESULT' and boolean. for the following 
Abdul Basit


AccuPlan developer


Posts: 20
Joined: 2006-12-01
I Just generated first project with a property Page, compiler generates these errors for all generated functions.

Incompatible types 'HRESULT' and boolean. for the following

function Tfirst.Get_Active(out Value: WordBool): HResult;
begin
Result := Active;
end;

Error is onResult := Active;
---
MyFirstOLaddin GlobalPropertyPage errors at Set_autoScroll = IlobalPropertyPage....

Declaration of set_AutoScroll differs from declaration in IGlobalPropertyPage

Posted 03 Dec, 2006 14:20:43 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Abdul,

What Delphi version do you use? Could you please send me this project for checking?


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 04 Dec, 2006 05:47:33 Top
Abdul Basit


AccuPlan developer


Posts: 20
Joined: 2006-12-01
Compiling MyFIrstAddin project from the Demos, Using D7.
Errors are generated for Unit GlobalPropertyPage;

Errors are at the bottom
--------------------------
function IGlobalPropertyPage.Set_AutoScroll = IGlobalPropertyPage_Set_AutoScroll;
function IGlobalPropertyPage.Set_AutoSize = IGlobalPropertyPage_Set_AutoSize;
function IGlobalPropertyPage.Set_AxBorderStyle = IGlobalPropertyPage_Set_AxBorderStyle;
function IGlobalPropertyPage.Set_Caption = IGlobalPropertyPage_Set_Caption;
function IGlobalPropertyPage.Set_Color = IGlobalPropertyPage_Set_Color;
function IGlobalPropertyPage.Set_Cursor = IGlobalPropertyPage_Set_Cursor;
function IGlobalPropertyPage.Set_DoubleBuffered = IGlobalPropertyPage_Set_DoubleBuffered;
function IGlobalPropertyPage.Set_DropTarget = IGlobalPropertyPage_Set_DropTarget;
function IGlobalPropertyPage.Set_Enabled = IGlobalPropertyPage_Set_Enabled;
function IGlobalPropertyPage.Set_HelpFile = IGlobalPropertyPage_Set_HelpFile;
function IGlobalPropertyPage.Set_KeyPreview = IGlobalPropertyPage_Set_KeyPreview;
function IGlobalPropertyPage.Set_PixelsPerInch = IGlobalPropertyPage_Set_PixelsPerInch;
function IGlobalPropertyPage.Set_PrintScale = IGlobalPropertyPage_Set_PrintScale;
function IGlobalPropertyPage.Set_Scaled = IGlobalPropertyPage_Set_Scaled;
function IGlobalPropertyPage.Set_Visible = IGlobalPropertyPage_Set_Visible;

=======================================================
Errors

[Error] GlobalPropertyPage.pas(84): Declaration of 'Set_AutoScroll' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(85): Declaration of 'Set_AutoSize' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(86): Declaration of 'Set_AxBorderStyle' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(87): Declaration of 'Set_Caption' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(88): Declaration of 'Set_Color' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(89): Declaration of 'Set_Cursor' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(90): Declaration of 'Set_DoubleBuffered' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(91): Declaration of 'Set_DropTarget' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(92): Declaration of 'Set_Enabled' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(93): Declaration of 'Set_HelpFile' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(94): Declaration of 'Set_KeyPreview' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(95): Declaration of 'Set_PixelsPerInch' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(96): Declaration of 'Set_PrintScale' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(97): Declaration of 'Set_Scaled' differs from declaration in interface 'IGlobalPropertyPage'
[Error] GlobalPropertyPage.pas(98): Declaration of 'Set_Visible' differs from declaration in interface 'IGlobalPropertyPage'
[Fatal Error] MyFirstOlAddIn.dpr(9): Could not compile used unit 'GlobalPropertyPage.pas'
Posted 05 Dec, 2006 00:36:58 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Abdul,

The MyFirstAddin demo project doesn't contain any option pages because this demo project is destinated for MS Excel. But in the MyFirstOLAddin demo project, there is such a page, so I can assume you are using the MyFirstOLAddin sample. I have just opened and compiled it without any errors using Delphi 7. Could you please describe step-by-step what you did with the project? In my MyFirstOLAddin example I don't have the following code lines at all. Could you please send me your version of this project for testing?


function IGlobalPropertyPage.Set_AutoScroll = IGlobalPropertyPage_Set_AutoScroll;
function IGlobalPropertyPage.Set_AutoSize = IGlobalPropertyPage_Set_AutoSize;
function IGlobalPropertyPage.Set_AxBorderStyle = IGlobalPropertyPage_Set_AxBorderStyle;
// etc.

Posted 05 Dec, 2006 06:30:59 Top
Abdul Basit


AccuPlan developer


Posts: 20
Joined: 2006-12-01
Yes the demo is MyFirstOLAddin I changed absolutely nothing.
Functions before the autoscroll do not generate errors. It is also true if I create a new application with a wizzard.


Posted 05 Dec, 2006 13:38:34 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Abdul,

Very strange issue. Could you please send me this "damaged" project?

Do you have Update Pack 1 for Delphi 7 installed?

Posted 06 Dec, 2006 05:54:26 Top