Hello Community
Cant get a component package (Zetafax) to compile..
Firstly get this:
Starting Build of ZfLib14ZfLib14_pkg - Release
COMPILE : error C2039: 'IStream' : is not a member of 'ZfLib14'
c:\lokalmodeller\comimpo20121\source\ZfLib14.h - Line 2481
COMPILE : error C2039: 'IStream' : is not a member of 'ZfLib14'
c:\lokalmodeller\comimpo20121\source\ZfLib14.h - Line 2485
COMPILE : error C2039: 'ISequentialStream' : is not a member of 'ZfLib14'
c:\lokalmodeller\comimpo20121\source\ZfLib14.h - Line 2544
Added a Attributes for Imported COM label
include( "IStream", "ISequentialStream","tagSTATSTG" )
It worked I did not get any C2039 errors again but a new set of errors:
Starting Build of ZfLib14ZfLib14_pkg - Release
COMPILE : error C2011: '_ULARGE_INTEGER' : 'union' type redefinition
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tlh - Line 1327
COMPILE : error C2011: '_LARGE_INTEGER' : 'union' type redefinition
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tlh - Line 1348
so with
Compiler Error with #import Directive and the ADSI Type Library
this in mind have been trial and error and to be honest being impatient and not really understanding what is going on just hoping I will stumble accross the magic combination
Considering the header file looks like this now
#include "ObComFld.h"
#include "ObVariantFld.h"
#include "stdole20.h"
#import <C:\Program Files\Common Files\Equisys\ZFAPI32.DLL> \
raw_dispinterfaces \
rename_namespace( "ZfLib14" ) \
include( "IStream", "ISequentialStream","tagSTATSTG" )
I have tried
#import <C:\Program Files\Common Files\Equisys\ZFAPI32.DLL> rename("_LARGE_INTEGER", "")
rename("_LARGE_INTEGER", "")
rename("_LARGE_INTEGER", "("_LARGE_INTEGER2")
When Attributes for Imported COM label is set to (recommended in
The #import Directive
) :
include( "IStream", "ISequentialStream","tagSTATSTG" ) \
rename( "_ULARGE_INTEGER", "_ULARGE_INTEGER2" ) \
rename( "_LARGE_INTEGER", "_LARGE_INTEGER2" )
I get the following compile errors that look that they might be
https://support.ca.com/irj/portal/anonymous/kbproblem?productcd=CPLEX&problemnbr=1539 COM WRAPPER COMPILE ERROR C2664
Starting Build of ZfLib14ZfLib14_pkg - Release
COMPILE : error C2079: 'ZfLib14::tagSTATSTG::cbSize' uses undefined struct 'ZfLib14::_ULARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tlh - Line 1327
COMPILE : error C2664: 'ZfLib14::IStream::raw_RemoteSeek' : cannot convert parameter 1 from 'ZfLib14::_LARGE_INTEGER2' to 'ZfLib14::_LARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tli - Line 973
COMPILE : error C2664: 'ZfLib14::IStream::raw_SetSize' : cannot convert parameter 1 from 'ZfLib14::_ULARGE_INTEGER2' to 'ZfLib14::_ULARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tli - Line 979
COMPILE : error C2664: 'ZfLib14::IStream::raw_RemoteCopyTo' : cannot convert parameter 2 from 'ZfLib14::_ULARGE_INTEGER2' to 'ZfLib14::_ULARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tli - Line 985
COMPILE : error C2664: 'ZfLib14::IStream::raw_LockRegion' : cannot convert parameter 1 from 'ZfLib14::_ULARGE_INTEGER2' to 'ZfLib14::_ULARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tli - Line 1003
COMPILE : error C2664: 'ZfLib14::IStream::raw_UnlockRegion' : cannot convert parameter 1 from 'ZfLib14::_ULARGE_INTEGER2' to 'ZfLib14::_ULARGE_INTEGER2'
c:\lokalmodeller\comimpo20121\source\release\obj\zfapi32.tli - Line 1009
COMPILE : error C2664: 'ZfLib14::IStream::RemoteSeek' : cannot convert parameter 1 from '_LARGE_INTEGER' to 'ZfLib14::_LARGE_INTEGER2'
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13441
COMPILE : error C2664: 'ZfLib14::IStream::SetSize' : cannot convert parameter 1 from '_ULARGE_INTEGER' to 'ZfLib14::_ULARGE_INTEGER2'
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13505
COMPILE : error C2664: 'ZfLib14::IStream::RemoteCopyTo' : cannot convert parameter 2 from '_ULARGE_INTEGER' to 'ZfLib14::_ULARGE_INTEGER2'
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13562
COMPILE : error C2664: 'ZfLib14::IStream::LockRegion' : cannot convert parameter 1 from '_ULARGE_INTEGER' to 'ZfLib14::_ULARGE_INTEGER2'
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13727
COMPILE : error C2664: 'ZfLib14::IStream::UnlockRegion' : cannot convert parameter 1 from '_ULARGE_INTEGER' to 'ZfLib14::_ULARGE_INTEGER2'
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13802
COMPILE : error C2228: left of '.QuadPart' must have class/struct/union
c:\Lokalmodeller\ComImpo20121\Source\ZfLib14.cpp - Line 13911
Finished Build of ZfLib14ZfLib14_pkg - Release with 12 error(s), 0 warning(s)
but really must admit its hit and hope! Hopefully someone understands this..Jez.. :)
Many thanks
George
Links I have found useful for future ref:
The #import Directive
Compiler Error with #import Directive and the ADSI Type Library
COM WRAPPER COMPILE ERROR C2664
Interop Forms Toolkit with COM Import
Compiling stdole20 package after componet import
Component import CodeJock 13.3 trial