1. 程式人生 > >vb.net 呼叫動態庫dll

vb.net 呼叫動態庫dll

'宣告部分
   Public Declare Function Encode Lib ".\LDPC_DEC_DLL.dll" _
          (ByRef s As Byte, ByRef c As Byte) As Byte

    Public Declare Function Add_Noise Lib ".\LDPC_DEC_DLL.dll" _
    (ByRef x As Byte, ByRef y As Byte, ByVal snr As Double) As Byte

    Public Declare Function LDPC_Dec_Init Lib ".\LDPC_DEC_DLL.dll" () _
    As Integer
    Public Declare Function LDPC_Dec Lib ".\LDPC_DEC_DLL.dll" _
    (ByRef y As Byte, ByRef y_d As Byte) As Byte
'使用部分
   Dim flag As Boolean
   flag = LDPC_Dec(FrameCOntent(0), Dec(0))