delphiµ÷ÓÃͼÐÎʶ±ðdll³ö´í!!!!!!!
delphi µ÷ÓÃͼÐÎʶ±ðdll×ÜÊDZ¨µØÖ·Ö®ÀàµÄ´íÎó£¬Çë´ó¼Ò°ïæ¿´¿´ÊÇʲôÎÊÌâ,´úÂëÈçÏÂ:
implementation
function OCR(imgname:string;i:integer):PChar;stdcall;external 'AspriseOCR.dll';
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
vcode:PChar;
filename:string;
begin
filename:='test1.bmp';
vcode:=OCR('e:\poll\demo\test1.bmp',-1);
edit1.Text:=strpas(vcode);
end;
end.
˸øÄã×öµÄdll, µÚÒ»¸ö²ÎÊýÊÇ string ?
dllÓÃdelphiдµÄÂð?
²»Êǵģ¬ÊÇÔÚ¹úÍâµÄÒ»¸öÍøÕ¾ÏÂÔØµÄDLL£¬ËµÃ÷ÎĵµËµÊÇ¿ÉÒÔÖ§³Ödelphiµ«Ã»ÓÐÀý³Ì£¬ÕâÊÇÎÒ·ÂVBµÄÀý³Ìд³öµÄ¡£
VBµÄÀý³ÌÊÇ£º
private declare function ocr lib "aspriseocl.dll"(byval file as string,byval imagetype as long )as string
private declare function ocrbarcodes lib "asperiseocr.dll"(byval file as string,byval imagetype as long ) as string
private declare function ocrpart lib "aspriseocr.dll" (byval file as string,byval imagetype as long,byval startx as long,byval starty as long,byval width as long,byval height as long) as string
private sub command2_click()
dim ret as string
ret=ocr("c:\test.bmp",-1)
end sub
»ØÂ¥ÉÏ£¬¸ÄÁË»¹ÊDZ¨Ò»ÑùµÄ´í
access violation at 0x00000000:read of address ox00000000'.
ÄǾÍÓ¦¸Ã²éÒ»ÏÂÎļþ·¾¶ÊÇ·ñÕýÈ·¡¢¸ÃDllÊÇ·ñÐèÒªµ÷Óóõʼ»¯¹ý³Ì¡£
{{----
Ïà¹ØÎÊ´ð£º
ÇëÎʸ÷λÄܲ»ÄÜ¿´µ½delphiÖÐ×Ô´ø×é¼þµÄÄÚ²¿´úÂë,±ÈÈçÔõôȥ¿´speedbuttonµÄflat·½·¨ÖеĴúÂëµÈ.
SpeedButton1.Flat
Êó±êÒÆµ½FlatÉÏ£¬°´×¡Ctrl¼ü£¬×ó»÷
¶ÔÁË£¬SpeedButton1 ±ØÐëÊÇ´´½¨ºÃµÄ
Êǰ¡£¬¾ÍÕâà ......
delphiÄÚÖõļÓÃܽâÃܵ¥ÔªÊÇÄĸö£¿
DelphiÓÐÄÚÖüÓÃܽâÃܵ¥Ôª£¿
delphiÀïÓиö¼ÓÃܺͽâÃܵĵ¥Ôª
ÒýÓÃ
delphiÀïÓиö¼ÓÃܺͽâÃܵĵ¥Ôª
ÊÇÄĸö£¿
windowsµÄapi£¿
±ê×¼¼ÓÃܵÄÔ´´úÂë£¬ÍøÉÏ ......
ÎÒÓÃdelphi×ö½çÃæ£¬¿âÀïÃæµÄº¯Êý²ÎÊýÊÇCArray <DBStruct,DBStruct>Ð͵ÄÒýÓã¬DBStructÊǽṹÌå¡£ÇëÎÊÎÒÔÚdelphiÖиÃÓÃʲôÑùµÄʵ²ÎÈ¥½ÓÊÕ¿âÀïÃæ´«¹ýÀ´µÄֵĨ£¿Çë¸÷λ°ï°ï棬лл£¡~~
Çë¸÷λ´ó¸ç´ó½ã°ï°ïæ°¡ ......
Õâ¸öÊÇÀ¹½Ø°´¼üÏûÏ¢²¢²âÊÔÊÇ·ñΪENTER¼ü¡£
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
& ......
»·¾³winXP,delphi 7, postsgresql 8.4, ÒѰ²×°odbc for postgresql
Á¬½Ó·½Ê½ado -> odbc -> postgresql
Delphi(Pascal) code:
con1.ConnectionString := 'Provider=MSDASQL.1;Extended Pr ......