Roberto28 de Agosto del 2008
PreguntaHola, estoy tratando de cargar implicitamente un DLL a traves de C, yo tengo la libreria DLL, genere el archivo .LIB y luego hice la libreria .H con todos los encabezados, pero no como usar los metodos que esta en el dll en mi codigo C, que mas debo poner para que funcione ya que no me compila pues no consigue los metodos que estan en el DLL. Aqui esta el codigo para que vean si hay algun error. Gracias
#include <stdio.h>
#include <windows.h>
int i = 1;
int j = 1;
int Nmax = 1;
long velocidad = 57600;
char* x = "11";
char* y = "1";
char* str;
char* puerto = "COM1";
char* data = " ";
char* buffer = " ";
int OpenPort(char* puerto, long int velocidad);
void ClosePort();
int SoundControl(char* tipo,char* tuneSound,char* onOFF);
int main()
{
i = OpenPort("COM1", 57600);
if(i == 0)
{
j = SoundControl("6","1","1");
ClosePort();
return 1;
}
else
{
return 1;
}
}
int OpenPort(char* puerto, long int velocidad)
{
int i = 0;
i = IOpenPort(puerto, velocidad);
return i;
}
void ClosePort()
{
IClosePort();
}
int SoundControl(char* tipo,char* tuneSound,char* onOff)
{
int i = 0;
i = ISoundControl(tipo,tuneSound,onOff);
return i;
}
#include <stdio.h>
#include <windows.h>
int i = 1;
int j = 1;
int Nmax = 1;
long velocidad = 57600;
char* x = "11";
char* y = "1";
char* str;
char* puerto = "COM1";
char* data = " ";
char* buffer = " ";
int OpenPort(char* puerto, long int velocidad);
void ClosePort();
int SoundControl(char* tipo,char* tuneSound,char* onOFF);
int main()
{
i = OpenPort("COM1", 57600);
if(i == 0)
{
j = SoundControl("6","1","1");
ClosePort();
return 1;
}
else
{
return 1;
}
}
int OpenPort(char* puerto, long int velocidad)
{
int i = 0;
i = IOpenPort(puerto, velocidad);
return i;
}
void ClosePort()
{
IClosePort();
}
int SoundControl(char* tipo,char* tuneSound,char* onOff)
{
int i = 0;
i = ISoundControl(tipo,tuneSound,onOff);
return i;
}
