#include "stdafx.h"
#include "windows.h"
int aas(
{
MessageBoxA(0,"buf","sdf",0);
return 0;
}
BOOL APIENTRY DllMain( HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
{
return TRUE;
}
Пробывал так:
import ctypes
lib=ctypes.windll.LoadLibrary('name.dll')
print lib
lib.aas()
<WinDLL ‘name.dll’, handle d90000 at b17ff0>
а дальше ошибку
Traceback (most recent call last):
File "dll.py", line 4, in <module>
lib.aas()
File "M:\python\Lib\ctypes\__init__.py", line 361, in __getattr__
func = self.__getitem__(name)
File "M:\python\Lib\ctypes\__init__.py", line 366, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'aas' not found