Public Type tACECallbackCopyStruc
   StructureType As Long         ' is ACE_CALLBACK_TYPE_COPY
   GlobalData() As tACEGlobalDataStruc       ' see tACEGlobalDataStruc
        
End TypePublic Type tACEGlobalDataStruc
    Obj As Long           
   MaxArchiveTestBytes As Long
End Type我改为:
public struct tACECallbackCopyStruc
{
 
long Code;
tACEGlobalDataStruc GlobalData();
 
}
但是GlobalData(); 会出错?

解决方案 »

  1.   

    GlobalData() As tACEGlobalDataStruc,这是数组,改为
    tACEGlobalDataStruc[] GlobalData
      

  2.   

    long Code;
    改为
    int Code;
      

  3.   

    Public Function ToANSI(ByVal Str As String) As String
      Dim PCh() As Byte
      Dim asResult As String
      Dim i  
      PCh = Str  
      For i = 0 To Len(Str) / 2 - 1
        asResult = asResult + ChrW(PCh(i * 4) + PCh(i * 4 + 2) * 256)   
      Next
        
      If Len(Str) Mod 2 = 1 Then                                        
        asResult = asResult + ChrW(PCh(i * 4))                           Else                                                            
        asResult = asResult + Chr(0)
      End If
         
      ToANSI = asResult
    End Function
      

  4.   

    请高手在指点一下:上面代码:  PCh = Str   ,ChrW()  ,  If Len(Str) Mod 2 = 1 Then  不知如何改?
      

  5.   

    PCh = Str -> PCh = System.Text.Encoding.Default.GetBytes(Str);
    ChrW() -> (char)()
    If Len(Str) Mod 2 = 1 Then
    -> 
    If (Str.Length % 2) == 1
    {
    }