E1M1 Posted November 27, 2012 Share Posted November 27, 2012 (edited) Hello I am trying to call 64 bit dll but for some reason I keep getting error 3 "function" not found in the DLL file #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** DllCall("pyclip.dll","int:cdecl","SomeFunction","str","abc") MsgBox(0,"",@error) in dllmain.cpp I do have that function. // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #define DLL_EXPORT __declspec(dllexport) int DLL_EXPORT SomeFunction(const LPCSTR sometext) { MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION); return 0; } BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } Does anyone know why autoit cant find that function? Edited November 27, 2012 by E1M1 edited Link to comment Share on other sites More sharing options...
JohnOne Posted November 27, 2012 Share Posted November 27, 2012 Not 100% here, but do you need to prefix your export with ' extern "C" ' AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Andreik Posted November 27, 2012 Share Posted November 27, 2012 (edited) Because the function name is decorated. So JohnOne gives you a hint. Edited November 27, 2012 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
E1M1 Posted November 27, 2012 Author Share Posted November 27, 2012 Thank you edited Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now