cÓïÑÔÈçºÎÁ¬½ÓMYSQL£¿
´ó¼ÒºÃ:
ÎÒÊǸãCµÄ, ÏÖÔÚÏëÓÃC Á¬½ÓMYSQL,µ«ÊÇÔõôҲÁ¬½Ó²»ÁË,ÎҵĴúÂëÈçÏÂ:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"
int main()
{
MYSQL* mysql_a;
mysql_a = mysql_init(NULL);
if(mysql_a == NULL)
{
printf("init mysql failed\n");
return ER_BAD_DB_ERROR;
}
if (mysql_real_connect(mysql_a, "localhost", "root" , "123456", "lqiuiw",0, NULL, 0) == NULL)
{
printf("Failed to connect to database: Error: %u(%s)\n", mysql_errno(mysql),mysql_error(mysql));
mysql_close(mysql);
mysql = NULL;
return ER_BAD_DB_ERROR;
}
return 0;
}
³öÏֵĴíÎóÊÇ:
--------------------Configuration: sdfs - Win32 Debug--------------------
Compiling...
sdfs.c
c:\program files\mysql\mysql server 5.0\
Ïà¹ØÎÊ´ð£º
//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ÅÌÉ϶àµÄÎļþÃûΪ£ºdosh , Recycled ,System Volum information, AUTOEXEC.BAT, BOOT.INT , bootfoot.bin, CONFIG.SYS,IO.SYS, MSDOS.SYS, DETECT.COM ,ntldr, pagefile.sys;
¶øÇÒÿ¸öÅÌÉ϶¼ÓÐÕâЩÎļþ£ºRECYCLER ......
ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......
ÎÒÒÔǰ°²×°ÁËÒ»´Î£¬ºóÀ´Ð¶ÔØÁË£¬ÏÖÔÚÔÙ°²×°µÄʱºò£¬Ìáʾ´íÎó£ºError 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
¿ ......