Delphiµ÷ÓÃCÓïÑÔдµÄDll
ÎÒÓÃCÓïÑÔдÁËÒ»¸öDll£¬±àÒë³É¹¦¡£
ÊÇÒ»¸ö·Ç³£¼òµ¥µÄ¼ÓÃÜËã·¨£¬´úÂëÈçÏ£º
#include <stdio.h>
__declspec(dllexport) void Encipher(char a[16])
{
int i,len;
int s=1;
len=strlen(a);
for(i=0;i <len;i++)
{
a[i]=a[i]+s;
s=s+2;
}
}
ÏÖÔÚÎÒÔÚDelphiÖÐÈçºÎµ÷ÓÃËü²¢ÊµÏÖÕâÑùµÄ¹¦ÄÜ£¬µã»÷Button1£¬»ñÈ¡edit1.textµÄÄÚÈÝ£¬´æÓÚÊý×éÖУ¬È»ºóµ÷ÓÃDllÖеĺ¯Êý£¬½øÐмòµ¥¼ÓÃÜ£¬È»ºó½«½á¹û¸³¸øedit2.text¡£
procedure ex_Encipher(var array [0..15] of char); stdcall;
°´ÕÕÂ¥Éϵķ½·¨£¬
type
TArrChar = array[0..15] of char;
procedure Encipher(a:TArrChar); stdcall;external 'Encph.dll' name 'Encipher';
Óû§¼ÓÃܺó¿ÉÒÔ´æ½øÊý¾Ý¿â£º
CopyMemory(@a,@Edit2.text[1],16);
Encipher(a);
Adotable1.Insert;
Adotable1.FieldByName('username').AsString:=trim(edit1.Text);
Adotable1.FieldByName('password').AsString:=a;
Adotable1.Post;
µ«ÊÇ£¬Óû§µÇ¼ʱÔÚEdit2ÖÐÊäÈëÃÜÂ룬ºó
CopyMemory(@a,@Edit2.text[1],16);
Encipher(a);
if Adotable1.FieldByName('password').AsString=a then
begin
//½øÈë×Óϵͳ
end
&nbs
Ïà¹ØÎÊ´ð£º
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÏÖÔÚÓйØc++¡¢cµÄÊé¼®£¬ÄÇЩÊéÊǽÏÉî²ã´ÎµÄ£¿Çë½éÉܼ¸±¾£¿
#include <iostream>
using namespace std;
int funhion(int x, int y )
{
int m,n;
  ......
ÇëÎʸ÷λ¸ßÊÖÈçºÎÓÃC/C++»ñµÃϵͳδ°²×°²¹¶¡
ºÃÏñºÜרҵµÄ¶«Î÷¡£¡£¡£
²é×¢²á±í
ÿ¸ö²¹¶¡Èç¹û°²×°Á˶¼»áÔÚ×¢²á±íÀïÃæµÇ¼Ç
ÇëÎÊÄܲ»ÄܸüÇåÎúЩ£¬ÎÒÏëÓÃc\c++²é³öÀ´£¬²»ºÃÒâ˼£¬ÎÒÊÇÐÂÊÖ¡£»¹ÍûÖ¸½Ì¡£Ð»
·ÖÖµ ......
±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......