Sign in to follow this  
Followers 0
Andreik

help with autoit and C++

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0