locked
QIK Fails to Import .DLL RRS feed

  • Question

  • So, I created a new .NET DLL using some source code that was shared here on this forum.  When I attempt to import the DLL into the QIK, i get the following error:

    "An attempt was made to load a program with the incorrect format."

    I speculated perhaps that I needed to recompile in a different .NET version target so I changed down to .NET 3.5 and same issue. 

    Any pointers here?  Not sure how to debug this further on my own.

    Alex

     

    Tuesday, September 7, 2010 10:45 PM

Answers

All replies

  • Can you clip the source code of the .Net Class that you want to make an activity?

    Wednesday, September 8, 2010 3:04 PM
  • Sure.  Here ya go:

     

    Imports

     

     

    System.IO

    Imports

     

     

    System.Collections

    Imports

     

     

    System.Collections.Generic

    Imports

     

     

    Opalis.QuickIntegrationKit

    Imports Fname.management

    <OpalisObject("GetNAOptions")> _

    Public

     

     

    Class GetNAOptions

     

     

    Implements IOpalisObject

     

     

    Private Shared strFilerName As String

     

     

    Private Shared strOptionName As String

     

     

    Private Shared strUserName As String

     

     

    Private Shared strUserPassword As String

     

     

    Public Sub Design(ByVal designer As IOpalisDesigner) _

     

     

    Implements IOpalisObject.Design

     

    designer.AddInput(

     

    "FName").WithDefaultValue("")

    designer.AddInput(

     

    "Option Name").WithDefaultValue("")

    designer.AddInput(

     

    "User Name").WithDefaultValue("")

    designer.AddInput(

     

    "Password").PasswordProtect()

    designer.AddOutput(

     

    "Result").AsString.WithDescription("Value Returned from NetApp Filer.")

     

     

     

     

    End Sub

     

     

    Public Sub Execute(ByVal request As IOpalisRequest, ByVal response As IOpalisResponse) _

     

     

    Implements IOpalisObject.Execute

     

     

    'Populate local variables with property inputs

    strFName = request.Inputs(

     

    "FName").AsString

    strOptionName = request.Inputs(

     

    "Option Name").AsString

    strUserName = request.Inputs(

     

    "User Name").AsString

    strUserName = request.Inputs(

     

    "Password").AsString

     

     

     

     

    Dim server As New NaServer(strFName, 1, 0)

     

     

    Dim output As NaElement = Nothing

    server.SetAdminUser(strUserName, strUserPassword)

    output = server.Invoke(

     

    "options-get", "name", strOptionName)

     

     

    'Debug.Print(output.ToString())

    response.Publish(

     

    "Result", output.ToString())

     

     

    End Sub

    End

     

     

    Class

    Wednesday, September 8, 2010 3:39 PM
  • Ok, code looks ok. Could you try using .Net 2.0 instead?
    Wednesday, September 8, 2010 3:57 PM
  • OK.  Will try.
    Wednesday, September 8, 2010 5:04 PM
  • Nope.  Same problem.  Will not import the dll.

     

    a

     

    Wednesday, September 8, 2010 5:15 PM
  • You may want to try this workaround (assuming you encounter the problem on Win 7 or W2K8):

     

    ·         Install .Net Framework SDK if it is not already installed (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1AEF6FCE-6E06-4B66-AFE4-9AAD3C835D3D).

    ·         Run corflags.exe from the SDK to register QIKWizard.exe to be run in 32bit:
    corflags /32BIT+ <QIKFolder>\bin\QIKWizard.exe

    ·         Try to import from within the QIK Wizard the sample assembly that comes with QIK.

    If you can import the sample assembly you should also be able to import your own QIK assembly.

    Tuesday, October 19, 2010 12:19 AM
  • I think you are trying to run QIK 3.0 on a 64-bit OS, which is not supported.

    Please get the new 6.3 release, and inside it you will find QIK 3.1.1, which has been updated to work on 64-bit Windows.




    Robert Hearn • Sr. Program Manager
    System Center Cross Platform & Interop

    Opalis Resources      -> Read the Opalis team blog Opalis Wiki page on TechNet |  Follow SysCtrOpalis on Twitter

    Cross-Plat Resources -> Read the SCX team blog    |  SCX TechCenter                     |  Follow SC_InterCom on Twitter

    • Marked as answer by Robert_Hearn Friday, December 3, 2010 4:44 PM
    Friday, December 3, 2010 4:44 PM