Board index » delphi » how can i use this function (written in VC , GEO3D.dll)

how can i use this function (written in VC , GEO3D.dll)

hi..

i am novice in both Delphi and Visual C++.

but i have to use VC function in Delphi.

(i use delphi 6 edition.)

how can i use this function (written in VC , GEO3D.dll)

 XIS_EXPORT BOOL X3DGTF_SetPlaneTableInfo( HGTFWND _GTFWnd, char*
_strTableName )

 XIS_EXPORT BOOL    X3DGTF_Invalidate( HGTFWND hGTFWnd )

XIS_EXPORT void X3DGTF_SetPlane( HGTFWND _hGTFWnd, BOOL _bflag, BOOL
_bUpdate )

              XIS_EXPORT BOOL    X3DGTF_Invalidate( HGTFWND hGTFWnd )

i tried to use like this

//in declare unit
  function X3DGTF_SetPlaneTableInfo( hGTFWnd:HGTFWND ; strTableName:Pchar )
: BOOL; cdecl; external GEO3D;

// in main unit
  BoolsetPlane:=X3DGTF_SetPlaneTableInfo( hGTFWnd ,pchar('Plane'));  // 486
Line

but it cannot work..
error message like below.
//[Error] Main.pas(486): '(' expected but ',' found

how can i do..

Sorry for my poor english....

JJ

 

Re:how can i use this function (written in VC , GEO3D.dll)


Hi Yaz,
Are you sure about the call type 'cdecl'? could it be a standard C call?

Jason

Quote
"iceGEO" <iceti...@hananet.net> wrote in message

news:QxO19.824$Bq.911@news.hananet.net...
Quote
> hi..

> i am novice in both Delphi and Visual C++.

> but i have to use VC function in Delphi.

> (i use delphi 6 edition.)

> how can i use this function (written in VC , GEO3D.dll)

>  XIS_EXPORT BOOL X3DGTF_SetPlaneTableInfo( HGTFWND _GTFWnd, char*
> _strTableName )

>  XIS_EXPORT BOOL    X3DGTF_Invalidate( HGTFWND hGTFWnd )

> XIS_EXPORT void X3DGTF_SetPlane( HGTFWND _hGTFWnd, BOOL _bflag, BOOL
> _bUpdate )

>               XIS_EXPORT BOOL    X3DGTF_Invalidate( HGTFWND hGTFWnd )

> i tried to use like this

> //in declare unit
>   function X3DGTF_SetPlaneTableInfo( hGTFWnd:HGTFWND ;

strTableName:Pchar )

- Show quoted text -

Quote
> : BOOL; cdecl; external GEO3D;

> // in main unit
>   BoolsetPlane:=X3DGTF_SetPlaneTableInfo( hGTFWnd ,pchar('Plane'));  //
486
> Line

> but it cannot work..
> error message like below.
> //[Error] Main.pas(486): '(' expected but ',' found

> how can i do..

> Sorry for my poor english....

> JJ

Other Threads