|
|
#1 |
|
Участник
|
при вызове функции из своей DLL, вылетает ошибка
Вот такая штука, что при вызове функции из своей DLL, вылетает данная ошибка
Цитата:
The value of the ESP register was not properly saved across the call to function 'PGP_SetExecutablePath' in DLL library 'pgp_gnupg.dll'. This is usually a result of calling a DLL function that has been declared with an incorrect number of arguments.
X++ Код: DLL dll = new DLL("pgp_gnupg.dll");
DLLFunction funcSetExecutablePath;
boolean b;
;
if (!dll)
throw error("No DLL found");
funcSetExecutablePath = new DLLFunction(dll, "PGP_SetExecutablePath");
if (!funcSetExecutablePath)
throw error("No function PGP_SetExecutablePath found");
funcSetExecutablePath.returns( ExtTypes::Byte );
funcSetExecutablePath.arg( ExtTypes::String );
b = funcSetExecutablePath.call( this.PGPParameters().DLL );Код: #define DLLEXPORT __declspec(dllexport)
DLLEXPORT bool PGP_SetExecutablePath(LPCSTR _fileName)
{
if (!g_ExecutablePath)
g_ExecutablePath = new char;
strcpy( g_ExecutablePath, _fileName );
return true;
}Код: DLL dll = new DLL("ax_testdll.dll");
DLLFunction f;
binary pArg = new Binary("qwerqwefasdf asdfa sd");
;
WinAPI::fileExists( "asdfas" ); // works fine!!!
f = new DLLFunction(dll, "fnAx_testdll" );
if (f)
{
f.returns( ExtTypes::void );
f.arg( ExtTypes::Pointer );
f.call(pArg);
}В чем проблема? Спасибо! |
|
|