vc写的头文件.h如何转换为delphi的pas啊?~~~~~~~~~急(50分)

  • 主题发起人 主题发起人 huangjihua
  • 开始时间 开始时间
H

huangjihua

Unregistered / Unconfirmed
GUEST, unregistred user!
现在遇到一个难题,本人正在编写一个程序,是用delphi写的,但是现在要调用vc写的dll,请问有谁懂把vc的头文件.h转换为delphi的pas???????
 
你把.H贴出来啊!看不到东西怎么转换?
 
unit PosCrwDef;

interface

// 僩儔僢僋巜掕
const
TRACK_DEFAULT = $0;
TRACK_ISO1 = $1;
TRACK_ISO2 = $2;
TRACK_ISO3 = $4;
TRACK_JIS2 = $8;

TRACK_ISO1_ISO2 = TRACK_ISO1 or TRACK_ISO2;
TRACK_ISO1_ISO3 = TRACK_ISO1 or TRACK_ISO3;
TRACK_ISO2_ISO3 = TRACK_ISO2 or TRACK_ISO3

TRACK_ISO1_ISO2_ISO3 = TRACK_ISO1_ISO2 or TRACK_ISO3

TRACK_ISO1_JIS2 = TRACK_ISO1 or TRACK_JIS2;
TRACK_ISO2_JIS2 = TRACK_ISO2 or TRACK_JIS2;
TRACK_ISO1_ISO2_JIS2 = TRACK_ISO1_ISO2 or TRACK_JIS2;
TRACK_ISO3_JIS2 = TRACK_ISO3 or TRACK_JIS2;
TRACK_ISO1_ISO3_JIS2 = TRACK_ISO1 or TRACK_ISO3_JIS2;
TRACK_ISO2_ISO3_JIS2 = TRACK_ISO2 or TRACK_ISO3_JIS2;
TRACK_ISO1_ISO2_ISO3_JIS2 = TRACK_ISO1_ISO2 or TRACK_ISO3_JIS2;

// Version
MAX_VER_NAME = 12;
MAX_VER_VERSION = 4;

// 10恑斖埻抣
DECIMAL_MIN = 0;
DECIMAL_MAX = 9;

// 儕僩儔僀夞悢
RETRY_MIN = DECIMAL_MIN;
RETRY_MAX = 5;

// 帴婥婰榐巇條(徻嵶偼晄柧丅10恑斖埻偵廬偆)
MAGNETIC_MIN = DECIMAL_MIN;
MAGNETIC_MAX = DECIMAL_MAX;

// 僇乕僪峈帴椡(徻嵶偼晄柧丅10恑斖埻偵廬偆)
ANTIMAGNETIC_MIN = DECIMAL_MIN;
ANTIMAGNETIC_MAX = DECIMAL_MAX;

// 僿僢僪僋儕乕僯儞僌夞悢
HEADCLEANING_MIN = 1;
HEADCLEANING_MAX = 7;

// 僇乕僪憖嶌
MODE_DEFAULT = 0;
MODE_CARDOUT = 1;
MODE_CARDIN = 2;
MODE_STANDBY_FRONT = 3;
MODE_STANDBY_BACK = 4;

// 弶婜壔
INITIAL_ONLY = 0;
INITIAL_CARDOUT = MODE_CARDOUT;

// 僋儕乕僯儞僌
CLEAN_CARDIN = 0;
CLEAN_INTERNAL = 1;

// LED
LED_PUTOUT_LIGHT = 0;
LED_PUTON_LIGHT = 1;
LED_BLINK_LOW = 2;
LED_BLINK_NORMAL = 3;
LED_BLINK_FAST = 4;

// 報帤柺
MIX_X_POS = 0;
MAX_X_POS = 303;
MIX_Y_POS = 0;
MAX_Y_POS = 459;

// 僗僞僀儖
STYLE_H_OVERWRITE = 0;
STYLE_H_HEAVYWRITE = 1;
STYLE_V_OVERWRITE = 2;
STYLE_V_HEAVYWRITE = 3;

// 帪娫/夞悢
MIN_ON_TIME = 0;
MAX_ON_TIME = $ff;
MIN_OFF_TIME = 0;
MAX_OFF_TIME = $ff;
MIN_REPEAT = 0;
MAX_REPEAT = $ff;

// 娍帤庬
KANJI_SJIS = 0;
KANJI_JIS = 1;

// 僼僅儞僩摿惈
FONT_NORMAL = 0;
FONT_S_ANK_BOLD = 1;
FONT_W_ANK_BOLD = 2;
FONT_S_SIZE_16 = 4;
FONT_FULL = FONT_S_ANK_BOLD or FONT_W_ANK_BOLD or FONT_S_SIZE_16;

// 暥帤娫
MIN_CHARSPACE = 0;
MAX_CHARSPACE = 9;

// 報帤僄僱儖僊乕
MIN_PRINTPOWER = DECIMAL_MIN;
MAX_PRINTPOWER = DECIMAL_MAX;

// 徚嫀僄僱儖僊乕
MIN_ERASEPOWER = DECIMAL_MIN;
MAX_ERASEPOWER = DECIMAL_MAX;

// 報帤曗惓抣
MIN_PRINTCOMP = DECIMAL_MIN;
MAX_PRINTCOMP = DECIMAL_MAX;

// 埵抲曗惓抣
MIN_POSCOMP = 0;
MAX_POSCOMP = 8;

// 埵抲曗惓抣
MIN_POS = 0;
MAX_POS = 459;

// 奜帤暆
GAIJI_HEIGHT_16 = 0;
GAIJI_HEIGHT_24 = 1;

// 奜帤搊榐斣崋
MIN_GAIJI_REGNO = 0;
MAX_GAIJI_REGNO = 255;

// 僪僢僩僀儊乕僕
MIN_WIDTH = 1;
MAX_WIDTH = 60;


// 儗僐乕僪峔憿懱(嵟戝128暥帤)
MAX_MSDATA = $80;

type
MSRECORD = record
dwCRWErr : LongWord;
dwTrack : LongWord;
dwVerify : LongWord;
dwRecordSize: LongWord;
RecordData : array[0..MAX_MSDATA-1] of BYTE;
end;
LPMSRECORD = ^MSRECORD;

implementation

end.
 
晕,这个还有疑问吗?全是const类型变量,delphi下也有啊.挨着转换为对应数据类型就行了
 
c里边头文件是用来对函数或者类等声明的,delphi或其他语言一般都没有头文件的,但是如果调用.dll你可以定义library啊,用stdcall定义你要调用的函数不一样可以调用么
 
后退
顶部