Hola Leandro:
Tal cual te comenta Manuel, lo mas importante es tener que funciones tiene la dll y que parametros hay que pasarle a dichas funciones..
Para que tengas una idea te tiro un poco de codigo que uso con una dll.
METHOD New( nPort) CLASS TFiscal
LOCAL s := FI_VACIO
DEFAULT nPort := 1
::nHandler := CallDll32( "OpenComFiscal" , "WINFIS32.DLL" , nPort , 1 )
// Como ves aca, llamo a la funcion OpenComFiscal de la dll WINFIS32.DLL y le paso dos parametros, y el resultado de la funcion lo guardo en ::nHandler
::lStatusFiscal := .f.
::lStatusPrinter := .f.
::lStatusLogico := .f.
::aUltimaRta := {}
::nPort := nPort
::lClienteCargado := .f.
::cDescriptionError := ""
IF ::nHandler >= 0
CallDll32( "InitFiscal" , "WINFIS32.DLL" , ::nHandler )
CallDll32 ( "UltimaRespuesta" , "WINFIS32.DLL" , ::nHandler, @s )
// En este caso le paso un valor por referencia
::aUltimaRta := Fi_ConvertRta(s)
ELSE
::lStatusLogico := .t.
::cDescriptionError := "El impresor fiscal no esta conectado al puerto " + STR(nPort)
RETURN nil
ENDIF
RETURN Self
METHOD End() CLASS TFiscal
CallDll32( "CloseComFiscal" , "WINFIS32.DLL" , ::nHandler )
RETURN .t.
METHOD ErrorStatus() CLASS TFiscal
LOCAL s := FI_CONSULTAR_ESTADO
CallDll32 ( "MandaPaqueteFiscal" , "WINFIS32.DLL" , ::nHandler , s )
s := FI_VACIO
CallDll32 ( "UltimaRespuesta" , "WINFIS32.DLL" , ::nHandler, @s )
IF !empty(::aUltimaRta) .AND. LEN(::aUltimaRta) > 2
::GetErrors(::aUltimaRta[1],::aUltimaRta[2])
ELSE
::lStatusFiscal := .f.
::lStatusPrinter := .f.
ENDIF
RETURN ::lStatusFiscal .or. ::lStatusPrinter
Espero te sirva.