小弟自己编译了一个dll,如下:
INT32 WINAPI ras(ULONG8 *data,ULONG8 *dataout,ULONG8 *key,ULONG32 n);
  其中的WINAPI是什么意思?有什么用?

解决方案 »

  1.   

    好象是WINDOWS程序的标准符号,如同以前的PASCAL修饰
      

  2.   

    有的符号是表示函数类型,如LRESULT相当与long。有的是调用方式,如PASCAL和WINAPI,就是函数间如何传递参数。PASCAL在Win32中已经不使用了。WINAPI实际是stdcall。可以当作一种调用习惯,不必太在意!
      

  3.   

    WINAPI 与PASCAL等类似都是一种调用方式,与 C中的far相似.
      

  4.   

    函数调用规范,win32下,WINAPI=STDCALL,从右到左参数进栈,被调用者清除参数堆栈
      

  5.   

    是告诉编译器参数的进栈次序,__cdecl是C系列语言专用的,若要与VB,PASCAL等兼容就必须用__stdcall,即WINAPI
      

  6.   

    #define CALLBACK __stdcall
    #define WINAPI __stdcall
    #define WINAPIV __cdecl
    #define APIENTRY WINAPI
    #define APIPRIVATE __stdcall
    #define PASCAL __stdcallThe __pascal, __fortran, and __syscall calling conventions are no longer supported. You can emulate their functionality by using one of the supported calling conventions and appropriate linker options. WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal.
      

  7.   

    C  调用序列 和 PASCAL 调用序列 会使编译后程序有所不同,也会产生不兼容的情况,使用 WINAPI 是为了兼容性考虑
      

  8.   

    WINAPI Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs. The __pascal, __fortran, and __syscall calling conventions are no longer supported. You can emulate their functionality by using one of the supported calling conventions and appropriate linker options. WINDOWS.H now supports the WINAPI macro, which translates to the appropriate calling convention for the target. Use WINAPI where you previously used PASCAL or __far __pascal. #define CALLBACK __stdcall
    #define WINAPI __stdcall
    #define WINAPIV __cdecl
    #define APIENTRY WINAPI
    #define APIPRIVATE __stdcall
    #define PASCAL __stdcall............MSDN/Windows.h
      

  9.   

    type  sequence  clear stack    
    _cdecl righ-left caller 
    _fastcall left to right callee
    _pascal left to right callee
    _stdcall right to left callee