Jump to content

help with autoit and C++


Recommended Posts

I want to create a dll that contain the access function from C++ and after that to call access function from my autoit script.

Access.cpp

#include "stdafx.h"
#include "_access.h"
#include "io.h"
extern "C" __declspec(dllexport) int __stdcall GetFileAccess(const char *file_name, int mode) {
    return access(file_name,mode);
}

What is wrong in my code? And after I compile my dll, I can use this dll from autoit?

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Usually the compiler (Visual Studio?) tells you what is wrong.

Lar.

Yes, I use Visual Studio, but I don't underastand very good this error:

D:\Visual C++\VC\include\io.h(185) : error C2365: '_access' : redefinition; previous definition was 'namespace'

When the words fail... music speaks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...