.netµ÷ÓÃdelphiдµÄdll,³ö´íÎó
´íÎóÀàÐÍ£º³ö´íÎó³¢ÊÔ¶ÁÈ¡»òдÈëÊܱ£»¤µÄÄÚ´æ¡£Õâͨ³£Ö¸Ê¾ÆäËûÄÚ´æÒÑË𻵡£
C#Ô´Âë
[DllImport("Base64.dll")]
public static extern string Base64ToStr(string Base64);
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Base64ToStr("YWRtaW4="));
}
delphi Ô´Âëunit Base;
interface
uses ShareMem,SysUtils, Classes;
// ½«SourceSize³¤¶ÈµÄÔ´Source±àÂëΪBase64×Ö·û´®·µ»Ø
function Base64Encode(const Source; SourceSize: Integer): string; overload;
// ½«Source´ÓStartPos¿ªÊ¼µÄSize³¤¶ÈµÄÄÚÈÝÔ´±àÂëΪBase64£¬Ð´ÈëÁ÷Dest¡£Size=0Îļþ½áÊø
procedure Base64Encode(Source, Dest: TStream; StartPos: Int64 = 0; Size: Int64 = 0); overload;
// °Ñ×Ö·û´®Str±àÂëΪBase64×Ö·û´®·µ»Ø
function StrToBase64(Str: string): string;stdcall;
// °´¸ø¶¨µÄ±àÂëÔ´SourceºÍ³¤¶ÈSize¼ÆËã²¢·µ»Ø½âÂ뻺³åÇøÊµ¼ÊËùÐ賤¶È
function Base64DecodeBufSize(const Source; Size: Integer): Integer;
// ½«Base64±àÂë×Ö·û´®Source½âÂë´æ·ÅÔÚBufÖУ¬·µ»Ø½âÂ볤¶È
function Base64Decode(const Source: string; var Buf): Integer; overload;
// ½«Source´ÓStartPos¿ªÊ¼µÄSize³¤¶ÈµÄBase64±àÂëÄÚÈݽâÂ룬дÈëÁ÷Dest¡£Size=0Îļþ½áÊø
procedure Base64Decode(Source, Dest: TStream; StartPos: Int64 = 0; Size: Int64 = 0); overload;
// °ÑBase64×Ö·û´®½âÂëΪ×Ö·û´®·µ»Ø
function Base64ToStr(Base64: string): string;stdcall;
implementation
const
Base64_Ch
Ïà¹ØÎÊ´ð£º
ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ
ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......
delphi ÊÖ¶¯×°ÔØÇý¶¯ÎļþÌáʾ£º
RROR (1058): The driver is marked as disabled (Start=4) in its service database entry.
ÊDz»ÊÇÕâ¸öÇý¶¯±ØÐèÒªÓÃINFÀ´°²×°¡£¡£ÓÃ×Ô´øµÄINFÀ´×°ÊÇÕý³£µÄ¡£ÓÃÊÖ¶¯×°ÔؾÍÌáʾÈçÉÏ¡ ......
¼±Óá£ÁªÏµQQ£º8775262£¬Ð»Ð»¡£
ÐèÒª½øÐÐDllImportµÄµØ·½Ö±½ÓдDLLImport.·½·¨Ãû¡£
È磺DLLImport.GlobalAddAtom(¡¡);
Îļþ£ºUShare.pas
Delphi(Pascal) code:
unit UShare;
interface
uses Windows, Me ......
ÏëÇëÎʸ÷λ£ºÅ̵ãά»¤ÀïÃæ£ºÅÌÓ¯¿÷ÊýÁ¿=¿â´æÊýÁ¿+Èë¿âÊýÁ¿-³ö¿âÊýÁ¿£¬ÕâÑù×öÊǶԵÄÂð£¬
Â¥ÉÏÕý½â,ÕýÊýÅÌÓ¯ ¸ºÊýÅÌ¿÷
һ¥ÕýÈ·£¡
лл¸÷λÀ²
¾ÍÊÇ£ºÊDz»ÊÇ Êµ¼Ê¿â´æÀïµÄ¿â´æÁ¿ ÓëÄãÊÖ¶¯Êä½øÈ¥µÄÊýÁ¿Ö®¼äµ ......
ÎÒÔÚÍøÉÏÕÒÁ˸ö¹ØÓÚIEBHOµÄ´úÂ룬Ȼºó°´ÕÕÄĸöÉèÖÃÁË£¬ºóÀ´ÔËÐеÄʱºò³öÏÖ
[´íÎó] Unit1.pas(15): Undeclared identifier: 'GetTypeInfoCount'
[´íÎó] Unit1.pas(15): Undeclared identifier: 'GetTypeInfo ......