AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.03.2006, 09:04   #1  
Delfins_imported is offline
Delfins_imported
Участник
 
147 / 10 (1) +
Регистрация: 24.03.2004
Вот такая штука, что при вызове функции из своей 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 );
C++:
Код:
#define DLLEXPORT __declspec(dllexport)

DLLEXPORT bool PGP_SetExecutablePath(LPCSTR _fileName)
{
	if (!g_ExecutablePath)
		g_ExecutablePath = new char;
	strcpy( g_ExecutablePath, _fileName );
	return true;
}
!!! Главное, что проверил вызов функций из C++ программы, то никаких exception и ошибок не вылетает..
В чем проблема?

Спасибо!
Старый 07.03.2006, 10:12   #2  
Wamr_imported is offline
Wamr_imported
Участник
 
101 / 10 (1) +
Регистрация: 08.01.2004
может быть так
funcSetExecutablePath.returns( ExtTypes:WORD );
Старый 07.03.2006, 10:15   #3  
Delfins_imported is offline
Delfins_imported
Участник
 
147 / 10 (1) +
Регистрация: 24.03.2004
Нет, не помогает... по всякому уже пробовал ;(

С поинтерами тоже не идет (из примера в WinApi)

Код:
	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);
	}

Самое странное, что это какая то глобальная ошибка - исщя в google - выдает много разных результатов ...

http://www.google.lv/search?q=The+value+of...:en-USfficial
Старый 07.03.2006, 18:18   #4  
Delfins_imported is offline
Delfins_imported
Участник
 
147 / 10 (1) +
Регистрация: 24.03.2004
Решение проблемы здесь - http://www.axforum.info/forums/showthread.php?t=12497
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 14:47.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.