DELPHIµ÷ÓÃVC±àдµÄDLL º¯Êý²ÎÊýΪLPTSTR
×¢Òâµã£ºLPTSTR ¶ÔÓ¦µÄÊÇPAnsiChar »òÕßPWideChar ÄãÎÊÎÊËûµÄ±àÒëÑ¡Ïî,ÒªÊǶ¨ÒåÁËunicode¾ÍÊÇPWideChar ·ñÔòÊÇPAnsiChar
ÕâÀïÎÒÊÇÓÃUNICODE±à³ÌµÄ£¬ËùÒÔÓõ½µÄÊÇPWideChar
ÔÚVCдµÄA.dllÀïÌí¼ÓÒ»¸öº¯ÊýΪ
extern "C" __declspec(dllexport) LPTSTR WINAPI Do(LPTSTR i)
{
return i;
}
ÔÚDELPHIµ÷ÓÃΪ
type
TDoFunc=function(str:PWideChar) :PWideChar;stdcall;
var
Th:Thandle;
TDo:TDoFunc;
Tp:TFarProc;
str:PWideChar;
strA,strB:PWideChar;
begin
Th:=LoadLibrary('A.dll'); {×°ÔØDLL}
if Th>0 then
try
Tp:=GetProcAddress(Th,PChar('_Do@4'));
if Tp<>nil
then begin
TDo:=TDoFunc(Tp);
strA:='bread';
str:=TDo(strA);
ShowMessage(str);
end
else
ShowMessage('ûÓÐÕÒµ½º¯Êý');
finally
FreeLibrary(Th); {ÊÍ·ÅDLL}
end
else
ShowMessage('dllÎļþûÕÒµ½');
end;
ÕâÑù¾ÍOKÁË£¬(*^__^*) ÎûÎû
ºÃ¿ªÐÄŶ£¬ÓÖ½â¾öÁËÒ»¸öÎÊÌâ
Ïà¹ØÎĵµ£º
ÓÐʱÐèҪʹÓÃ͸Ã÷¿Ø¼þÓÃÓÚ²¶»ñÊó±êÏûÏ¢
1.µ÷ÓÃWindows2000,xpеÄAPIº¯ÊýʵÏÖÕâÒ»¹¦ÄܵĹý³Ì¡£Ê¹ÓÃSetLayeredWindowAttributes
2.Ö±½ÓÉèÖÿؼþµÄalphablend,alphablendvalue£¬¼ä½Óµ÷ÓÃÉÏÊöapi.
3.ʹÓÃTStaticText¿Ø¼þ
procedure WMCtrlColor(var Message: TWMCtlColor); message WM_CTLCOLOR;
procedure TForm3.WMCtr ......
·þÎñ¶Ë£ºÌí¼ÓADOConnection£¬ADOQuery1£¬ADOQuery2¡£ÉèÖÃADOQuery1ΪÖ÷±í£¬ADOQuery2Ϊ´Ó±í¡£(ͨ¹ý ADOQuery2.SQL.Text:= 'select * from ´Ó±í where FKID=:Ö÷±íPKID'ÉèÖÃ)¡£Ìí¼ÓDataSetProvider1ºÍDataSetProvider2·Ö±ðÁ¬½Óµ½ADOQuery1ºÍADOQuery2¡£
¿Í»§¶Ë£ºÌí¼ÓClientDataSet1£¬ClientDataSet2¡£ClientDataS ......
¡ó[DELPHI]²úÉúÊó±êÍ϶¯Ð§¹û
ͨ¹ýMouseMoveʼþ¡¢DragOverʼþ¡¢EndDragʼþʵÏÖ£¬ÀýÈçÔÚPANELÉϵÄLABEL£º
var xpanel,ypanel,xlabel,ylabel:integer;
PANELµÄMouseMoveʼþ£ºxpanel:=x;ypanel:=y;
PANELµÄDragOverʼþ£ºxpanel:=x;ypanel:=y;
LABELµÄMouseMoveʼþ£ºxlabel:=x;ylabel:=y;
LABELµÄEndDragʼþ£ºlabel ......
Ò»¸öºÜ¼òµ¥µÄÎÊÌ⣬µ«ÎÒƾÎÒѧϰC++/VCÒ»Äê¶à£¬½Ó´¥DelphiµÄʱ¼äÒ²²»¶ÌÁË£¬µ«ÈÔȻд²»³öÀ´¡£
±¾À´ÒÔΪ£¬²»¾ÍÊǽ«Form1.ShowºÍForm1.Hideô£¬µ«È´¾ÍÊÇ´ïµ½²»µ½×Ô¼ºÏëÒªµÄ½á¹û
Õâ¸öÎÊÌâµ¹²»ÓÃ×÷ÉîÈëÑо¿ÁË£¬µ½ÊÇÈÃÎÒ·¢ÏÖ£¬DelphiÒ²²»ÊÇÐÅÊÖÕªÀ´£¬Ê²Ã´¶¼ÊÇÄÇôÈÝÒ׵ģ¬ÒÔΪ×Ô¼ºÓеã¶ùVCµÄµ××Ó£¬¾ÍС¿´ÁËDelphi¡£
×î½üÒ»¶Îʱ ......
ÒýÓÃ×Ô£ºhttp://develop.csai.cn/delphi/NO000001.htm
×Ô¶¯Íê³É¼ò½é
¡¡¡¡´ó¼ÒÒ»¶¨¶¼·Ç³£ÊìϤIEä¯ÀÀÆ÷µÄµØÖ·ÊäÈë±à¼¿ò£¬ËüÌṩÁË×Ô¶¯Íê³ÉµÄ¹¦ÄÜ¡£×Ô¶¯Íê³É£¨Auto Complete£©¹¦Äܼò»¯Á˱༿òµÄÊäÈ빦ÄÜ£¬Ëü¿ÉÒÔ¸ù¾ÝÒѾÊäÈëµÄ²¿·Ö×Ö·û´®½øÐÐÔ¤²âºÍÆ¥Å䡣ͼ2.7µÄÀý×Ó£¬ÑÝʾÁË×Ô¶¯Íê³É¿ÉÒÔÒÀ¾ÝÊäÈëµÄ“pro”£¬¸ø³ ......