Показать сообщение отдельно
Старый 26.02.2014, 14:18   #4  
ShkipeRR is offline
ShkipeRR
Участник
 
41 / 7 (1) +
Регистрация: 08.05.2013
Адрес: Владимир
Вот что в Аксапте получилось
X++:
static void Job77(Args _args)
{
Int                  // Номер порта
Int              // Результат
int      // Метод записи
int               // Отладка
Int      // Номер ошибки

void 
void 
void 
void 
int 

Binary 
Counter        // Номер БД в ТСД всего их 3
Counter     // Номера форм в ТСД всего их 8мь
M583_ImportedData 

Int 
Binary 
Binary 
Binary 
Binary 
Binary 
Binary 
Binary 
Binary 
DLL       // Драйвер терминала (CipherLabTCP.dll)
DLLFunction      // Подключить (cipherlabtcpStart)
DLLFunction   // Отключить (cipherlabtcpStop)
DLLFunction      // Инициализация компоненты объекта сервера (cipherlabtcpCreate)
DLLFunction   // Получение строки события в обработчике события (cipherlabtcpGetEvent)
DLLFunction  // Устанавливает callback функцию для события от ТСД (cipherlabtcpSetEventCallback)
DLLFunction  // Задание оконного сообщения для события (cipherlabtcpSetEventMassega)
DLLFunction  // Удаленее ранее созданного объекта сервера (cipherlabtcpDestroty)
DLLFunction       // Пинг (cipherlabtcpPing)
DLLFunction  // Получить данные (cipherlabtcpGetData)
DLLFunction  // Получить серийный номер ТСД (cipherlabtcpGetSerialNumber)
DLLFunction  // Послать ответ на ТСД (cipherlabtcpAnswer)
DLLFunction  // Получить параметры с ТСД (cipherlabtcpGetProperties)
DLLFunction  // Назначить параметры ТСД (cipherlabtcpSetPropierties)
DLLFunction  // Послать сообщение на ТСД без вибро сигнала (cipherlabtcpSendMessage)
DLLFunction  // Послать предупреждение на ТСД с вибро сигналом и миганием свет диода (cipherlabtcpSendWarning)
CipherLabTCP = new DLL("CipherLabTCP") // Драйвер терминала
GetProperties = new DLLFunction(CipherLabTCP, 'cipherlabtcpGetProperties') // Получение параметров
SetProperties = new DLLFunction(CipherLabTCP, 'cipherlabtcpSetProperties') // Назначение параметров
Enable = new DLLFunction(CipherLabTCP, 'cipherlabtcpCreate') // Инициализация компоненты объекта сервера
Attach = new DLLFunction(CipherLabTCP, 'cipherlabtcpStart') // Запуск сервера
Deattach = new DLLFunction(CipherLabTCP, 'cipherlabtcpStop') // Остановка сервера
Destroy = new DLLFunction(CipherLabTCP, 'cipherlabtcpDestroy') // Освобождение ресурсов
SetEventCallback = new DLLFunction(CipherLabTCP, 'cipherlabtcpSetEventCallback') // Устанавливает callback функцию для события от ТСД
GetEvent = new DLLFunction(CipherLabTCP, 'cipherlabtcpGetEvent') // Получение строки события
  
GetDataSN = new DLLFunction(CipherLabTCP, 'cipherlabtcpGetSerialNumber') // Получить серийный номер ТСД

Port = 
SaveMethod = 
Debug = 

Enable.returns(ExtTypes::void)
Enable.arg(ExtTypes::void)
ErrorNumber = Enable.call(ptrtohandle)

if (ErrorNumber == 0)
{
SetEventCallback.returns(ExtTypes::void)
SetEventCallback.arg(ExtTypes::void, ExtTypes::void, ExtTypes::void)
ErrorNumber = SetEventCallback.call(ptrtohandle, callbackfunc, param1)

GetProperties.returns(ExtTypes::void)
GetProperties.arg(ExtTypes::void, ExtTypes::void, ExtTypes::void, ExtTypes::void)
ErrorNumber = GetProperties.call(ptrtohandle, Port, SaveMethod, Debug)

SetProperties.returns(ExtTypes::void)
SetProperties.arg(ExtTypes::void, ExtTypes::void, ExtTypes::void, ExtTypes::void)
ErrorNumber = SetProperties.call(ptrtohandle, Port, SaveMethod, Debug)

Attach.returns(ExtTypes::void)
Attach.arg(ExtTypes::void)
ErrorNumber = Attach.call(ptrtohandle)

if (ErrorNumber != 0)
{
Deattach.returns(ExtTypes::DWord)
Deattach.arg(ExtTypes::void)
Deattach.call(ptrtohandle)
Destroy.returns(ExtTypes::DWord)
Destroy.arg(ExtTypes::void)
Destroy.call(ptrtohandle)
warning ("Не удалось подключиться. Переподключите ТСД к WiFi")
 }
}
else
{
Deattach.returns(ExtTypes::DWord)
Deattach.arg(ExtTypes::void)
Deattach.call(ptrtohandle)
Destroy.returns(ExtTypes::void)
Destroy.arg(ExtTypes::void)
Destroy.call(ptrtohandle)
warning ("Не удалось подключиться. Переподключите ТСД к WiFi")
}
}
Из этого кода не получается получить дескриптор ptrtohandle и код ошибки всегда 0, так как дескриптор функции Enable не получается получить не идёт Wi-Fi подключение к компоненте dll, подскажите пожалуйста как в этом коде можно получить дескриптор функии Enable чтобы в дальнейшем этот дескриптор использовать?
__________________
Axapta 3.0 SP6 Build 1951