UINT_PTR 64bit에선 int64 32bit에선 integer입니다.
type Tmy_func= function(cmd:PCHAR; args:PINT64; arg_cnt:longint): longint; stdcall;
VC에서 디폴트는 cdecl 일겁니다.
MarunGuy 님이 쓰신 글 :
: 다음과 같이 C 함수포인터 정의 를 파스칼 문법으로 변환하고 싶습니다.
: typedef int (*my_func)(const char *cmd, UINT_PTR *args, const int arg_cnt);
: 일단 다음과 같이 해보았는데 ^UINT_PTR 여기서 컴파일에러가 납니다.
: type Tmy_func= function(cmd:PCHAR; args:^UINT_PTR; arg_cnt:longint): longint; stdcall;
:
: 원 C소스는 vs2008 로 컴파일하고 있는데 위의 typedef 로대로 선언할 경우
: calling convention 을 stdcall 로 하는 것이 맞나요?
|