?? testgetrecip.cpp
字號:
// testGetRecip.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "../../hmaccess/hmacommon.h"
#include "../../hmaccess/hmagetrecipientsfromxml.h"
void testGetRi(char *lpsz)
{
printf("Opening file %s...",lpsz);
FILE* fp = fopen(lpsz,"rb");
if (fp==0)
{
printf("Error open file %s\n",lpsz);
return;
}
fseek(fp,0,SEEK_END);
long len=ftell(fp);
char *p = new char[len];
rewind(fp);
fread(p,len,1,fp);
fclose(fp);
HMASPRECIPINFO ri={0};
if (HMAGetRecipientsFromXML((const unsigned char *)p,len,&ri)==0)
printf("Sender:%s,%s,%s\nOK\n",ri.szReceiverName,ri.szReceiverName,ri.szReceiverPostCode);
else
printf("Error get sender infomation./n");
delete p;
return;
}
int main(int argc, char* argv[])
{
testGetRi("goodxml1.xml");
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -