#include <ansi_c.h>
#include <cvirte.h>
#include <userint.h>
#include "cmd.h"
static int panelHandle;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "cmd.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
int CVICALLBACK QuitCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0);
break;
}
return 0;
}
int CVICALLBACK sendCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
FILE *fp;
char buffer[200];
switch (event)
{
case EVENT_COMMIT:
// system("cd\");
// system("cd e:\\job\\load");
system("cmd /c fc E:\\job\\SBBU\\load\\a.txt E:\\job\\SBBU\\load\\c.txt > E:\\job\\SBBU\\load\\cmp.txt");
fp = fopen("E:\\job\\SBBU\\load\\cmp.txt","r");
fgets(buffer, 199, fp);
memset(buffer, 0, sizeof(buffer));
fgets(buffer, 199, fp);
if(strstr(buffer, "no differences encountered"))
MessagePopup("the result", "SAME!!!");
else
MessagePopup("the result", "DIFFERENT!!!");
// system("cmd /c ipconfig /all >1.txt");
break;
}
return 0;
}
文章评论(0条评论)
登录后参与讨论