Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-643

[OLEDB][8.4.4] OleDbATL doesn't work properly on Win64

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: OLEDB 8.4.4
    • Fix Version/s: None
    • Component/s: OLEDB
    • Labels:
    • Environment:
      • OS: WinXP 64 bit
      • CUBRID: 8.4.4.0227
      • Driver: cubrid-oledb 8.4.4 (20130821)
      • Framework: .NET 4.0

      Description

      • Brief: All the functions of OleDbATL Class throw undesired BadImageFormatException
      • Test Code {code}
        public void OleDbATL_APIS643()
        { OleDbATL.Command_SetParameterInfo(); OleDbATL.Command_GetParameterInfo(); OleDbATL.Command_Prepare(); OleDbATL.Command_Unprepare(); OleDbATL.Rowset_RestartPosition(); }

        //import c++ methods to c#
        public class OleDbATL
        { [DllImport("OleDb_COM_Interface.dll", EntryPoint = "command_SetParameterInfo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern int Command_SetParameterInfo(); [DllImport("OleDb_COM_Interface.dll", EntryPoint = "command_GetParameterInfo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern int Command_GetParameterInfo(); [DllImport("OleDb_COM_Interface.dll", EntryPoint = "command_Prepare", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern int Command_Prepare(); [DllImport("OleDb_COM_Interface.dll", EntryPoint = "command_Unprepare", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern int Command_Unprepare(); [DllImport("OleDb_COM_Interface.dll", EntryPoint = "rowset_RestartPosition", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern int Rowset_RestartPosition(); }{code}

      Result:

      System.BadImageFormatException : 
      System.BadImageFormatException : 
      System.BadImageFormatException : 
      System.BadImageFormatException : 
      System.BadImageFormatException : 
      

        Activity

        Show
        cn15800 谢韦华[Bert] added a comment - MSDN: http://technet.microsoft.com/en-us/library/k7137bfe(v=vs.100 )
        Hide
        cn15800 谢韦华[Bert] added a comment -

        I have tested the issue with oledb driver which link static cci lib.

        {code}
        Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry
        point named 'command_GetParameterInfo' in DLL 'CUBRIDProvider.dll'.{code}

        command_GetParameterInfo is not a function name, so you can not excute successful.

        Show
        cn15800 谢韦华[Bert] added a comment - I have tested the issue with oledb driver which link static cci lib. {code} Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named 'command_GetParameterInfo' in DLL 'CUBRIDProvider.dll'.{code} command_GetParameterInfo is not a function name, so you can not excute successful.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        oledb driver can load by oledb framework successful, so the format of oledb driver is valid.

        Show
        cn15800 谢韦华[Bert] added a comment - oledb driver can load by oledb framework successful, so the format of oledb driver is valid.
        Hide
        cn15800 谢韦华[Bert] added a comment - - edited

        GetParameterInfo is a function of class command, when i set EntryPoint as GetParameterInfo, the same exception will be throw. i think the function should be a global function.

        Show
        cn15800 谢韦华[Bert] added a comment - - edited GetParameterInfo is a function of class command, when i set EntryPoint as GetParameterInfo, the same exception will be throw. i think the function should be a global function.

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: