
Chapter 2: Developing Custom Applications
Sample C code to acquire AIM DFC definitions
#include <stdlib.h>
#include <IMPACT/Structs.h>
#include “CustomAcquirePluginImpl.h”
int Init()
{
return 1;
}
int Deinit()
{
return 1;
}
int Execute();
{
int i = 0;
//for printTest
int arg1;
short arg2;
long arg3;
char arg4;
struct istr arg5 = {0};
struct iblob arg6 = {0};
int* arg7 = (int*)malloc(sizeof(int));
short* arg8 = (short*)malloc(sizeof(short));
long* arg9 = (long*)malloc(sizeof(long));
char* arg10 = (char*)malloc(sizeof(char));
struct istr* arg11 = (struct
istr*)malloc(sizeof(struct istr));
struct iblob* arg12 = (struct iblob*)malloc(sizeof
(struct istr));
memset(arg7, 0, sizeof(int));
memset(arg8, 0, sizeof(short));
memset(arg9, 0, sizeof(long));
memset(arg10, 0, sizeof(char));
memset(arg11, 0, sizeof(struct istr));
memset(arg 12, 0, sizeof(struct iblob));
...
i = printTest(...); //making a DFC
return 1;
}
Copyright © 2005. Sybase Inc. All rights reserved.
|
|
View this book as PDF 