Make the following changes in the StdAfx.h and Main.cpp files and check the results in the process simulator.
StdAfx.h
struct XMLDataBuf
{
int nLength;
void* pData;
};
extern "C" int __declspec(dllexport) TestEAI(const XMLDataBuf* Value, XMLDataBuf* pReply);
Main.cpp
#include "stdafx.h"
#include <string.h>
#include <stdio.h>
#include <io.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C" int __declspec(dllexport) TestEAI(const XMLDataBuf* Value, XMLDataBuf* pReply)
{
FILE *p;
p = fopen("c:\\test.txt","w");
fprintf(p,"before test");
fprintf(p,"%s After Test",Value->pData);
//strcpy(s,"Hello World");
fclose(p);
return 0;
}