Skip to content

Translation Error #20

Open
Open
@laoqiuqiu

Description

@laoqiuqiu

Parsed error

// Callbacks should be prepared to treat NULL strings as empty strings.
typedef int (CALLBACK *PFNCHECKINPUTA)(HWND hWnd,LPARAM lParamCheckInput,LPCSTR lpszOrigString,LPCSTR lpszString,LPSTR pszErrorBuf,int cchErrorMax);
typedef int (CALLBACK *PFNCHECKINPUTW)(HWND hWnd,LPARAM lParamCheckInput,LPCWSTR lpszOrigString,LPCWSTR lpszString,LPWSTR pszErrorBuf,int cchErrorMax);
typedef BOOL (CALLBACK *PFNOKINPUTA)(HWND hWnd,LPARAM lParamCheckInput,LPCSTR lpszOrigString,LPCSTR lpszString);
typedef BOOL (CALLBACK *PFNOKINPUTW)(HWND hWnd,LPARAM lParamCheckInput,LPCWSTR lpszOrigString,LPCWSTR lpszString);

Change to

typedef int (__stdcall *PFNCHECKINPUTA)(HWND hWnd,LPARAM lParamCheckInput,LPCSTR lpszOrigString,LPCSTR lpszString,LPSTR pszErrorBuf,int cchErrorMax);
typedef int (__stdcall *PFNCHECKINPUTW)(HWND hWnd,LPARAM lParamCheckInput,LPCWSTR lpszOrigString,LPCWSTR lpszString,LPWSTR pszErrorBuf,int cchErrorMax);
typedef BOOL (__stdcall *PFNOKINPUTA)(HWND hWnd,LPARAM lParamCheckInput,LPCSTR lpszOrigString,LPCSTR lpszString);
typedef BOOL (__stdcall *PFNOKINPUTW)(HWND hWnd,LPARAM lParamCheckInput,LPCWSTR lpszOrigString,LPCWSTR lpszString);

Parsed

  PFNCHECKINPUTA = function(hWnd: HWND; lParamCheckInput: LPARAM; lpszOrigString: LPCSTR; lpszString: LPCSTR; pszErrorBuf: LPSTR; cchErrorMax: Integer): Integer; cdecl;
  PFNCHECKINPUTW = function(hWnd: HWND; lParamCheckInput: LPARAM; lpszOrigString: LPCWSTR; lpszString: LPCWSTR; pszErrorBuf: LPWSTR; cchErrorMax: Integer): Integer; cdecl;
  PFNOKINPUTA = function(hWnd: HWND; lParamCheckInput: LPARAM; lpszOrigString: LPCSTR; lpszString: LPCSTR): LongBool; cdecl;
  PFNOKINPUTW = function(hWnd: HWND; lParamCheckInput: LPARAM; lpszOrigString: LPCWSTR; lpszString: LPCWSTR): LongBool; cdecl;

cdecl ought to be stdcall

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions