简体   繁体   中英

Calling C++ dll in VC++

I am writing a application on VC++ using SAGEM MORPHO DLL's.
The DLL I am referring is MORPHO_SDK.dll
The function exposed is I

C_MORPHO_User::Enroll  ( US  i_us_Timeout,UC  i_uc_FingerNumber, T_MORPHO_TYPE_TEMPLATE  i_x_TemplateType,  
  UL  i_ul_CallbackCmd,  
  T_MORPHO_CALLBACK_FUNCTION  i_pf_Callback,  
  PVOID  i_pv_CallbackArgument,  
  I  i_i_CoderChoice,  
  UL  i_ul_DetectModeChoice   
 )   

The way I am calling is

    int res;  
    C_MORPHO_User u,nw,idf;  

extern "C
" __declspec(dllimport) int Enroll  ( US  i_us_Timeout,UC  i_uc_FingerNumber, 
    T_MORPHO_TYPE_TEMPLATE  i_x_TemplateType,  
  UL  i_ul_CallbackCmd,  
  T_MORPHO_CALLBACK_FUNCTION  i_pf_Callback,  
  PVOID  i_pv_CallbackArgument,  
  I  i_i_CoderChoice,  
  UL  i_ul_DetectModeChoice   
 ) ;  
main()
{
int x=u.Enroll(0x15,1,MORPHO_PK_ISO_FMR ,0,NULL,NULL,MORPHO_MSO_V9_CODER ,MORPHO_ENROLL_DETECT_MODE);  
    printf("%d\n",x);  
}  

While compiling I am getting these error

1.syntax error : missing ';' before identifier 'u'
2.C_MORPHO_User : missing storage-class or type specifiers.

Is this the correct way to call the Dll. Kindly help in resolving the issue.

我包括了所有必需的Header文件,它已经解决了该问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM