[ Foro de C++ ]

Dll en C++

14-Aug-2015 23:03
Alejandra angul
0 Respuestas

Hola! tengo un problema llamando a una funcion propia de una dll en rad xe3 y es que resulta que la funcion deberia mandar el contenido de la estructura en el parametro en paquetes UDP pero en vez de eso envia el nombre de la funcion. aqui el codigo

#include <vcl.h>
#pragma hdrstop
HMODULE  dllhandle;
#include "Unit1.h"
#include <windows.h>
#include <iostream.h>
#include <conio.h>
//#include "PBusDrv.dll"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;

typedef struct
{
string Name;
int LFCode;
string Code;
int BarCode;
int UnitPrice;
int WeightUnit;  //4 Kg, 9 PCS
int Deptment;
double Tare;
int ShlefTime;
int FixUnit;
double FixWeight;
int Tolerance;
int Message1;
byte Reserved;
string Reserved1;
byte Message2;
byte Reserved2;
int MultiLabel;
int Rebate;
int Account;
}TPLU;

TPLU PPLUCluster[4];
dllhandle = LoadLibraryW(L"PBusDrv.dll");

if(dllhandle)
{

typedef int ( *PBUSTRANSFERPLUCLUSTER)(TPLU PPLUCluster[]);
PBUSTRANSFERPLUCLUSTER PBusTransferPLUCluster;
PBusTransferPLUCluster=  (PBUSTRANSFERPLUCLUSTER)GetProcAddress(dllhandle,  "PBusTransferPLUCluster");
d2=PBusTransferPLUCluster(PPLUCluster);


}




(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)