Hi

I wonder if someone can help?

I am trying to build a Win32Project DLL which creates a file called log.txt. I am able to build the Win32Project DLL which produces a warning (see below). The DLL does not create log.txt on the c drive either when I click on ‘Start without debugging’ or attempt to call the DLL from my Game Studio project Cscript file. The code does however work and creates a log.txt file in a Win32Console Project Console Application.

My question is why does the Win32Project DLL not create ‘log.txt’ on my c drive and how do I get the DLL to work?

Regards

David

// OpenTxtWin32ProjectDLL.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#define DLL_USE
#include "adll.h"
#include <iostream>
//#include <iomanip>
#include <fstream>
using namespace std;

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
engine_bind();
return TRUE;
}

DLLFUNC var dap_lead()
{
FILE* logfile = fopen("C:\\log.txt", "a");
return 0;
}



------ Build started: Project: OpenTxtWin32ProjectDLL, Configuration: Release Win32 ------

Compiling...
OpenTxtWin32ProjectDLL.cpp
Linking...
Creating library Release/OpenTxtWin32ProjectDLL.lib and object Release/OpenTxtWin32ProjectDLL.exp
LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other libs; use /NODEFAULTLIB:library

Build log was saved at "file://c:\Projects\OpenTxtWin32ProjectDLL\Release\BuildLog.htm"
OpenTxtWin32ProjectDLL - 0 error(s), 1 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped