Hi
Thanks for your help. I have been away for some time but have returned to the problem. I now get the following error when I compile. Would you know if there is a simple reason for this?
------ Build started: Project: first, Configuration: Debug Win32 ------
Compiling...
first.cpp
c:\MyDlls\first\first.cpp(17) : error C2146: syntax error : missing ';' before identifier 'KillFile'
c:\MyDlls\first\first.cpp(19) : error C2065: 'temp' : undeclared identifier
c:\MyDlls\first\first.cpp(19) : error C2059: syntax error : ')'
c:\MyDlls\first\first.cpp(20) : error C2065: 'A4_STRING' : undeclared identifier
c:\MyDlls\first\first.cpp(20) : error C2065: 'my_file' : undeclared identifier
c:\MyDlls\first\first.cpp(20) : error C2059: syntax error : ')'
c:\MyDlls\first\first.cpp(21) : error C2227: left of '->chars' must point to class/struct/union
type is ''unknown-type''
c:\MyDlls\first\first.cpp(20) : error C3861: 'A4_STRING': identifier not found, even with argument-dependent lookup
c:\MyDlls\first\first.cpp(21) : error C3861: 'INT2FIX': identifier not found, even with argument-dependent lookup
c:\MyDlls\first\first.cpp(21) : error C3861: 'my_file': identifier not found, even with argument-dependent lookup
Build log was saved at "file://c:\MyDlls\first\Debug\BuildLog.htm"
first - 10 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
Below is the code which I think is OK:
// first.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "adll.h"
#include "afuncs.h"
#include <io.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
DLLFUNC fixed KillFile(long file)
{
fixed *temp = (fixed *)adll_getwdlobj("temp");
A4_STRING *my_file = (A4_STRING *)file;
return INT2FIX(remove (my_file -> chars));