import (PB 5.60) Windows 10
Posted: Thu Sep 07, 2017 6:36 pm
				
				the troubles begin  :roll: 
I generate a DLL "operations_x86.dll" as well as the file "operations_x86.lib"
here is the code of my DLL
the 4 basic operations in procedures, nothing very complicated!
then I test with this code:
 
it does not work ! Any ideas ??
the import of the file Lib beside its DLL, must work, out, it does not work ...
contrary to what the Doc says .
Is there a special writing to respect ??
			I generate a DLL "operations_x86.dll" as well as the file "operations_x86.lib"
here is the code of my DLL
Code: Select all
 ; ; ; 
 ;  ; Code "operations.dll "  a compiler en DLL
     ProcedureDLL.i AttachProcess(Instance)
     EndProcedure   
     ; Called when the program release (free) the DLL    ;
     ProcedureDLL.i DetachProcess(Instance)
     EndProcedure   
     ; Both are called when a thread in a program call or release (free) the DLL    ;
     ProcedureDLL.i AttachThread(Instance)
     EndProcedure  
     ProcedureDLL.i DetachThread(Instance)
     EndProcedure
     ; ********************************************
      ProcedureDLL.i A(a,b)
  	 ret=a+b
      		ProcedureReturn ret
      EndProcedure
      ProcedureDLL.i s(a,b)
  	 Ret= a-b
      		ProcedureReturn Ret
      EndProcedure
      ProcedureDLL.i d(a,b)
  	 Ret=a/b
      		ProcedureReturn Ret
      EndProcedure
      ProcedureDLL.i M(a,b)
  	 Ret=a*b
      		ProcedureReturn Ret
      EndProcedure
then I test with this code:
Code: Select all
    ; 
     ; 
      Import "operations_x86.lib"
      		a(a,b)
      		s(a,b)
      		d(a,b)
      		M(a,b)
      EndImport 
      
   
   
    ;   Utilisation
   debug a(5,8)
   debug S(8,2)
   debug d(10,8)
   debug M(5,8)
it does not work ! Any ideas ??
the import of the file Lib beside its DLL, must work, out, it does not work ...
contrary to what the Doc says .
Is there a special writing to respect ??