Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

CÎļþ¶Áд

char data[255]={0},user[15],password[32];

if((fp=fopen("QQ.ini","wb+"))==NULL)
{
printf("ÎÞ·¨´´½¨QQ.iniÎļþ\n");
system("pause");
exit(0);
}
else
{
printf("³õʼ»¯Êý¾ÝÉÐδ´´½¨\nÇëÊäÈëQQÕ˺Å:");
gets(user);
printf("ÇëÊäÈëQQÃÜÂë:");
gets(password);
sprintf(data,"user:%spassword:%s",user,password);
fwrite(data,strlen(data),1,fp);
memset(data,0,255);
fseek(fp,0L,0);
fread(data,strlen(data),1,fp);
printf("Êä³ö:%s\n",data);
fclose(fp);
printf("´´½¨³õʼ»¯Îļþ³É¹¦\n");
}
ΪʲôÊä³ö½á¹ûΪ¿Õ£¿£¿´´½¨µÄQQ.iniÎļþÕý³££¬ÎÊÌâ¾ÍÊÇÎÞ·¨´ÓÕâ¸öÎļþ¶Á³öÊý¾Ý
ÎÒÒ»ÏòÓÃ"w+b"

strlen(data)ºÃÏñÊÇ0

ÎÊÌâÖØÐÂÃèÊöÏ£º
ÎÒÓиöQQ.ini£¬ÀïÃæÄÚÈÝÊÇ:user:35555password:444
ÕâÊÇÎÒfwrite(data,strlen(data),1,fp);Ò»´ÎдÈëµÄ£¬´ò¿ª·½Ê½wb closeÎļþ

È»ºóÎÒµÚ¶þ´ÎÔËÐгÌÐò£¬Ïë¶ÁÈ¡Õâ¸öÎı¾Êý¾Ý
rb·½Ê½´ò¿ª£¬È·±£ÎļþÖ¸Õë²»¿Õºó£¬fseek(fp,0L,2);fread(data,ftell(fp),1,fp)£»
ÔÙÒ»´ÎÐÔ¶Á³ö

ΪʲôµÃµ½µÄ½á¹ûÊÇ¿Õ×Ö´®£¿£¿£¿£¿£¿

memset(data,0,255);
Ö®ºóstrlen(data)=0
¶Á0³¤¶È,µ±È»ÊÇ¿Õ

µÚ¶þÖÖ:
fseek(fp,0L,2);
long l = ftell(fp);
fseek(fp,0L,0);
fread(data,l,1,fp);
ÎļþÖ¸ÕëÒƵ½ÎļþÍ·

C/C++ code





Ïà¹ØÎÊ´ð£º

dllµ¼³ö·½·¨Ç°¼Óextern "C"±¨´í

Í·ÎļþÀïÕâô¶¨Òå
public:
    extern "C" __declspec(dllexport) HRESULT  ABC();
public:
    extern "C" __declspec(dllexport) void BBB();
......

Çóc/sÏîÄ¿Ô´Âë ¸Ðл

¶¼ËµÍøÉÏÓкö࣬µ«ÎÒһֱûÕÒµ½¡£Èç¹ûÄúÖªµÀ£¬Çë¸æËßÎÒÏêϸµÄÏÂÔصØÖ·¡£Òª´óÐÍÏîÄ¿»òÊǼܹ¹±È½ÏºÃµÄ¡£

ÄúÒ²²»Ìá51aspxÁË¡£ÉÏÃæµÄ¶«Î÷ÊDz»´í£¬µ«ÎÒÏëÒª¼Ü¹¹±È½ÏºÃµÄ¡£¡£

ÎÒÏë¿´¿´ËûÃÇÊÇÔõô×öÏîÄ¿ÕûºÏ ......

СCµÄÎÊÌâ¹þ

C/C++ code:
#include <stdio.h>
typedef struct node{
int *key;
int length;
}node;
void insert(node &temp,int n)
{
int i,j;
for(i=0;i<=temp.length;i++)
{
......

C³ÌÐòÎÊÌâ

ÓÐÕâÑùÁ½¸öÎÊÌ⣬ϣÍû¸ßÊÖÖ¸µã£º
µÚÒ»£º
struct struct_A{
int a;
char b;
int c;
short d;
}
  struct struct_B{
  int a;
  char b;
  short c;
  ......

ÇóÖúcµÄÎÊÌâ

1001.exe ÖÐµÄ 0x0041394f ´¦Î´´¦ÀíµÄÒì³£: 0xC0000005: дÈëλÖà 0x66792e62 ʱ·¢Éú·ÃÎʳåÍ»

ÕâÊÇÔõô»ØÊ£¿Ð»Ð»ÁË£¬ÎÒÊDzËÄñ
Ë­ÖªµÀÔõô»ØÊ¡­¡­ÕâÊǸöͨÓõĴíÎóÌáʾ¡­¡­ÉÏ´úÂë

ÐèÒªÖØнøÐбàÒë

Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ