
Usar dll
Publicado por Ninho Owen (14 intervenciones) el 13/05/2016 20:48:55
Buen día
Me podrían ayudar con esto, quizas para ustedes es muy sencillo pero para mi esta siendo un dolor de cabeza. Lo que quiero es generar el datamatrix y guardarlo en c:\DM.bmp
Saludos y gracias por su ayuda.
En un modulo tengo esto:
En un Boton es:
NOTA:. Asi como esta me sale como variable no definida. Se refiere a la " p "
Si pongo:
data_matrix2file 9, 9, "probando codigo datamatrix", "p", "C:\DM.BMP"
Error 49 "La convencion de llamadas a DLL es incorrecta"
Instrucciones de uso:
W and H are width and height of barcode matrix and have predefined sizes
text is the text for encoding
img* are dimensions of result picture
format action, see below
path is a path to result barcode file
data_matrix2DC just draws DataMatrix barcode on declared canvas.
data_matrix2file makes different things, depending on "format" variable.
Don't forget to free data_matrix2file return, to avoid memory leaks
he following values of format are available:
i returns info about barcode, not very useful, but...
t returns DataMatrix barcode as a set of strings (H strings by W bytes length)
p writes generated barcode as BMP to "path"
Me podrían ayudar con esto, quizas para ustedes es muy sencillo pero para mi esta siendo un dolor de cabeza. Lo que quiero es generar el datamatrix y guardarlo en c:\DM.bmp
Saludos y gracias por su ayuda.
En un modulo tengo esto:
1
2
3
Public Declare Sub data_matrix2file Lib "C:\iec16022.dll" ( _
ByVal wDM As Integer, ByVal hDM As Integer, ByVal tDM As String, _
ByVal fDM As String, ByVal pDM As String) ' suponiendo que la dll esta en el C:\
En un Boton es:
1
2
3
Private Sub CmdUpdate_Click()
data_matrix2file 9, 9, "probando codigo datamatrix", p, "C:\DM.BMP"
End Sub
NOTA:. Asi como esta me sale como variable no definida. Se refiere a la " p "
Si pongo:
data_matrix2file 9, 9, "probando codigo datamatrix", "p", "C:\DM.BMP"
Error 49 "La convencion de llamadas a DLL es incorrecta"
Instrucciones de uso:
1
2
DLL exports 2 functions. Use CDECL convention
DLLEXPORT char* data_matrix2file (int W, int H, char* text, char* format, char* path);
W and H are width and height of barcode matrix and have predefined sizes
text is the text for encoding
img* are dimensions of result picture
format action, see below
path is a path to result barcode file
data_matrix2DC just draws DataMatrix barcode on declared canvas.
data_matrix2file makes different things, depending on "format" variable.
Don't forget to free data_matrix2file return, to avoid memory leaks
he following values of format are available:
i returns info about barcode, not very useful, but...
t returns DataMatrix barcode as a set of strings (H strings by W bytes length)
p writes generated barcode as BMP to "path"
Valora esta pregunta


0